Skip to content

Commit 7f2782b

Browse files
author
wangzhengqi
committed
update kotlin -> 2.0
1 parent f8ded2c commit 7f2782b

File tree

6 files changed

+18
-7
lines changed

6 files changed

+18
-7
lines changed

app/build.gradle.kts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ plugins {
88
alias(libs.plugins.kotlin.serialization)
99
alias(libs.plugins.kotlin.parcelize)
1010

11+
alias(libs.plugins.compose.compiler)
1112
alias(libs.plugins.androidx.room)
1213
}
1314

@@ -52,16 +53,21 @@ android {
5253
buildFeatures {
5354
compose = true
5455
}
55-
composeOptions {
56-
kotlinCompilerExtensionVersion = "1.5.4"
57-
}
56+
5857
packaging {
5958
resources {
6059
excludes += "/META-INF/{AL2.0,LGPL2.1}"
6160
}
6261
}
6362
}
6463

64+
composeCompiler {
65+
enableStrongSkippingMode = true
66+
67+
reportsDestination = layout.buildDirectory.dir("compose_compiler")
68+
stabilityConfigurationFile = rootProject.layout.projectDirectory.file("stability_config.conf")
69+
}
70+
6571
dependencies {
6672
implementation(libs.core.ktx)
6773
implementation(libs.lifecycle.compose)

app/src/main/java/com/wzq/jd/compose/app/data/model/Categories.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import android.os.Parcelable
44
import androidx.room.Entity
55
import androidx.room.Ignore
66
import androidx.room.PrimaryKey
7+
import kotlinx.parcelize.IgnoredOnParcel
78
import kotlinx.parcelize.Parcelize
89
import kotlinx.serialization.Serializable
910

@@ -27,5 +28,6 @@ data class Categories(
2728
) : Parcelable {
2829

2930
@Ignore
31+
@IgnoredOnParcel
3032
var children: List<Categories> = emptyList()
3133
}

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ plugins {
99
alias(libs.plugins.kotlin.serialization) apply false
1010
alias(libs.plugins.kotlin.parcelize) apply false
1111

12+
alias(libs.plugins.compose.compiler) apply false
1213
alias(libs.plugins.androidx.room) apply false
1314
}
1415
true

gradle/libs.versions.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[versions]
22
#@plugin
3-
agp = "8.2.0"
4-
kotlin = "1.9.20"
5-
ksp = "1.9.10-1.0.13"
3+
agp = "8.4.1"
4+
kotlin = "2.0.0"
5+
ksp = "2.0.0-1.0.21"
66

77
core-ktx = "1.12.0"
88
lifecycle = "2.6.2"
@@ -62,6 +62,8 @@ kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref =
6262
google-ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
6363
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
6464

65+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
66+
6567
androidx-room = { id = "androidx.room", version.ref = "room" }
6668

6769
[bundles]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Mon Dec 11 15:36:55 CST 2023
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

stability_config.conf

Whitespace-only changes.

0 commit comments

Comments
 (0)