Skip to content

Commit

Permalink
Update Kotlin and KSP versions and migrate to Compose gradle plugin
Browse files Browse the repository at this point in the history
* Bump Kotlin and KSP versions to 2.0.0

* Remove the androidxComposeCompiler version and its usage

* Add Compose compiler plugin in build.gradle.kts files
  • Loading branch information
jsytal1 committed Jul 17, 2024
1 parent 83e7c2e commit cc6d4be
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
5 changes: 1 addition & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ plugins {
alias(libs.plugins.hilt.gradle)
alias(libs.plugins.ksp)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.compose.compiler)
}

android {
Expand Down Expand Up @@ -68,10 +69,6 @@ android {
shaders = false
}

composeOptions {
kotlinCompilerExtensionVersion = libs.versions.androidxComposeCompiler.get()
}

packagingOptions {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
Expand Down
5 changes: 1 addition & 4 deletions core-ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.compose.compiler)
}

android {
Expand All @@ -39,10 +40,6 @@ android {
shaders = false
}

composeOptions {
kotlinCompilerExtensionVersion = libs.versions.androidxComposeCompiler.get()
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand Down
5 changes: 1 addition & 4 deletions feature-mymodel/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.compose.compiler)
}

android {
Expand All @@ -40,10 +41,6 @@ android {
shaders = false
}

composeOptions {
kotlinCompilerExtensionVersion = libs.versions.androidxComposeCompiler.get()
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand Down
7 changes: 3 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
androidGradlePlugin = "8.4.0"
androidxActivity = "1.9.0"
androidxComposeBom = "2024.05.00"
androidxComposeCompiler = "1.5.14"
androidxCore = "1.13.1"
androidxHilt = "1.2.0"
androidxLifecycle = "2.7.0"
Expand All @@ -14,13 +13,12 @@ androidxTestRunner = "1.5.2"
coroutines = "1.8.1"
hilt = "2.51.1"
junit = "4.13.2"
kotlin = "1.9.24"
ksp = "1.9.24-1.0.20"
kotlin = "2.0.0"
ksp = "2.0.0-1.0.23"

[libraries]
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidxActivity" }
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "androidxComposeBom" }
androidx-compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "androidxComposeCompiler" }
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3"}
androidx-compose-ui = { group = "androidx.compose.ui", name = "ui"}
androidx-compose-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4"}
Expand Down Expand Up @@ -52,6 +50,7 @@ kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-t
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
android-test = { id = "com.android.test", version.ref = "androidGradlePlugin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
hilt-gradle = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
Expand Down

0 comments on commit cc6d4be

Please sign in to comment.