Skip to content

Commit

Permalink
Merge pull request #75 from TimPushkin/updates
Browse files Browse the repository at this point in the history
Upgrade Room
  • Loading branch information
TimPushkin authored Oct 27, 2023
2 parents 920e3ae + f7fdc2e commit a3d2494
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
27 changes: 17 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
plugins {
alias libs.plugins.android.application
alias libs.plugins.jetbrains.kotlin.android
alias libs.plugins.androidx.room
alias libs.plugins.google.dagger.hilt.android
alias libs.plugins.google.devtools.ksp
}

kotlin {
jvmToolchain(17)
compilerOptions {
freeCompilerArgs.add('-opt-in=kotlin.RequiresOptIn')
}
}

def keystorePropertiesFile = rootProject.file('keystore.properties')
def keystoreProperties = new Properties()
if (keystorePropertiesFile.exists()) keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
Expand Down Expand Up @@ -35,10 +43,6 @@ android {
versionName "${version.major}.${version.minor}.${version.patch}"

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

ksp {
arg 'room.schemaLocation', "$projectDir/schemas"
}
}

buildTypes {
Expand All @@ -49,12 +53,6 @@ android {
}
}

kotlin {
jvmToolchain(17)
}
kotlinOptions {
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'
}
buildFeatures {
compose true
}
Expand Down Expand Up @@ -96,3 +94,12 @@ dependencies {
androidTestImplementation libs.androidx.test.rules
androidTestImplementation libs.androidx.test.extJunit
}

ksp {
arg 'room.incremental', 'true'
arg 'room.generateKotlin', 'true'
}

room {
schemaDirectory "$projectDir/schemas"
}
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ kspPlugin = "1.9.10-1.0.13" # Must be "$kotlin-$ksp"
composeCompiler = "1.5.3"
hilt = "2.48.1"
lifecycle = "2.6.2"
room = "2.5.2"
room = "2.6.0"


[libraries]
Expand Down Expand Up @@ -40,3 +40,4 @@ android-application = "com.android.application:8.1.2"
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
google-dagger-hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
google-devtools-ksp = { id = "com.google.devtools.ksp", version.ref = "kspPlugin" }
androidx-room = { id = "androidx.room", version.ref = "room" }

0 comments on commit a3d2494

Please sign in to comment.