From 72c23a2ee4b22f90a742798afa6c2ad36a85d424 Mon Sep 17 00:00:00 2001 From: Mahdi Hosseinzadeh Date: Thu, 4 Jul 2024 21:43:43 +0330 Subject: [PATCH] Update libraries --- .gitignore | 1 + build.gradle.kts | 1 + gradle/libs.versions.toml | 29 ++++++++++--------- library/build.gradle.kts | 1 + showcase/androidApp/build.gradle.kts | 1 + showcase/desktopApp/build.gradle.kts | 1 + showcase/jsApp/build.gradle.kts | 1 + showcase/shared/build.gradle.kts | 1 + .../kotlin/comshot/showcase/main.android.kt | 3 +- .../commonMain/kotlin/comshot/showcase/App.kt | 3 +- showcase/wasmJsApp/build.gradle.kts | 1 + 11 files changed, 27 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 1a03b4c..8e2790d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /local.properties /.idea .DS_Store +.kotlin/ build/ /captures .externalNativeBuild diff --git a/build.gradle.kts b/build.gradle.kts index 6da9a60..8bf3660 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,6 +2,7 @@ plugins { alias(libs.plugins.compose.multiplatform) apply false alias(libs.plugins.kotlin.multiplatform) apply false alias(libs.plugins.kotlin.compatibility) apply false + alias(libs.plugins.kotlin.compose) apply false alias(libs.plugins.android.application) apply false alias(libs.plugins.android.library) apply false alias(libs.plugins.dokka) apply false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b6a09fa..2671a24 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,22 +1,22 @@ [versions] -gradle = "8.6" -java = "17" -kotlin = "1.9.22" +gradle = "8.8" +java = "21" +kotlin = "2.0.0" kotlin-compatibility = "0.14.0" -compose-multiplatform = "1.6.0-beta02" -agp = "8.2.2" # Android Gradle plugin +compose-multiplatform = "1.6.11" +agp = "8.3.2" # Android Gradle plugin android-minSdk = "21" android-compileSdk = "34" android-targetSdk = "34" -androidx-activityCompose = "1.8.2" -androidx-core = "1.12.0" -androidx-appcompat = "1.6.1" -androidx-compose-ui = "1.6.1" -androidx-lifecycle = "2.7.0" -androidx-test-core = "1.5.0" -androidx-test-junit = "1.1.5" -skiko = "0.7.92" -dokka = "1.9.10" +androidx-activityCompose = "1.9.0" +androidx-core = "1.13.1" +androidx-appcompat = "1.7.0" +androidx-compose-ui = "1.6.8" +androidx-lifecycle = "2.8.3" +androidx-test-core = "1.6.1" +androidx-test-junit = "1.2.1" +skiko = "0.8.9" +dokka = "1.9.20" junit4 = "4.13.2" [libraries] @@ -37,6 +37,7 @@ junit4 = { group = "junit", name = "junit", version.ref = "junit4" } compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "compose-multiplatform" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } kotlin-compatibility = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlin-compatibility" } +kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } android-application = { id = "com.android.application", version.ref = "agp" } android-library = { id = "com.android.library", version.ref = "agp" } dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } diff --git a/library/build.gradle.kts b/library/build.gradle.kts index 13b6e5b..bc830d0 100644 --- a/library/build.gradle.kts +++ b/library/build.gradle.kts @@ -8,6 +8,7 @@ import java.util.* plugins { alias(libs.plugins.kotlin.multiplatform) alias(libs.plugins.kotlin.compatibility) + alias(libs.plugins.kotlin.compose) alias(libs.plugins.compose.multiplatform) alias(libs.plugins.android.library) alias(libs.plugins.dokka) diff --git a/showcase/androidApp/build.gradle.kts b/showcase/androidApp/build.gradle.kts index 58fd251..7b6730f 100644 --- a/showcase/androidApp/build.gradle.kts +++ b/showcase/androidApp/build.gradle.kts @@ -1,5 +1,6 @@ plugins { alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.kotlin.compose) alias(libs.plugins.compose.multiplatform) alias(libs.plugins.android.application) } diff --git a/showcase/desktopApp/build.gradle.kts b/showcase/desktopApp/build.gradle.kts index 9b4d57c..2e1ad43 100644 --- a/showcase/desktopApp/build.gradle.kts +++ b/showcase/desktopApp/build.gradle.kts @@ -2,6 +2,7 @@ import org.jetbrains.compose.desktop.application.dsl.TargetFormat plugins { alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.kotlin.compose) alias(libs.plugins.compose.multiplatform) } diff --git a/showcase/jsApp/build.gradle.kts b/showcase/jsApp/build.gradle.kts index 1c594a1..5c02661 100644 --- a/showcase/jsApp/build.gradle.kts +++ b/showcase/jsApp/build.gradle.kts @@ -1,5 +1,6 @@ plugins { alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.kotlin.compose) alias(libs.plugins.compose.multiplatform) } diff --git a/showcase/shared/build.gradle.kts b/showcase/shared/build.gradle.kts index 847f83a..0449d7a 100644 --- a/showcase/shared/build.gradle.kts +++ b/showcase/shared/build.gradle.kts @@ -2,6 +2,7 @@ import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl plugins { alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.kotlin.compose) alias(libs.plugins.compose.multiplatform) alias(libs.plugins.android.library) // kotlin("native.cocoapods") diff --git a/showcase/shared/src/androidMain/kotlin/comshot/showcase/main.android.kt b/showcase/shared/src/androidMain/kotlin/comshot/showcase/main.android.kt index d4e9cb3..8b67aca 100644 --- a/showcase/shared/src/androidMain/kotlin/comshot/showcase/main.android.kt +++ b/showcase/shared/src/androidMain/kotlin/comshot/showcase/main.android.kt @@ -20,6 +20,7 @@ import org.jetbrains.compose.resources.painterResource import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds import kotlin.time.measureTimedValue +import comshot.showcase.shared.generated.resources.Photo_by_Lucas_Chizzali_on_Unsplash @OptIn(ExperimentalResourceApi::class) @Composable @@ -41,7 +42,7 @@ fun Activity.MainView() { Text(text = "!".repeat(padding)) Column(horizontalAlignment = Alignment.CenterHorizontally) { Image( - painter = painterResource(Res.drawable.photo_by_lucas_chizzali_on_unsplash), + painter = painterResource(Res.drawable.Photo_by_Lucas_Chizzali_on_Unsplash), modifier = Modifier.size(200.dp), contentDescription = null ) diff --git a/showcase/shared/src/commonMain/kotlin/comshot/showcase/App.kt b/showcase/shared/src/commonMain/kotlin/comshot/showcase/App.kt index 0c72898..2a00c1c 100644 --- a/showcase/shared/src/commonMain/kotlin/comshot/showcase/App.kt +++ b/showcase/shared/src/commonMain/kotlin/comshot/showcase/App.kt @@ -19,6 +19,7 @@ import org.jetbrains.compose.resources.painterResource import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds import kotlin.time.measureTimedValue +import comshot.showcase.shared.generated.resources.Photo_by_Lucas_Chizzali_on_Unsplash @OptIn(ExperimentalResourceApi::class) @Composable @@ -40,7 +41,7 @@ fun App() { Text(text = "!".repeat(padding)) Column(horizontalAlignment = Alignment.CenterHorizontally) { Image( - painter = painterResource(Res.drawable.photo_by_lucas_chizzali_on_unsplash), + painter = painterResource(Res.drawable.Photo_by_Lucas_Chizzali_on_Unsplash), modifier = Modifier.size(200.dp), contentDescription = null ) diff --git a/showcase/wasmJsApp/build.gradle.kts b/showcase/wasmJsApp/build.gradle.kts index 4b9d0f8..fa393bb 100644 --- a/showcase/wasmJsApp/build.gradle.kts +++ b/showcase/wasmJsApp/build.gradle.kts @@ -2,6 +2,7 @@ import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl plugins { alias(libs.plugins.kotlin.multiplatform) + alias(libs.plugins.kotlin.compose) alias(libs.plugins.compose.multiplatform) }