From 4084aa8d328cb86646fc044d5111f1a58ab0ddb0 Mon Sep 17 00:00:00 2001 From: Julian Kalinowski Date: Fri, 10 Oct 2025 22:26:49 +0200 Subject: [PATCH 1/3] update to kotlin 2.2.20, update libraries --- README.md | 1 + build-logic/settings.gradle.kts | 1 - gradle/libs.versions.toml | 33 ++++++++++--------- oidc-appsupport/build.gradle.kts | 2 +- sample-app/settings/build.gradle.kts | 6 ++++ sample-app/wasm-js-app/build.gradle.kts | 2 +- .../wasm-js-app/src/wasmJsMain/kotlin/main.kt | 1 + .../src/wasmJsMain/resources/index.html | 2 +- 8 files changed, 28 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 30997d2b..90b32168 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ Library dependency versions: | 0.12.+ | 2.0.20 | 3.0.+ | | 0.13.+ | 2.1.20 | 3.1.+ | | 0.14.0 - 0.15.+ | 2.1.21 | 3.2.+ | +| 0.16.0 | 2.2.20 | 3.3.+ | Note that while the library may work with other kotlin/ktor versions, proceed at your own risk. diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts index 23ccbcea..887927c4 100644 --- a/build-logic/settings.gradle.kts +++ b/build-logic/settings.gradle.kts @@ -1,4 +1,3 @@ - dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) repositories { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index af1b73f4..3eb156a2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,53 +5,54 @@ minSdk = "21" jvmTarget = "17" # https://developer.android.com/build/releases/gradle-plugin#compatibility -agp = "8.10.1" +# https://kotlinlang.org/docs/multiplatform-compatibility-guide.html +agp = "8.11.1" #https://github.com/JetBrains/compose-multiplatform -compose-multiplatform = "1.8.2" -kotlin = "2.1.21" +compose-multiplatform = "1.9.0-rc01" +kotlin = "2.2.20" # https://github.com/google/ksp -ksp = "2.1.21-2.0.1" +ksp = "2.2.20-2.0.3" kotlin-inject = "0.8.0" # https://developer.android.com/jetpack/androidx/releases/activity -androidxActivity = "1.10.1" +androidxActivity = "1.11.0" # https://developer.android.com/jetpack/androidx/releases/appcompat androidxAppCompat = "1.7.1" androidxDataStore = "1.1.7" -coreKtx = "1.16.0" +coreKtx = "1.17.0" #https://developer.android.com/jetpack/androidx/releases/arch-core coreTesting = "2.2.0" kotlinxCoroutines = "1.10.2" -kotlinxSerialization = "1.8.1" +kotlinxSerialization = "1.9.0" # https://github.com/Kotlin/kotlinx-datetime kotlinxDatetime = "0.7.1" # https://github.com/Kotlin/kotlinx-atomicfu -kotlinxAtomicfu = "0.28.0" +kotlinxAtomicfu = "0.29.0" -kotlinxBrowser = "0.3" +kotlinxBrowser = "0.5.0" # https://github.com/slackhq/circuit/releases -circuit = "0.28.1" +circuit = "0.30.0" sqldelight = "2.1.0" -okhttp = "4.12.0" -ktor = "3.2.1" +okhttp = "5.2.1" +ktor = "3.3.1" -nexus-publish-plugin = "1.3.0" +nexus-publish-plugin = "2.0.0" multiplatform-swiftpackage = "2.2.4" swiftklib = "0.6.4" dokka = "1.9.10" # https://developer.android.com/jetpack/androidx/releases/security -securityCryptoKtx = "1.1.0-beta01" +securityCryptoKtx = "1.1.0" assertk = "0.28.1" russhwolf = "1.3.0" -kotlincrypto-hash = "0.7.0" +kotlincrypto-hash = "0.8.0" material-icons = "1.7.3" [libraries] @@ -59,7 +60,7 @@ androidx-activity-compose = { module = "androidx.activity:activity-compose", ver androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidxAppCompat" } androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" } androidx-datastore = { module = "androidx.datastore:datastore-preferences", version.ref = "androidxDataStore" } -androidx-browser = { module = "androidx.browser:browser", version = "1.9.0-rc01" } +androidx-browser = { module = "androidx.browser:browser", version = "1.9.0" } androidx-security-crypto-ktx = { module = "androidx.security:security-crypto-ktx", version.ref = "securityCryptoKtx" } androidx-security-crypto = { module = "androidx.security:security-crypto", version.ref = "securityCryptoKtx" } material-icons-core = { module = "org.jetbrains.compose.material:material-icons-core", version.ref = "material-icons" } diff --git a/oidc-appsupport/build.gradle.kts b/oidc-appsupport/build.gradle.kts index 0a2774b9..e983bb41 100644 --- a/oidc-appsupport/build.gradle.kts +++ b/oidc-appsupport/build.gradle.kts @@ -24,7 +24,7 @@ multiplatformSwiftPackage { } // workaround for https://forums.developer.apple.com/forums/thread/748177, remove once apple fixed it -val fixTask = tasks.create("fixFrameworkPlist") { +val fixTask = tasks.register("fixFrameworkPlist") { val fixTask = this group = "multiplatform-swift-package" afterEvaluate { diff --git a/sample-app/settings/build.gradle.kts b/sample-app/settings/build.gradle.kts index 355f12f1..86ec3a68 100644 --- a/sample-app/settings/build.gradle.kts +++ b/sample-app/settings/build.gradle.kts @@ -20,6 +20,12 @@ kotlin { api(libs.kotlinx.serialization.json) } } + + wasmJsMain { + dependencies { + implementation(libs.kotlinx.browser) + } + } } } diff --git a/sample-app/wasm-js-app/build.gradle.kts b/sample-app/wasm-js-app/build.gradle.kts index 166765c9..cb4c997e 100644 --- a/sample-app/wasm-js-app/build.gradle.kts +++ b/sample-app/wasm-js-app/build.gradle.kts @@ -10,7 +10,7 @@ kotlin { jvm() @OptIn(ExperimentalWasmDsl::class) wasmJs { - moduleName = "wasm-js-app" + outputModuleName = "wasm-js-app" browser { commonWebpackConfig { outputFileName = "wasm-js-app.js" diff --git a/sample-app/wasm-js-app/src/wasmJsMain/kotlin/main.kt b/sample-app/wasm-js-app/src/wasmJsMain/kotlin/main.kt index 7cdb057e..3873097b 100644 --- a/sample-app/wasm-js-app/src/wasmJsMain/kotlin/main.kt +++ b/sample-app/wasm-js-app/src/wasmJsMain/kotlin/main.kt @@ -7,6 +7,7 @@ import org.publicvalue.multiplatform.oidc.appsupport.PlatformCodeAuthFlow @OptIn(ExperimentalComposeUiApi::class, ExperimentalOpenIdConnect::class) fun main() { + @Suppress("DEPRECATION_ERROR") CanvasBasedWindow(canvasElementId = "wasm-js-app") { val currentPath = window.location.pathname when { diff --git a/sample-app/wasm-js-app/src/wasmJsMain/resources/index.html b/sample-app/wasm-js-app/src/wasmJsMain/resources/index.html index 83fda8eb..7618db4e 100644 --- a/sample-app/wasm-js-app/src/wasmJsMain/resources/index.html +++ b/sample-app/wasm-js-app/src/wasmJsMain/resources/index.html @@ -7,6 +7,6 @@ - + \ No newline at end of file From 08fd44acfe0bdd28d5cf39c12c4d1a66afc698ba Mon Sep 17 00:00:00 2001 From: Julian Kalinowski Date: Sat, 11 Oct 2025 10:07:16 +0200 Subject: [PATCH 2/3] fix build --- playground-app/shared/build.gradle.kts | 2 -- playground-app/ui/clientdetail/build.gradle.kts | 3 --- playground-app/ui/clientlist/build.gradle.kts | 3 --- playground-app/ui/common/build.gradle.kts | 2 -- playground-app/ui/idplist/build.gradle.kts | 3 --- playground-app/ui/root/build.gradle.kts | 3 --- 6 files changed, 16 deletions(-) diff --git a/playground-app/shared/build.gradle.kts b/playground-app/shared/build.gradle.kts index c9b46670..67ece412 100644 --- a/playground-app/shared/build.gradle.kts +++ b/playground-app/shared/build.gradle.kts @@ -14,8 +14,6 @@ kotlin { implementation(compose.runtime) implementation(compose.foundation) implementation(compose.material3) - @OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class) - implementation(compose.components.resources) // resources will only work in THIS module! Only one module seems to be supported for now. implementation(libs.kotlin.inject.runtime) diff --git a/playground-app/ui/clientdetail/build.gradle.kts b/playground-app/ui/clientdetail/build.gradle.kts index 9e00009a..71120042 100644 --- a/playground-app/ui/clientdetail/build.gradle.kts +++ b/playground-app/ui/clientdetail/build.gradle.kts @@ -21,9 +21,6 @@ kotlin { implementation(compose.foundation) implementation(compose.materialIconsExtended) implementation(compose.material3) - - @OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class) - implementation(compose.components.resources) } } } diff --git a/playground-app/ui/clientlist/build.gradle.kts b/playground-app/ui/clientlist/build.gradle.kts index 9e994e99..b2fef861 100644 --- a/playground-app/ui/clientlist/build.gradle.kts +++ b/playground-app/ui/clientlist/build.gradle.kts @@ -20,9 +20,6 @@ kotlin { implementation(compose.foundation) implementation(compose.materialIconsExtended) implementation(compose.material3) - - @OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class) - implementation(compose.components.resources) } } } diff --git a/playground-app/ui/common/build.gradle.kts b/playground-app/ui/common/build.gradle.kts index 0ab24938..401a545c 100644 --- a/playground-app/ui/common/build.gradle.kts +++ b/playground-app/ui/common/build.gradle.kts @@ -17,8 +17,6 @@ kotlin { // implementation(compose.material3) implementation(libs.material.icons.core) - @OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class) - implementation(compose.components.resources) } } } diff --git a/playground-app/ui/idplist/build.gradle.kts b/playground-app/ui/idplist/build.gradle.kts index aa0917f1..5403f27a 100644 --- a/playground-app/ui/idplist/build.gradle.kts +++ b/playground-app/ui/idplist/build.gradle.kts @@ -20,9 +20,6 @@ kotlin { implementation(compose.foundation) implementation(compose.materialIconsExtended) implementation(compose.material3) - - @OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class) - implementation(compose.components.resources) } } } diff --git a/playground-app/ui/root/build.gradle.kts b/playground-app/ui/root/build.gradle.kts index e3be1672..e1d9bc88 100644 --- a/playground-app/ui/root/build.gradle.kts +++ b/playground-app/ui/root/build.gradle.kts @@ -18,9 +18,6 @@ kotlin { implementation(compose.foundation) implementation(compose.materialIconsExtended) implementation(compose.material3) - - @OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class) - implementation(compose.components.resources) } } } From a7879dd870cb7755b1942ded3fd9dca9941bcc4d Mon Sep 17 00:00:00 2001 From: Julian Kalinowski Date: Sat, 11 Oct 2025 11:40:27 +0200 Subject: [PATCH 3/3] remove workaround code for Xcode < 15.4 --- oidc-appsupport/build.gradle.kts | 41 -------------------------------- 1 file changed, 41 deletions(-) diff --git a/oidc-appsupport/build.gradle.kts b/oidc-appsupport/build.gradle.kts index e983bb41..3764f5a2 100644 --- a/oidc-appsupport/build.gradle.kts +++ b/oidc-appsupport/build.gradle.kts @@ -23,47 +23,6 @@ multiplatformSwiftPackage { zipFileName("OpenIdConnectClient") } -// workaround for https://forums.developer.apple.com/forums/thread/748177, remove once apple fixed it -val fixTask = tasks.register("fixFrameworkPlist") { - val fixTask = this - group = "multiplatform-swift-package" - afterEvaluate { - val createFrameworkTask = tasks.named("createXCFramework").get() - val deps = createFrameworkTask.taskDependencies.getDependencies(createFrameworkTask) - fixTask.dependsOn(deps) - } - doFirst { - val createFrameworkTask = tasks.named("createXCFramework").get() - val deps = createFrameworkTask.taskDependencies.getDependencies(createFrameworkTask) - val outDirs = deps.flatMap { - it.outputs.files.files - } - val plists = outDirs.flatMap { - if (it.exists() && it.isDirectory) { - Files.walk(it.toPath()) - .filter { - it.name == "Info.plist" - } - .collect(toList()) - } else { - listOf() - } - } - - plists.forEach { - logger.warn("Apply XCode 15.3(+) workaround to plist file: $it") - providers.exec { - commandLine("/usr/libexec/PlistBuddy", "-c", "Set MinimumOSVersion 100.0", it.toFile().absolutePath) - }.result.get() - } - } - -} - -afterEvaluate { - tasks.named("createXCFramework").dependsOn(tasks.named(fixTask.name)) -} - kotlin { jvm() configureIosTargets(baseName = "OpenIdConnectClient")