diff --git a/build.gradle.kts b/build.gradle.kts index a097d288f..d484b12cd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -49,7 +49,6 @@ plugins { alias(libs.plugins.mavenPublish) apply false alias(libs.plugins.dokka) alias(libs.plugins.ksp) apply false - alias(libs.plugins.versionsPlugin) alias(libs.plugins.dependencyGuard) apply false alias(libs.plugins.compose) apply false alias(libs.plugins.kotlin.plugin.compose) apply false @@ -169,15 +168,21 @@ subprojects { } val hasCompose = !project.hasProperty("circuit.noCompose") + val useK2Kapt = + providers.gradleProperty("kapt.use.k2").map { it.toBooleanStrict() }.getOrElse(false) plugins.withType { tasks.withType>().configureEach { - // Don't double apply to stub gen if (this is KaptGenerateStubsTask) { - // TODO due to Anvil we need to force language version 1.9 - compilerOptions { - progressiveMode.set(false) - languageVersion.set(KotlinVersion.KOTLIN_1_9) + if (useK2Kapt) { + // K2 Kapt is in alpha + compilerOptions.allWarningsAsErrors.set(false) + } else { + compilerOptions { + progressiveMode.set(false) + languageVersion.set(KotlinVersion.KOTLIN_1_9) + } } + // Don't double apply to stub gen return@configureEach } val isWasmTask = name.contains("wasm", ignoreCase = true) @@ -256,10 +261,6 @@ subprojects { module("com.google.guava:listenablefuture") { replacedBy("com.google.guava:guava") } } - pluginManager.withPlugin("org.jetbrains.kotlin.kapt") { - tasks.withType().configureEach { useK2Kapt.set(true) } - } - pluginManager.withPlugin("com.vanniktech.maven.publish") { apply(plugin = "org.jetbrains.dokka") diff --git a/circuit-foundation/api/android/circuit-foundation.api b/circuit-foundation/api/android/circuit-foundation.api index 694aebd61..618426942 100644 --- a/circuit-foundation/api/android/circuit-foundation.api +++ b/circuit-foundation/api/android/circuit-foundation.api @@ -70,7 +70,6 @@ public final class com/slack/circuit/foundation/CircuitKt { public final class com/slack/circuit/foundation/ComposableSingletons$CircuitKt { public static final field INSTANCE Lcom/slack/circuit/foundation/ComposableSingletons$CircuitKt; - public static field lambda-1 Lkotlin/jvm/functions/Function4; public fun ()V public final fun getLambda-1$circuit_foundation_release ()Lkotlin/jvm/functions/Function4; } diff --git a/circuit-foundation/api/jvm/circuit-foundation.api b/circuit-foundation/api/jvm/circuit-foundation.api index d431f7fec..8e92cdad4 100644 --- a/circuit-foundation/api/jvm/circuit-foundation.api +++ b/circuit-foundation/api/jvm/circuit-foundation.api @@ -70,7 +70,6 @@ public final class com/slack/circuit/foundation/CircuitKt { public final class com/slack/circuit/foundation/ComposableSingletons$CircuitKt { public static final field INSTANCE Lcom/slack/circuit/foundation/ComposableSingletons$CircuitKt; - public static field lambda-1 Lkotlin/jvm/functions/Function4; public fun ()V public final fun getLambda-1$circuit_foundation ()Lkotlin/jvm/functions/Function4; } diff --git a/circuit-overlay/api/android/circuit-overlay.api b/circuit-overlay/api/android/circuit-overlay.api index ff1b96bd3..160198b78 100644 --- a/circuit-overlay/api/android/circuit-overlay.api +++ b/circuit-overlay/api/android/circuit-overlay.api @@ -9,7 +9,6 @@ public abstract class com/slack/circuit/overlay/AnimatedOverlay : com/slack/circ public final class com/slack/circuit/overlay/ComposableSingletons$ContentWithOverlaysKt { public static final field INSTANCE Lcom/slack/circuit/overlay/ComposableSingletons$ContentWithOverlaysKt; - public static field lambda-1 Lkotlin/jvm/functions/Function4; public fun ()V public final fun getLambda-1$circuit_overlay_release ()Lkotlin/jvm/functions/Function4; } diff --git a/circuit-overlay/api/jvm/circuit-overlay.api b/circuit-overlay/api/jvm/circuit-overlay.api index df0158cdc..835c16a7a 100644 --- a/circuit-overlay/api/jvm/circuit-overlay.api +++ b/circuit-overlay/api/jvm/circuit-overlay.api @@ -9,7 +9,6 @@ public abstract class com/slack/circuit/overlay/AnimatedOverlay : com/slack/circ public final class com/slack/circuit/overlay/ComposableSingletons$ContentWithOverlaysKt { public static final field INSTANCE Lcom/slack/circuit/overlay/ComposableSingletons$ContentWithOverlaysKt; - public static field lambda-1 Lkotlin/jvm/functions/Function4; public fun ()V public final fun getLambda-1$circuit_overlay ()Lkotlin/jvm/functions/Function4; } diff --git a/circuitx/overlays/api/android/overlays.api b/circuitx/overlays/api/android/overlays.api index cbf488ffb..021f028b0 100644 --- a/circuitx/overlays/api/android/overlays.api +++ b/circuitx/overlays/api/android/overlays.api @@ -28,7 +28,6 @@ public final class com/slack/circuitx/overlays/BottomSheetOverlay : com/slack/ci public final class com/slack/circuitx/overlays/ComposableSingletons$BottomSheetOverlayKt { public static final field INSTANCE Lcom/slack/circuitx/overlays/ComposableSingletons$BottomSheetOverlayKt; - public static field lambda-1 Lkotlin/jvm/functions/Function2; public fun ()V public final fun getLambda-1$overlays_release ()Lkotlin/jvm/functions/Function2; } diff --git a/circuitx/overlays/api/jvm/overlays.api b/circuitx/overlays/api/jvm/overlays.api index cfdb774b7..443ce8fb3 100644 --- a/circuitx/overlays/api/jvm/overlays.api +++ b/circuitx/overlays/api/jvm/overlays.api @@ -28,7 +28,6 @@ public final class com/slack/circuitx/overlays/BottomSheetOverlay : com/slack/ci public final class com/slack/circuitx/overlays/ComposableSingletons$BottomSheetOverlayKt { public static final field INSTANCE Lcom/slack/circuitx/overlays/ComposableSingletons$BottomSheetOverlayKt; - public static field lambda-1 Lkotlin/jvm/functions/Function2; public fun ()V public final fun getLambda-1$overlays ()Lkotlin/jvm/functions/Function2; } diff --git a/gradle.properties b/gradle.properties index c906ffa19..06dd4e75f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -38,7 +38,6 @@ ksp.useKSP2=false skie.kgpVersion=2.0.20 # Use Kapt4 in K2 -# TODO doesn't work with Anvil yet kapt.use.k2=false org.gradle.parallel=true @@ -52,7 +51,6 @@ dependency.analysis.compatibility=NONE # Disable noisy stability warning kotlin.mpp.stability.nowarn=true kotlin.mpp.androidSourceSetLayoutVersion=2 -kotlin.mpp.androidGradlePluginCompatibility.nowarn=true # Ignore disabled targets (i.e iOS on Linux) kotlin.native.ignoreDisabledTargets=true kotlin.apple.xcodeCompatibility.nowarn=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d08c06de0..71ad9725c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -28,14 +28,14 @@ eithernet = "2.0.0-alpha01" jdk = "22" jvmTarget = "11" publishedJvmTarget = "1.8" -kct = "0.6.0" -kotlin = "2.0.21" +kct = "0.7.0-alpha01" +kotlin = "2.1.0-RC2" kotlinInject = "0.7.2" kotlinInject-anvil = "0.1.0" kotlinpoet = "2.0.0" kotlinx-coroutines = "1.9.0" kotlinx-serialization = "1.7.3" -ksp = "2.0.21-1.0.28" +ksp = "2.1.0-RC2-1.0.28" ktfmt = "0.53" ktor = "3.0.1" leakcanary = "2.14" @@ -55,7 +55,6 @@ sqldelight = "2.0.2" telephoto = "0.14.0" testParameterInjector = "1.18" turbine = "1.2.0" -versionsPlugin = "0.49.0" [plugins] agp-application = { id = "com.android.application", version.ref = "agp" } @@ -84,7 +83,6 @@ roborazzi = { id = "io.github.takahirom.roborazzi", version.ref = "roborazzi" } skie = { id = "co.touchlab.skie", version.ref = "skie" } spotless = { id = "com.diffplug.spotless", version.ref = "spotless" } sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" } -versionsPlugin = { id = "com.github.ben-manes.versions", version.ref = "versionsPlugin" } [libraries] agp = { module = "com.android.tools.build:gradle", version.ref = "agp" } diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock index 4401cd24e..3b6813050 100644 --- a/kotlin-js-store/yarn.lock +++ b/kotlin-js-store/yarn.lock @@ -117,27 +117,6 @@ dependencies: "@types/node" "*" -"@types/eslint-scope@^3.7.3": - version "3.7.4" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" - integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "8.44.2" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.2.tgz#0d21c505f98a89b8dd4d37fa162b09da6089199a" - integrity sha512-sdPRb9K6iL5XZOmBubg8yiFp5yS/JdUDQsq5e6h95km91MCYMuvp7mh1fjPEYUhvHepKpZOjnEaMBR4PxjWDzg== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" - integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== - "@types/estree@^1.0.5": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" @@ -175,7 +154,7 @@ dependencies: "@types/node" "*" -"@types/json-schema@*", "@types/json-schema@^7.0.8": +"@types/json-schema@^7.0.8": version "7.0.12" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== @@ -927,7 +906,7 @@ engine.io@~6.5.2: engine.io-parser "~5.2.1" ws "~8.11.0" -enhanced-resolve@^5.17.0: +enhanced-resolve@^5.17.1: version "5.17.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== @@ -1573,10 +1552,10 @@ karma-webpack@5.0.1: minimatch "^9.0.3" webpack-merge "^4.1.5" -karma@6.4.3: - version "6.4.3" - resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.3.tgz#763e500f99597218bbb536de1a14acc4ceea7ce8" - integrity sha512-LuucC/RE92tJ8mlCwqEoRWXP38UMAqpnq98vktmS9SznSoUPPUJQbc91dHcxcunROvfQjdORVA/YFviH+Xci9Q== +karma@6.4.4: + version "6.4.4" + resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.4.tgz#dfa5a426cf5a8b53b43cd54ef0d0d09742351492" + integrity sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w== dependencies: "@colors/colors" "1.5.0" body-parser "^1.19.0" @@ -1608,6 +1587,13 @@ kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +kotlin-web-helpers@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/kotlin-web-helpers/-/kotlin-web-helpers-2.0.0.tgz#b112096b273c1e733e0b86560998235c09a19286" + integrity sha512-xkVGl60Ygn/zuLkDPx+oHj7jeLR7hCvoNF99nhwXMn8a3ApB4lLiC9pk4ol4NHPjyoCbvQctBqvzUcp8pkqyWw== + dependencies: + format-util "^1.0.5" + launch-editor@^2.6.0: version "2.8.1" resolved "https://registry.yarnpkg.com/launch-editor/-/launch-editor-2.8.1.tgz#3bda72af213ec9b46b170e39661916ec66c2f463" @@ -1759,10 +1745,10 @@ mkdirp@^0.5.5: dependencies: minimist "^1.2.6" -mocha@10.7.0: - version "10.7.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.0.tgz#9e5cbed8fa9b37537a25bd1f7fb4f6fc45458b9a" - integrity sha512-v8/rBWr2VO5YkspYINnvu81inSz2y3ODJrhO175/Exzor1RcEZZkizgE2A+w/CAXXoESS8Kys5E62dOHGHzULA== +mocha@10.7.3: + version "10.7.3" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.7.3.tgz#ae32003cabbd52b59aece17846056a68eb4b0752" + integrity sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A== dependencies: ansi-colors "^4.1.3" browser-stdout "^1.3.1" @@ -2660,12 +2646,11 @@ webpack-sources@^3.2.3: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@5.93.0: - version "5.93.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.93.0.tgz#2e89ec7035579bdfba9760d26c63ac5c3462a5e5" - integrity sha512-Y0m5oEY1LRuwly578VqluorkXbvXKh7U3rLoQCEO04M97ScRr44afGVkI0FQFsXzysk5OgFAxjZAb9rsGQVihA== +webpack@5.94.0: + version "5.94.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f" + integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg== dependencies: - "@types/eslint-scope" "^3.7.3" "@types/estree" "^1.0.5" "@webassemblyjs/ast" "^1.12.1" "@webassemblyjs/wasm-edit" "^1.12.1" @@ -2674,7 +2659,7 @@ webpack@5.93.0: acorn-import-attributes "^1.9.5" browserslist "^4.21.10" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.17.0" + enhanced-resolve "^5.17.1" es-module-lexer "^1.2.1" eslint-scope "5.1.1" events "^3.2.0" diff --git a/samples/counter/apps/gradle.properties b/samples/counter/apps/gradle.properties deleted file mode 100644 index 5e6a37a18..000000000 --- a/samples/counter/apps/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -# Basically the JS equivalent of a fat jar -# TODO retry without this after 1.9.10 https://youtrack.jetbrains.com/issue/KT-60852 -kotlin.js.ir.output.granularity=whole-program \ No newline at end of file diff --git a/samples/counter/gradle.properties b/samples/counter/gradle.properties index e83f1e8f0..b0c25cfee 100644 --- a/samples/counter/gradle.properties +++ b/samples/counter/gradle.properties @@ -1,2 +1,6 @@ # https://kotlinlang.org/docs/native-ios-integration.html#calling-kotlin-suspending-functions -kotlin.native.binary.objcExportSuspendFunctionLaunchThreadRestriction=none \ No newline at end of file +kotlin.native.binary.objcExportSuspendFunctionLaunchThreadRestriction=none + +# Override for SKIE's KGP version check +# Comment this out when not used, as it's easier to find here when we need to test new versions +skie.kgpVersion=2.0.20 \ No newline at end of file