Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prep for Kotlin 2.1.0 #1677

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<KotlinBasePlugin> {
tasks.withType<KotlinCompilationTask<*>>().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)
Expand Down Expand Up @@ -256,10 +261,6 @@ subprojects {
module("com.google.guava:listenablefuture") { replacedBy("com.google.guava:guava") }
}

pluginManager.withPlugin("org.jetbrains.kotlin.kapt") {
tasks.withType<KaptGenerateStubsTask>().configureEach { useK2Kapt.set(true) }
}

pluginManager.withPlugin("com.vanniktech.maven.publish") {
apply(plugin = "org.jetbrains.dokka")

Expand Down
1 change: 0 additions & 1 deletion circuit-foundation/api/android/circuit-foundation.api
Original file line number Diff line number Diff line change
Expand Up @@ -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 <init> ()V
public final fun getLambda-1$circuit_foundation_release ()Lkotlin/jvm/functions/Function4;
}
Expand Down
1 change: 0 additions & 1 deletion circuit-foundation/api/jvm/circuit-foundation.api
Original file line number Diff line number Diff line change
Expand Up @@ -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 <init> ()V
public final fun getLambda-1$circuit_foundation ()Lkotlin/jvm/functions/Function4;
}
Expand Down
1 change: 0 additions & 1 deletion circuit-overlay/api/android/circuit-overlay.api
Original file line number Diff line number Diff line change
Expand Up @@ -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 <init> ()V
public final fun getLambda-1$circuit_overlay_release ()Lkotlin/jvm/functions/Function4;
}
Expand Down
1 change: 0 additions & 1 deletion circuit-overlay/api/jvm/circuit-overlay.api
Original file line number Diff line number Diff line change
Expand Up @@ -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 <init> ()V
public final fun getLambda-1$circuit_overlay ()Lkotlin/jvm/functions/Function4;
}
Expand Down
1 change: 0 additions & 1 deletion circuitx/overlays/api/android/overlays.api
Original file line number Diff line number Diff line change
Expand Up @@ -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 <init> ()V
public final fun getLambda-1$overlays_release ()Lkotlin/jvm/functions/Function2;
}
Expand Down
1 change: 0 additions & 1 deletion circuitx/overlays/api/jvm/overlays.api
Original file line number Diff line number Diff line change
Expand Up @@ -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 <init> ()V
public final fun getLambda-1$overlays ()Lkotlin/jvm/functions/Function2;
}
Expand Down
2 changes: 0 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 3 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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" }
Expand Down Expand Up @@ -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" }
Expand Down
59 changes: 22 additions & 37 deletions kotlin-js-store/yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions samples/counter/apps/gradle.properties

This file was deleted.

6 changes: 5 additions & 1 deletion samples/counter/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# https://kotlinlang.org/docs/native-ios-integration.html#calling-kotlin-suspending-functions
kotlin.native.binary.objcExportSuspendFunctionLaunchThreadRestriction=none
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
Loading