Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Kotlin, KSP and Compose to v2 (major) #2050

Merged
merged 4 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ bin/
gen-external-apklibs/
local.properties
out/

# Kotlin project ignores
.kotlin/
3 changes: 1 addition & 2 deletions build-logic/src/main/kotlin/AndroidConfiguration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ private fun BaseExtension.configureCompilerOptions(project: Project) {
// context(Project)
fun CommonExtension<*, *, *, *, *, *>.configureCompose(project: Project) {
buildFeatures.compose = true
composeOptions.kotlinCompilerExtensionVersion =
project.libs.findVersion("androidx-compose-compiler").get().requiredVersion
project.pluginManager.apply("org.jetbrains.kotlin.plugin.compose")

project.dependencies.apply {
// the runtime dependency is required to build a library when compose is enabled
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id("build-logic")
alias(libs.plugins.compose.compiler).apply(false)
alias(libs.plugins.ktlint)
}

Expand Down
7 changes: 3 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ android-gradle-plugin = "8.7.0"
androidx-arch-core = "2.2.0"
androidx-collection = "1.4.4"
androidx-compose = "1.7.3"
androidx-compose-compiler = "1.5.15"
androidx-compose-ui = "1.7.3"
androidx-core = "1.13.1"
androidx-fragment = "1.8.4"
Expand All @@ -15,7 +14,7 @@ dagger = "2.52"
hamcrest = "2.2"
jsonUnit = "3.4.1"
jvm = "17"
kotlin = "1.9.25"
kotlin = "2.0.20"
kotlinCoroutines = "1.9.0"
ktlint = "1.3.1"
ktlintGradle = "12.1.1"
Expand Down Expand Up @@ -128,7 +127,6 @@ turbine = "app.cash.turbine:turbine:1.1.0"
weakdelegate = { module = "com.github.Karumi:WeakDelegate", version = "1.0.1" }

# HACK: dependencies used to trigger renovate upgrades
androidx-compose-compiler = { module = "androidx.compose.compiler:compiler", version.ref = "androidx-compose-compiler" }
ktlint = { module = "com.pinterest.ktlint:ktlint-cli", version.ref = "ktlint" }

[bundles]
Expand All @@ -138,7 +136,8 @@ ktlint-rulesets = ["ktlint-rules-compose"]
okhttp3-mockwebserver = ["okhttp3-mockwebserver", "okhttp3-tls"]

[plugins]
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
dagger-hilt = { id = "com.google.dagger.hilt.android", version.ref = "dagger" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version = "1.9.25-1.0.20" }
ksp = { id = "com.google.devtools.ksp", version = "2.0.20-1.0.25" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlintGradle" }
Loading