Skip to content

Commit

Permalink
chore: kotlin 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed May 22, 2024
1 parent 3f7971b commit 10d174d
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ local.properties
*.keystore

/_assets
/.kotlin
32 changes: 19 additions & 13 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ plugins {
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.google.ksp)
alias(libs.plugins.google.hilt)
alias(libs.plugins.rikka.refine)
Expand Down Expand Up @@ -132,9 +133,6 @@ android {
compose = true
aidl = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
packagingOptions.resources.excludes += setOf(
// https://github.com/Kotlin/kotlinx.coroutines/issues/2023
"META-INF/**", "**/attach_hotspot_windows.dll",
Expand All @@ -146,21 +144,29 @@ android {
"**/custom.config.conf",
"**/custom.config.yaml",
)
configurations.configureEach {
// https://github.com/Kotlin/kotlinx.coroutines/issues/2023
exclude("org.jetbrains.kotlinx", "kotlinx-coroutines-debug")
}

ksp {
arg("room.schemaLocation", "$projectDir/schemas")
arg("room.incremental", "true")
arg("room.generateKotlin", "true")
}
sourceSets.configureEach {
kotlin.srcDir("${layout.buildDirectory.asFile.get()}/generated/ksp/$name/kotlin/")
}
}

configurations.configureEach {
// https://github.com/Kotlin/kotlinx.coroutines/issues/2023
exclude("org.jetbrains.kotlinx", "kotlinx-coroutines-debug")
}

ksp {
arg("room.schemaLocation", "$projectDir/schemas")
arg("room.incremental", "true")
arg("room.generateKotlin", "true")
}

composeCompiler {
// https://developer.android.com/develop/ui/compose/performance/stability/strongskipping?hl=zh-cn
enableStrongSkippingMode = true
reportsDestination = layout.buildDirectory.dir("compose_compiler")
stabilityConfigurationFile = rootProject.layout.projectDirectory.file("stability_config.conf")
}

dependencies {

implementation(project(mapOf("path" to ":selector")))
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ plugins {

alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false

alias(libs.plugins.rikka.refine) apply false
}
Expand Down
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[versions]
kotlin = "1.9.23"
ksp = "1.9.23-1.0.19"
kotlin = "2.0.0"
ksp = "2.0.0-1.0.21"
compileSdk = "34"
targetSdk = "34"
buildToolsVersion = "34.0.0"
minSdk = "26"
android = "8.4.0"
android = "8.4.1"
compose = "1.6.7"
composeCompiler = "1.5.13"
rikka = "4.4.0"
room = "2.6.1"
paging = "3.3.0"
Expand Down Expand Up @@ -80,6 +79,7 @@ kotlin_serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi
kotlin_parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
kotlin_multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin_android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin_compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
rikka_refine = { id = "dev.rikka.tools.refine", version.ref = "rikka" }
google_ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
google_hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
1 change: 1 addition & 0 deletions stability_config.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
li.songe.gkd.*

0 comments on commit 10d174d

Please sign in to comment.