Skip to content

Commit 7e03b1a

Browse files
committed
Update to v2
1 parent 1f302ef commit 7e03b1a

21 files changed

+195
-141
lines changed

step2/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ plugins {
55
alias(libs.plugins.androidLibrary) apply false
66
alias(libs.plugins.jetbrainsCompose) apply false
77
alias(libs.plugins.kotlinMultiplatform) apply false
8+
alias(libs.plugins.compose.compiler) apply false
89
}

step2/composeApp/build.gradle.kts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
import org.jetbrains.compose.ExperimentalComposeLibrary
21
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
2+
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
3+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
34

45
plugins {
56
alias(libs.plugins.kotlinMultiplatform)
67
alias(libs.plugins.androidApplication)
78
alias(libs.plugins.jetbrainsCompose)
9+
alias(libs.plugins.compose.compiler)
810
}
911

1012
kotlin {
1113
androidTarget {
12-
compilations.all {
13-
kotlinOptions {
14-
jvmTarget = "1.8"
15-
}
14+
@OptIn(ExperimentalKotlinGradlePluginApi::class)
15+
compilerOptions {
16+
jvmTarget.set(JvmTarget.JVM_11)
1617
}
1718
}
1819

@@ -60,8 +61,8 @@ android {
6061
}
6162
}
6263
compileOptions {
63-
sourceCompatibility = JavaVersion.VERSION_1_8
64-
targetCompatibility = JavaVersion.VERSION_1_8
64+
sourceCompatibility = JavaVersion.VERSION_11
65+
targetCompatibility = JavaVersion.VERSION_11
6566
}
6667
dependencies {
6768
debugImplementation(libs.compose.ui.tooling)

step2/gradle/libs.versions.toml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
[versions]
2-
agp = "8.1.4"
2+
agp = "8.2.2"
33
android-compileSdk = "34"
44
android-minSdk = "24"
55
android-targetSdk = "34"
6-
androidx-activityCompose = "1.8.2"
7-
androidx-appcompat = "1.6.1"
6+
androidx-activityCompose = "1.9.0"
7+
androidx-appcompat = "1.7.0"
88
androidx-constraintlayout = "2.1.4"
9-
androidx-core-ktx = "1.12.0"
10-
androidx-espresso-core = "3.5.1"
11-
androidx-material = "1.10.0"
12-
androidx-test-junit = "1.1.5"
13-
compose = "1.5.4"
14-
compose-compiler = "1.5.6"
15-
compose-plugin = "1.5.11"
9+
androidx-core-ktx = "1.13.1"
10+
androidx-espresso-core = "3.6.1"
11+
androidx-material = "1.12.0"
12+
androidx-test-junit = "1.2.1"
13+
compose = "1.6.8"
14+
compose-plugin = "1.6.11"
1615
junit = "4.13.2"
17-
kotlin = "1.9.21"
16+
kotlin = "2.0.0"
1817

1918
[libraries]
2019
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
@@ -27,14 +26,12 @@ androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version
2726
androidx-material = { group = "com.google.android.material", name = "material", version.ref = "androidx-material" }
2827
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout" }
2928
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
30-
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
3129
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
3230
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
33-
compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
34-
compose-material = { module = "androidx.compose.material:material", version.ref = "compose" }
3531

3632
[plugins]
3733
androidApplication = { id = "com.android.application", version.ref = "agp" }
3834
androidLibrary = { id = "com.android.library", version.ref = "agp" }
3935
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
40-
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
36+
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
37+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

step2/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

step3/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ plugins {
55
alias(libs.plugins.androidLibrary) apply false
66
alias(libs.plugins.jetbrainsCompose) apply false
77
alias(libs.plugins.kotlinMultiplatform) apply false
8+
alias(libs.plugins.compose.compiler) apply false
89
}

step3/composeApp/build.gradle.kts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
import org.jetbrains.compose.ExperimentalComposeLibrary
21
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
2+
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
3+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
34

45
plugins {
56
alias(libs.plugins.kotlinMultiplatform)
67
alias(libs.plugins.androidApplication)
78
alias(libs.plugins.jetbrainsCompose)
9+
alias(libs.plugins.compose.compiler)
810
}
911

1012
kotlin {
1113
androidTarget {
12-
compilations.all {
13-
kotlinOptions {
14-
jvmTarget = "1.8"
15-
}
14+
@OptIn(ExperimentalKotlinGradlePluginApi::class)
15+
compilerOptions {
16+
jvmTarget.set(JvmTarget.JVM_11)
1617
}
1718
}
1819

@@ -27,7 +28,6 @@ kotlin {
2728
implementation(compose.foundation)
2829
implementation(compose.material)
2930
implementation(compose.ui)
30-
@OptIn(ExperimentalComposeLibrary::class)
3131
implementation(compose.components.resources)
3232
implementation(projects.shared)
3333
}
@@ -60,8 +60,8 @@ android {
6060
}
6161
}
6262
compileOptions {
63-
sourceCompatibility = JavaVersion.VERSION_1_8
64-
targetCompatibility = JavaVersion.VERSION_1_8
63+
sourceCompatibility = JavaVersion.VERSION_11
64+
targetCompatibility = JavaVersion.VERSION_11
6565
}
6666
dependencies {
6767
debugImplementation(libs.compose.ui.tooling)

step3/gradle/libs.versions.toml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
[versions]
2-
agp = "8.1.4"
2+
agp = "8.2.2"
33
android-compileSdk = "34"
44
android-minSdk = "24"
55
android-targetSdk = "34"
6-
androidx-activityCompose = "1.8.2"
7-
androidx-appcompat = "1.6.1"
6+
androidx-activityCompose = "1.9.0"
7+
androidx-appcompat = "1.7.0"
88
androidx-constraintlayout = "2.1.4"
9-
androidx-core-ktx = "1.12.0"
10-
androidx-espresso-core = "3.5.1"
11-
androidx-material = "1.10.0"
12-
androidx-test-junit = "1.1.5"
13-
compose = "1.5.4"
14-
compose-compiler = "1.5.6"
15-
compose-plugin = "1.5.11"
9+
androidx-core-ktx = "1.13.1"
10+
androidx-espresso-core = "3.6.1"
11+
androidx-material = "1.12.0"
12+
androidx-test-junit = "1.2.1"
13+
compose = "1.6.8"
14+
compose-plugin = "1.6.11"
1615
junit = "4.13.2"
17-
kotlin = "1.9.21"
16+
kotlin = "2.0.0"
1817

1918
[libraries]
2019
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
@@ -27,14 +26,12 @@ androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version
2726
androidx-material = { group = "com.google.android.material", name = "material", version.ref = "androidx-material" }
2827
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout" }
2928
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
30-
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
3129
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
3230
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
33-
compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
34-
compose-material = { module = "androidx.compose.material:material", version.ref = "compose" }
3531

3632
[plugins]
3733
androidApplication = { id = "com.android.application", version.ref = "agp" }
3834
androidLibrary = { id = "com.android.library", version.ref = "agp" }
3935
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
40-
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
36+
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
37+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

step4/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ plugins {
55
alias(libs.plugins.androidLibrary) apply false
66
alias(libs.plugins.jetbrainsCompose) apply false
77
alias(libs.plugins.kotlinMultiplatform) apply false
8+
alias(libs.plugins.compose.compiler) apply false
89
}

step4/composeApp/build.gradle.kts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
import org.jetbrains.compose.ExperimentalComposeLibrary
22
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
3+
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
4+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
35

46
plugins {
57
alias(libs.plugins.kotlinMultiplatform)
68
alias(libs.plugins.androidApplication)
79
alias(libs.plugins.jetbrainsCompose)
10+
alias(libs.plugins.compose.compiler)
811
}
912

1013
kotlin {
1114
androidTarget {
12-
compilations.all {
13-
kotlinOptions {
14-
jvmTarget = "1.8"
15-
}
15+
@OptIn(ExperimentalKotlinGradlePluginApi::class)
16+
compilerOptions {
17+
jvmTarget.set(JvmTarget.JVM_11)
1618
}
1719
}
1820

@@ -60,8 +62,8 @@ android {
6062
}
6163
}
6264
compileOptions {
63-
sourceCompatibility = JavaVersion.VERSION_1_8
64-
targetCompatibility = JavaVersion.VERSION_1_8
65+
sourceCompatibility = JavaVersion.VERSION_11
66+
targetCompatibility = JavaVersion.VERSION_11
6567
}
6668
dependencies {
6769
debugImplementation(libs.compose.ui.tooling)

step4/gradle/libs.versions.toml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@ agp = "8.1.4"
33
android-compileSdk = "34"
44
android-minSdk = "24"
55
android-targetSdk = "34"
6-
androidx-activityCompose = "1.8.2"
7-
androidx-appcompat = "1.6.1"
6+
androidx-activityCompose = "1.9.0"
7+
androidx-appcompat = "1.7.0"
88
androidx-constraintlayout = "2.1.4"
9-
androidx-core-ktx = "1.12.0"
10-
androidx-espresso-core = "3.5.1"
11-
androidx-material = "1.10.0"
12-
androidx-test-junit = "1.1.5"
13-
compose = "1.5.4"
9+
androidx-core-ktx = "1.13.1"
10+
androidx-espresso-core = "3.6.1"
11+
androidx-material = "1.12.0"
12+
androidx-test-junit = "1.2.1"
13+
compose = "1.6.8"
1414
compose-compiler = "1.5.6"
15-
compose-plugin = "1.5.11"
15+
compose-plugin = "1.6.11"
1616
junit = "4.13.2"
17-
kotlin = "1.9.21"
17+
kotlin = "2.0.0"
18+
kotlinxDatetime = "0.6.0"
1819

1920
[libraries]
2021
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
@@ -32,9 +33,11 @@ compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref =
3233
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
3334
compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
3435
compose-material = { module = "androidx.compose.material:material", version.ref = "compose" }
36+
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinxDatetime" }
3537

3638
[plugins]
3739
androidApplication = { id = "com.android.application", version.ref = "agp" }
3840
androidLibrary = { id = "com.android.library", version.ref = "agp" }
3941
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
40-
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
42+
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
43+
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

0 commit comments

Comments
 (0)