Skip to content

Update Kotlin to 2.2.0-RC2, Compose to v1.8.1, the Gradle wrapper to v8.14.2, and AGP to v8.10.1 #59

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

Merged
merged 10 commits into from
Jun 8, 2025
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- uses: huanshankeji/.github/actions/gradle-test-and-check@v0.1.0
with:
jdk-versions: 8-zulu, 17-temurin
jdk-versions: 17-temurin

dependency-submission:
strategy:
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ repositories {
}

dependencies {
val kotlinVersion = "2.1.0"
val kotlinVersion = "2.2.0-RC2"
implementation(kotlin("gradle-plugin", kotlinVersion))
implementation("org.jetbrains.kotlin:compose-compiler-gradle-plugin:$kotlinVersion")
implementation("org.jetbrains.compose:compose-gradle-plugin:1.7.3")
implementation("org.jetbrains.compose:compose-gradle-plugin:1.8.1")
implementation("com.huanshankeji.team:gradle-plugins:0.9.0") // don't use a snapshot version in a main branch
implementation("com.android.tools.build:gradle:8.7.3")
implementation("com.android.tools.build:gradle:8.10.1")
implementation("com.huanshankeji:common-gradle-dependencies:0.9.0-20241203") // don't use a snapshot version in a main branch
}
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Android.kt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
val androidSdkVersion = 34 // bump to 35 when AGP and Kotlin are bumped
val androidSdkVersion = 35
4 changes: 4 additions & 0 deletions buildSrc/src/main/kotlin/VersionsAndDependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ val commonDependencies = CommonDependencies()

object DependencyVersions {
const val composeMultiplatform = ComposeBuildConfig.composeVersion // for "ui-unit"

// https://slack-chats.kotlinlang.org/t/27579160/after-updating-to-1-8-0-rc01-package-androidx-compose-materi
// https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.8.0-rc01
const val composeMultiplatformMaterialIconsExtended = "1.7.3"
val kobweb = "0.19.2"
val huanshankejiComposeHtml = "0.4.0" // don't use a snapshot version in a main branch
val kmdc = "0.1.2"
Expand Down
11 changes: 8 additions & 3 deletions buildSrc/src/main/kotlin/common-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ kotlin {
// for Compose UI

jvm() // TODO: `jvm("desktop")`?
jvmToolchain(8)
jvmToolchain(17)

//androidTarget()

Expand All @@ -30,12 +30,17 @@ kotlin {
iosSimulatorArm64()

@OptIn(ExperimentalWasmDsl::class)
wasmJs()
wasmJs {
browser()
}


// for JS and HTML wrappers

js()
js {
// The project works without this, but it can be added to avoid potential issues.
browser()
}



Expand Down
16 changes: 8 additions & 8 deletions common/api/android/compose-multiplatform-html-unified-common.api
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public final class com/huanshankeji/compose/foundation/layout/Arrangement$Vertic
}

public abstract interface class com/huanshankeji/compose/foundation/layout/BoxScope {
public abstract fun align (Lcom/huanshankeji/compose/ui/Modifier;Lcom/huanshankeji/compose/ui/Alignment;)Lcom/huanshankeji/compose/ui/Modifier;
public fun align (Lcom/huanshankeji/compose/ui/Modifier;Lcom/huanshankeji/compose/ui/Alignment;)Lcom/huanshankeji/compose/ui/Modifier;
public abstract fun getPlatformBoxScope ()Landroidx/compose/foundation/layout/BoxScope;
}

Expand Down Expand Up @@ -180,9 +180,9 @@ public final class com/huanshankeji/compose/foundation/layout/ColumnKt {
}

public abstract interface class com/huanshankeji/compose/foundation/layout/ColumnScope {
public abstract fun align (Lcom/huanshankeji/compose/ui/Modifier;Lcom/huanshankeji/compose/ui/Alignment$Horizontal;)Lcom/huanshankeji/compose/ui/Modifier;
public fun align (Lcom/huanshankeji/compose/ui/Modifier;Lcom/huanshankeji/compose/ui/Alignment$Horizontal;)Lcom/huanshankeji/compose/ui/Modifier;
public abstract fun getPlatformValue ()Landroidx/compose/foundation/layout/ColumnScope;
public abstract fun weight (Lcom/huanshankeji/compose/ui/Modifier;F)Lcom/huanshankeji/compose/ui/Modifier;
public fun weight (Lcom/huanshankeji/compose/ui/Modifier;F)Lcom/huanshankeji/compose/ui/Modifier;
}

public final class com/huanshankeji/compose/foundation/layout/ColumnScope$DefaultImpls {
Expand Down Expand Up @@ -261,9 +261,9 @@ public final class com/huanshankeji/compose/foundation/layout/RowKt {
}

public abstract interface class com/huanshankeji/compose/foundation/layout/RowScope {
public abstract fun align (Lcom/huanshankeji/compose/ui/Modifier;Lcom/huanshankeji/compose/ui/Alignment$Vertical;)Lcom/huanshankeji/compose/ui/Modifier;
public fun align (Lcom/huanshankeji/compose/ui/Modifier;Lcom/huanshankeji/compose/ui/Alignment$Vertical;)Lcom/huanshankeji/compose/ui/Modifier;
public abstract fun getPlatformValue ()Landroidx/compose/foundation/layout/RowScope;
public abstract fun weight (Lcom/huanshankeji/compose/ui/Modifier;F)Lcom/huanshankeji/compose/ui/Modifier;
public fun weight (Lcom/huanshankeji/compose/ui/Modifier;F)Lcom/huanshankeji/compose/ui/Modifier;
}

public final class com/huanshankeji/compose/foundation/layout/RowScope$DefaultImpls {
Expand Down Expand Up @@ -665,10 +665,10 @@ public final class com/huanshankeji/compose/ui/Alignment$Vertical$Impl : com/hua

public abstract interface class com/huanshankeji/compose/ui/Modifier {
public static final field Companion Lcom/huanshankeji/compose/ui/Modifier$Companion;
public abstract fun foldIn (Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
public fun foldIn (Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
public abstract fun getPlatformModifier ()Landroidx/compose/ui/Modifier;
public abstract fun platformModify (Lkotlin/jvm/functions/Function1;)Lcom/huanshankeji/compose/ui/Modifier;
public abstract fun then (Lcom/huanshankeji/compose/ui/Modifier;)Lcom/huanshankeji/compose/ui/Modifier;
public fun platformModify (Lkotlin/jvm/functions/Function1;)Lcom/huanshankeji/compose/ui/Modifier;
public fun then (Lcom/huanshankeji/compose/ui/Modifier;)Lcom/huanshankeji/compose/ui/Modifier;
}

public final class com/huanshankeji/compose/ui/Modifier$Companion : com/huanshankeji/compose/ui/Modifier {
Expand Down
16 changes: 8 additions & 8 deletions common/api/jvm/compose-multiplatform-html-unified-common.api
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public final class com/huanshankeji/compose/foundation/layout/Arrangement$Vertic
}

public abstract interface class com/huanshankeji/compose/foundation/layout/BoxScope {
public abstract fun align (Lcom/huanshankeji/compose/ui/Modifier;Lcom/huanshankeji/compose/ui/Alignment;)Lcom/huanshankeji/compose/ui/Modifier;
public fun align (Lcom/huanshankeji/compose/ui/Modifier;Lcom/huanshankeji/compose/ui/Alignment;)Lcom/huanshankeji/compose/ui/Modifier;
public abstract fun getPlatformBoxScope ()Landroidx/compose/foundation/layout/BoxScope;
}

Expand Down Expand Up @@ -180,9 +180,9 @@ public final class com/huanshankeji/compose/foundation/layout/ColumnKt {
}

public abstract interface class com/huanshankeji/compose/foundation/layout/ColumnScope {
public abstract fun align (Lcom/huanshankeji/compose/ui/Modifier;Lcom/huanshankeji/compose/ui/Alignment$Horizontal;)Lcom/huanshankeji/compose/ui/Modifier;
public fun align (Lcom/huanshankeji/compose/ui/Modifier;Lcom/huanshankeji/compose/ui/Alignment$Horizontal;)Lcom/huanshankeji/compose/ui/Modifier;
public abstract fun getPlatformValue ()Landroidx/compose/foundation/layout/ColumnScope;
public abstract fun weight (Lcom/huanshankeji/compose/ui/Modifier;F)Lcom/huanshankeji/compose/ui/Modifier;
public fun weight (Lcom/huanshankeji/compose/ui/Modifier;F)Lcom/huanshankeji/compose/ui/Modifier;
}

public final class com/huanshankeji/compose/foundation/layout/ColumnScope$DefaultImpls {
Expand Down Expand Up @@ -261,9 +261,9 @@ public final class com/huanshankeji/compose/foundation/layout/RowKt {
}

public abstract interface class com/huanshankeji/compose/foundation/layout/RowScope {
public abstract fun align (Lcom/huanshankeji/compose/ui/Modifier;Lcom/huanshankeji/compose/ui/Alignment$Vertical;)Lcom/huanshankeji/compose/ui/Modifier;
public fun align (Lcom/huanshankeji/compose/ui/Modifier;Lcom/huanshankeji/compose/ui/Alignment$Vertical;)Lcom/huanshankeji/compose/ui/Modifier;
public abstract fun getPlatformValue ()Landroidx/compose/foundation/layout/RowScope;
public abstract fun weight (Lcom/huanshankeji/compose/ui/Modifier;F)Lcom/huanshankeji/compose/ui/Modifier;
public fun weight (Lcom/huanshankeji/compose/ui/Modifier;F)Lcom/huanshankeji/compose/ui/Modifier;
}

public final class com/huanshankeji/compose/foundation/layout/RowScope$DefaultImpls {
Expand Down Expand Up @@ -665,10 +665,10 @@ public final class com/huanshankeji/compose/ui/Alignment$Vertical$Impl : com/hua

public abstract interface class com/huanshankeji/compose/ui/Modifier {
public static final field Companion Lcom/huanshankeji/compose/ui/Modifier$Companion;
public abstract fun foldIn (Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
public fun foldIn (Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
public abstract fun getPlatformModifier ()Landroidx/compose/ui/Modifier;
public abstract fun platformModify (Lkotlin/jvm/functions/Function1;)Lcom/huanshankeji/compose/ui/Modifier;
public abstract fun then (Lcom/huanshankeji/compose/ui/Modifier;)Lcom/huanshankeji/compose/ui/Modifier;
public fun platformModify (Lkotlin/jvm/functions/Function1;)Lcom/huanshankeji/compose/ui/Modifier;
public fun then (Lcom/huanshankeji/compose/ui/Modifier;)Lcom/huanshankeji/compose/ui/Modifier;
}

public final class com/huanshankeji/compose/ui/Modifier$Companion : com/huanshankeji/compose/ui/Modifier {
Expand Down
4 changes: 2 additions & 2 deletions demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ android {
}
}

val jsBrowserDistribution by tasks.getting(Copy::class)
val wasmJsBrowserDistribution by tasks.getting(Copy::class)
val jsBrowserDistribution by tasks.getting(Sync::class)
val wasmJsBrowserDistribution by tasks.getting(Sync::class)

tasks.register<Sync>("sideBySideBrowserDistribution") {
group = "kotlin browser"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
9 changes: 4 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -115,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""


# Determine the Java command to use to start the JVM.
Expand Down Expand Up @@ -206,15 +205,15 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"

# Stop when "xargs" is not available.
Expand Down
4 changes: 2 additions & 2 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ goto fail
:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*

:end
@rem End local scope for the variables with windows NT shell
Expand Down
Loading
Loading