Add room database for data caching & is new feature.
This commit is contained in:
parent
a2f26cc2a5
commit
79a36fa9d9
23 changed files with 974 additions and 89 deletions
|
|
@ -1,9 +1,14 @@
|
|||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("com.google.dagger.hilt.android")
|
||||
id("com.google.gms.google-services")
|
||||
id("com.google.firebase.crashlytics")
|
||||
id("androidx.room")
|
||||
id("com.google.devtools.ksp")
|
||||
}
|
||||
|
||||
|
|
@ -19,7 +24,8 @@ android {
|
|||
keyPassword = "123456"
|
||||
}
|
||||
create("pixelized") {
|
||||
storeFile = (project.properties["PIXELIZED_RELEASE_STORE_FILE"] as? String)?.let { file(it) }
|
||||
storeFile =
|
||||
(project.properties["PIXELIZED_RELEASE_STORE_FILE"] as? String)?.let { file(it) }
|
||||
storePassword = project.properties["PIXELIZED_RELEASE_STORE_PASSWORD"] as? String
|
||||
keyAlias = project.properties["PIXELIZED_RELEASE_KEY_ALIAS"] as? String
|
||||
keyPassword = project.properties["PIXELIZED_RELEASE_KEY_PASSWORD"] as? String
|
||||
|
|
@ -64,6 +70,10 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
buildTypes.onEach {
|
||||
it.buildConfigField("String", "DEFAULT_READ_TIME_STAMP", "\"$defaultReadTimestamp\"")
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
|
@ -141,6 +151,11 @@ dependencies {
|
|||
ksp("com.google.dagger:hilt-android-compiler:2.50")
|
||||
ksp("com.google.dagger:hilt-compiler:2.50")
|
||||
|
||||
// Room
|
||||
implementation("androidx.room:room-runtime:2.6.1")
|
||||
implementation("androidx.room:room-ktx:2.6.1")
|
||||
ksp("androidx.room:room-compiler:2.6.1")
|
||||
|
||||
// Image
|
||||
implementation("io.coil-kt:coil-compose:2.5.0")
|
||||
}
|
||||
|
|
@ -155,6 +170,16 @@ kotlin {
|
|||
jvmToolchain(17)
|
||||
}
|
||||
|
||||
room {
|
||||
schemaDirectory("$projectDir/schemas")
|
||||
}
|
||||
|
||||
val defaultReadTimestamp: String
|
||||
get() {
|
||||
val formatter = SimpleDateFormat("dd/MM/yyyy HH:mm:ss", Locale.FRANCE)
|
||||
return formatter.format(Date()).toString()
|
||||
}
|
||||
|
||||
val gitBuildNumber: Int
|
||||
get() {
|
||||
val stdout = org.apache.commons.io.output.ByteArrayOutputStream()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue