diff --git a/components/AnimatedImage/demo/build.gradle.kts b/components/AnimatedImage/demo/build.gradle.kts index 6c36cc912b..cdbf81018d 100644 --- a/components/AnimatedImage/demo/build.gradle.kts +++ b/components/AnimatedImage/demo/build.gradle.kts @@ -11,11 +11,9 @@ kotlin { optIn("kotlin.RequiresOptIn") } } - val jvmMain by getting { - dependencies { - implementation(compose.desktop.currentOs) - implementation(project(":AnimatedImage:library")) - } + jvmMain.dependencies { + implementation(compose.desktop.currentOs) + implementation(project(":AnimatedImage:library")) } } } diff --git a/components/AnimatedImage/library/build.gradle.kts b/components/AnimatedImage/library/build.gradle.kts index be3889bb81..83f9c283b3 100644 --- a/components/AnimatedImage/library/build.gradle.kts +++ b/components/AnimatedImage/library/build.gradle.kts @@ -12,11 +12,9 @@ kotlin { optIn("kotlin.RequiresOptIn") } } - val commonMain by getting { - dependencies { - api(compose.runtime) - api(compose.foundation) - } + commonMain.dependencies { + api(compose.runtime) + api(compose.foundation) } } } diff --git a/components/SplitPane/demo/build.gradle.kts b/components/SplitPane/demo/build.gradle.kts index 8ef6caaa6b..689e34c821 100644 --- a/components/SplitPane/demo/build.gradle.kts +++ b/components/SplitPane/demo/build.gradle.kts @@ -1,5 +1,3 @@ -import org.jetbrains.compose.compose - plugins { kotlin("multiplatform") id("org.jetbrains.compose") @@ -14,11 +12,9 @@ kotlin { } } - val jvmMain by getting { - dependencies { - implementation(compose.desktop.currentOs) - implementation(project(":SplitPane:library")) - } + jvmMain.dependencies { + implementation(compose.desktop.currentOs) + implementation(project(":SplitPane:library")) } } } diff --git a/components/SplitPane/library/build.gradle.kts b/components/SplitPane/library/build.gradle.kts index 4b3891c1ff..3f0479e9f4 100644 --- a/components/SplitPane/library/build.gradle.kts +++ b/components/SplitPane/library/build.gradle.kts @@ -14,11 +14,9 @@ kotlin { } } - val commonMain by getting { - dependencies { - api(compose.runtime) - api(compose.foundation) - } + commonMain.dependencies { + api(compose.runtime) + api(compose.foundation) } } } diff --git a/components/gradle.properties b/components/gradle.properties index 1cb2d03b60..bc747d85a8 100644 --- a/components/gradle.properties +++ b/components/gradle.properties @@ -1,13 +1,13 @@ #Gradle org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M" org.gradle.caching=true -#org.gradle.configuration-cache=true //stable since kotlin 1.9.20 +org.gradle.configuration-cache=true #Android android.useAndroidX=true #Versions -kotlin.version=1.9.21 +kotlin.version=1.9.22 compose.version=1.6.0-dev1397 agp.version=8.1.2 @@ -23,5 +23,4 @@ kotlin.code.style=official kotlin.js.compiler=ir kotlin.js.webpack.major.version=4 kotlin.native.useEmbeddableCompilerJar=true -kotlin.native.binary.memoryModel=experimental xcodeproj=./resources/demo/iosApp diff --git a/components/gradle/libs.versions.toml b/components/gradle/libs.versions.toml index 8eaf2cf157..39edcda408 100644 --- a/components/gradle/libs.versions.toml +++ b/components/gradle/libs.versions.toml @@ -1,7 +1,16 @@ [versions] -kotlinx-coroutines = "1.8.0-RC" +kotlinx-coroutines = "1.8.0-RC2" +androidx-appcompat = "1.6.1" +androidx-activity-compose = "1.8.2" +androidx-test = "1.5.0" +androidx-compose = "1.6.0" [libraries] kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } -kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "kotlinx-coroutines" } -kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" } \ No newline at end of file +kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" } +androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" } +androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" } +androidx-test-core = { module = "androidx.test:core", version.ref = "androidx-test" } +androidx-compose-ui-test = { module = "androidx.compose.ui:ui-test", version.ref = "androidx-compose" } +androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "androidx-compose" } +androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "androidx-compose" } \ No newline at end of file diff --git a/components/gradle/wrapper/gradle-wrapper.properties b/components/gradle/wrapper/gradle-wrapper.properties index e411586a54..a595206642 100644 --- a/components/gradle/wrapper/gradle-wrapper.properties +++ b/components/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/components/resources/demo/androidApp/build.gradle.kts b/components/resources/demo/androidApp/build.gradle.kts index 122f5e1123..bf0d6c00a0 100644 --- a/components/resources/demo/androidApp/build.gradle.kts +++ b/components/resources/demo/androidApp/build.gradle.kts @@ -19,10 +19,10 @@ android { targetCompatibility = JavaVersion.VERSION_11 } dependencies { + implementation(compose.ui) + implementation(compose.foundation) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.activity.compose) implementation(project(":resources:demo:shared")) - implementation("androidx.appcompat:appcompat:1.6.1") - implementation("androidx.activity:activity-compose:1.8.0") - implementation("androidx.compose.foundation:foundation:1.5.3") - implementation("androidx.compose.ui:ui:1.5.3") } } diff --git a/components/resources/demo/desktopApp/build.gradle.kts b/components/resources/demo/desktopApp/build.gradle.kts index 279ae99206..a5e5ecd7f3 100644 --- a/components/resources/demo/desktopApp/build.gradle.kts +++ b/components/resources/demo/desktopApp/build.gradle.kts @@ -6,11 +6,9 @@ plugins { kotlin { jvm() sourceSets { - val jvmMain by getting { - dependencies { - implementation(compose.desktop.currentOs) - implementation(project(":resources:demo:shared")) - } + jvmMain.dependencies { + implementation(compose.desktop.currentOs) + implementation(project(":resources:demo:shared")) } } } diff --git a/components/resources/demo/shared/build.gradle.kts b/components/resources/demo/shared/build.gradle.kts index af97e41f33..fd6510bd45 100644 --- a/components/resources/demo/shared/build.gradle.kts +++ b/components/resources/demo/shared/build.gradle.kts @@ -1,4 +1,3 @@ -import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl plugins { @@ -8,8 +7,6 @@ plugins { } kotlin { - @OptIn(ExperimentalKotlinGradlePluginApi::class) - targetHierarchy.default() androidTarget { compilations.all { kotlinOptions { @@ -59,17 +56,14 @@ kotlin { optIn("org.jetbrains.compose.resources.ExperimentalResourceApi") } } - val commonMain by getting { - dependencies { - implementation(compose.runtime) - implementation(compose.material3) - implementation(project(":resources:library")) - } + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.material3) + implementation(project(":resources:library")) } - val desktopMain by getting { - dependencies { - implementation(compose.desktop.common) - } + val desktopMain by getting + desktopMain.dependencies { + implementation(compose.desktop.common) } } } @@ -89,8 +83,3 @@ android { compose.experimental { web.application {} } - -// TODO: remove this block after we update on a newer kotlin. Currently there is an error: `error:0308010C:digital envelope routines::unsupported` -rootProject.plugins.withType { - rootProject.the().nodeVersion = "16.0.0" -} \ No newline at end of file diff --git a/components/resources/library/build.gradle.kts b/components/resources/library/build.gradle.kts index 4834fb33e5..1e563934c5 100644 --- a/components/resources/library/build.gradle.kts +++ b/components/resources/library/build.gradle.kts @@ -12,8 +12,6 @@ plugins { val composeVersion = extra["compose.version"] as String kotlin { - @OptIn(ExperimentalKotlinGradlePluginApi::class) - targetHierarchy.default() jvm("desktop") androidTarget { publishLibraryVariants("release") @@ -48,6 +46,7 @@ kotlin { macosX64() macosArm64() + applyDefaultHierarchyTemplate() sourceSets { all { languageSettings { @@ -75,8 +74,8 @@ kotlin { } val commonTest by getting { dependencies { - implementation(libs.kotlinx.coroutines.test) implementation(kotlin("test")) + implementation(libs.kotlinx.coroutines.test) implementation(compose.material3) @OptIn(ExperimentalComposeLibrary::class) implementation(compose.uiTest) @@ -96,9 +95,6 @@ kotlin { } val jvmAndAndroidMain by creating { dependsOn(blockingMain) - dependencies { - implementation(compose.material3) - } } val jvmAndAndroidTest by creating { dependsOn(blockingTest) @@ -112,8 +108,6 @@ kotlin { dependsOn(jvmAndAndroidTest) dependencies { implementation(compose.desktop.currentOs) - implementation(compose.desktop.uiTestJUnit4) - implementation(libs.kotlinx.coroutines.swing) } } val androidMain by getting { @@ -122,10 +116,10 @@ kotlin { val androidInstrumentedTest by getting { dependsOn(jvmAndAndroidTest) dependencies { - implementation("androidx.test:core:1.5.0") - implementation("androidx.compose.ui:ui-test-manifest:1.5.4") - implementation("androidx.compose.ui:ui-test:1.5.4") - implementation("androidx.compose.ui:ui-test-junit4:1.5.4") + implementation(libs.androidx.test.core) + implementation(libs.androidx.compose.ui.test) + implementation(libs.androidx.compose.ui.test.manifest) + implementation(libs.androidx.compose.ui.test.junit4) } } val androidUnitTest by getting { diff --git a/components/ui-tooling-preview/demo/desktopApp/build.gradle.kts b/components/ui-tooling-preview/demo/desktopApp/build.gradle.kts index b810e75f0f..1685f83da6 100644 --- a/components/ui-tooling-preview/demo/desktopApp/build.gradle.kts +++ b/components/ui-tooling-preview/demo/desktopApp/build.gradle.kts @@ -6,11 +6,9 @@ plugins { kotlin { jvm() sourceSets { - val jvmMain by getting { - dependencies { - implementation(compose.desktop.currentOs) - implementation(project(":ui-tooling-preview:demo:shared")) - } + jvmMain.dependencies { + implementation(compose.desktop.currentOs) + implementation(project(":ui-tooling-preview:demo:shared")) } } } diff --git a/components/ui-tooling-preview/demo/shared/build.gradle.kts b/components/ui-tooling-preview/demo/shared/build.gradle.kts index f5846f7907..754457c4b0 100644 --- a/components/ui-tooling-preview/demo/shared/build.gradle.kts +++ b/components/ui-tooling-preview/demo/shared/build.gradle.kts @@ -1,5 +1,3 @@ -import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi - plugins { kotlin("multiplatform") id("com.android.library") @@ -7,8 +5,6 @@ plugins { } kotlin { - @OptIn(ExperimentalKotlinGradlePluginApi::class) - targetHierarchy.default() androidTarget { compilations.all { kotlinOptions { @@ -48,17 +44,14 @@ kotlin { } sourceSets { - val commonMain by getting { - dependencies { - implementation(compose.runtime) - implementation(compose.material3) - implementation(project(":ui-tooling-preview:library")) - } + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.material3) + implementation(project(":ui-tooling-preview:library")) } - val desktopMain by getting { - dependencies { - implementation(compose.desktop.common) - } + val desktopMain by getting + desktopMain.dependencies { + implementation(compose.desktop.common) } } } @@ -78,8 +71,3 @@ android { compose.experimental { web.application {} } - -// TODO: remove this block after we update on a newer kotlin. Currently there is an error: `error:0308010C:digital envelope routines::unsupported` -rootProject.plugins.withType { - rootProject.the().nodeVersion = "16.0.0" -} \ No newline at end of file diff --git a/components/ui-tooling-preview/library/build.gradle.kts b/components/ui-tooling-preview/library/build.gradle.kts index 3c4d4822b4..e7a7ac4612 100644 --- a/components/ui-tooling-preview/library/build.gradle.kts +++ b/components/ui-tooling-preview/library/build.gradle.kts @@ -9,8 +9,6 @@ plugins { val composeVersion = extra["compose.version"] as String kotlin { - @OptIn(ExperimentalKotlinGradlePluginApi::class) - targetHierarchy.default() jvm("desktop") androidTarget { publishLibraryVariants("release")