Skip to content

Commit

Permalink
fix(deps): Upgrade Kotlin from v1.7 to v1.9 (#53)
Browse files Browse the repository at this point in the history
This also required the following:

- Upgrade Android Gradle Plugin (AGP) to v8.1
- Replace integration of Room with KAPT with KSP.
  • Loading branch information
gnarea authored Sep 19, 2023
1 parent 4cf34c8 commit f5bae24
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
20 changes: 9 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'com.google.devtools.ksp'
id 'com.google.dagger.hilt.android'
id 'org.jlleitschuh.gradle.ktlint' version '11.5.1'
}
Expand All @@ -21,12 +22,6 @@ android {
vectorDrawables {
useSupportLibrary true
}

javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}

buildTypes {
Expand All @@ -48,18 +43,18 @@ android {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.3.2'
kotlinCompilerExtensionVersion '1.5.3'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
lintOptions {
checkAllWarnings true
warningsAsErrors true
lint {
abortOnError true
checkAllWarnings true
lintConfig file('lint.xml')
warningsAsErrors true
}
}

Expand Down Expand Up @@ -94,7 +89,7 @@ dependencies {
// Room
def room_version = "2.5.2"
implementation "androidx.room:room-ktx:$room_version"
kapt "androidx.room:room-compiler:$room_version"
ksp "androidx.room:room-compiler:$room_version"
androidTestImplementation "androidx.room:room-testing:$room_version"

// Utils:
Expand All @@ -114,6 +109,9 @@ dependencies {
kapt {
correctErrorTypes true
}
ksp {
arg('room.schemaLocation', "$projectDir/schemas")
}

ktlint {
version.set("0.49.1")
Expand Down
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.android.library' version '8.0.2' apply false
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
id 'com.android.application' version '8.1.1' apply false
id 'com.android.library' version '8.1.1' apply false
id 'org.jetbrains.kotlin.android' version '1.9.10' apply false
id 'com.google.devtools.ksp' version '1.9.10-1.0.13' apply false
id 'com.google.dagger.hilt.android' version '2.48' apply false
}

0 comments on commit f5bae24

Please sign in to comment.