Skip to content

Update dependencies#96

Merged
dokar3 merged 3 commits intomainfrom
update-dependencies
Jan 22, 2026
Merged

Update dependencies#96
dokar3 merged 3 commits intomainfrom
update-dependencies

Conversation

@dokar3
Copy link
Owner

@dokar3 dokar3 commented Jan 22, 2026

Summary by CodeRabbit

  • New Features

    • Added a dedicated Android sample module and new plugin availability.
  • Refactor

    • Modernized sample renderers to use a div-based viewport (WASM/JS) and updated sample UI layout and entry points.
    • Updated multiplatform build targets and module naming to current compiler options.
  • Chores

    • Upgraded Kotlin, Compose, coroutines, AGP, Gradle wrapper and publishing tooling; added JVM toolchain mappings and build flags.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

Add Foojay resolver and androidKotlinMultiplatformLibrary plugin, bump Gradle/AGP/Kotlin/Compose versions and toolchain settings, migrate Compose artifacts to JetBrains coordinates, switch JS/WASM rendering from canvas to a div-based ComposeViewport flow, and add a dedicated Android sample module.

Changes

Cohort / File(s) Summary
Build config & toolchain
build.gradle.kts, gradle.properties, gradle/libs.versions.toml, gradle/wrapper/gradle-wrapper.properties, gradle/gradle-daemon-jvm.properties, settings.gradle.kts
Add androidKotlinMultiplatformLibrary plugin alias; add foojay resolver plugin; set android flags; update SONATYPE host; bump Gradle → 9.3, AGP → 9.0.0, Kotlin → 2.3.0, Compose → 1.10.0; add daemon JVM toolchain URLs; include :sample-android.
Core library build
sonner/build.gradle.kts
Replace moduleName with compilerOptions.outputModuleName for wasm/js targets; switch androidTargetandroidLibrary (namespace/compileSdk/minSdk/jvmTarget); consolidate iOS target declarations; replace direct Compose coordinates with libs catalog; remove legacy android{} block; adjust test wiring.
Sample multiplatform build
sample/build.gradle.kts
Swap androidApplicationandroidKotlinMultiplatformLibrary; adopt androidLibrary config; migrate module naming to compilerOptions.outputModuleName; replace Compose artifacts with libs catalog; remove legacy android{} block.
New Android sample module
sample-android/build.gradle.kts, sample-android/src/main/AndroidManifest.xml
Add Android application module with Android/Kotlin/Compose plugin setup, app config (applicationId, compileSdk, minSdk, targetSdk, versions), packaging exclusions, release buildType, Java/Kotlin target 11; use fully-qualified activity name.
JS/WASM runtime & HTML resources
sample/src/jsMain/resources/index.html, sample/src/wasmJsMain/resources/index.html, sample/src/wasmJsMain/kotlin/.../main.kt, sample/src/jsMain/kotlin/.../main.kt
Replace <canvas> with <div id="ComposeTarget">; remove skiko.js; add full-viewport CSS; add configureWebResources and onWasmReady; replace CanvasBasedWindow with ComposeViewport (deferred WASM-ready initialization).
Desktop sample minor update
sample/src/desktopMain/kotlin/.../main.kt
Update Preview import from desktop tooling package to androidx.compose.ui.tooling.preview.Preview.
Sample UI adjustments
sample/src/commonMain/kotlin/com/dokar/sonner/sample/BasicSample.kt, sample/src/commonMain/kotlin/com/dokar/sonner/sample/SampleScreen.kt
Remove stray ButtonDefaults line; change root layout from BoxColumn; remove onSizeChanged/titleHeight logic and use weight-based Box for content; add Color import.

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant HTML as "index.html (div)"
  participant Wasm as "WASM module"
  participant Compose as "ComposeViewport"
  Browser->>HTML: Load page with <div id="ComposeTarget">
  HTML->>Wasm: Load composeApp-*.js
  Wasm->>Wasm: configureWebResources(mapping "./<path>")
  Wasm->>Wasm: onWasmReady triggers
  Wasm->>Compose: initialize ComposeViewport(targetId="ComposeTarget")
  Compose->>HTML: mount UI into div#ComposeTarget
  Note over Compose,HTML: Rendering targets a div-based viewport instead of a canvas
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰
I swapped my canvas for a roomy div,
hopped toolchains up and fetched a new kid,
Compose in JetBrains clothes so bright,
samples stretch from web to Android light,
nibbling changes — builds take flight!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Update dependencies' is vague and generic, using a non-descriptive term that doesn't clearly convey the specific nature of the changes beyond a surface-level summary. Consider a more specific title that highlights the major version upgrades involved, such as 'Upgrade Kotlin, Compose, and AGP versions' or 'Update to Kotlin 2.3, Compose 1.10, and AGP 9.0'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Fix all issues with AI agents
In `@gradle.properties`:
- Around line 10-11: The gradle.properties flags android.builtInKotlin=false and
android.newDsl=false are temporary opt-outs that block AGP 9+ built-in Kotlin
and the new Android DSL; update the build to remove these opt-outs by enabling
built-in Kotlin and the new DSL (remove or set android.builtInKotlin=true and
android.newDsl=true), then migrate build logic that relies on legacy behavior:
remove uses of the org.jetbrains.kotlin.android /
org.jetbrains.kotlin.multiplatform mixing (stop applying
org.jetbrains.kotlin.android where it conflicts) and refactor any plugins or
build scripts that reference legacy variant APIs (e.g.,
android.applicationVariants) to use the new DSL/APIs or update those plugins to
versions that support the new DSL.

In `@gradle/wrapper/gradle-wrapper.properties`:
- Line 3: The gradle-wrapper currently points to Gradle 9.3.0 (distributionUrl)
which is compatible with AGP 9.0.0 but your project may still use third‑party
plugins or the removed variant API; update any Gradle plugins, custom buildSrc
or build logic, and plugin versions to AGP 9.0‑compatible releases, replace
usages of the old variant API with the new Gradle DSL/APIs, and run a full build
to fix deprecation/breaking changes (search for distributionUrl, buildSrc, and
any usage of "variant" APIs or old DSL entries to locate affected code). Ensure
you bump plugin versions in build.gradle.* and test CI to confirm no runtime
build breaks.

In `@sample/src/wasmJsMain/resources/index.html`:
- Around line 4-6: Add the missing viewport meta tag to the HTML head to ensure
proper mobile scaling; specifically, update the head section in index.html
(where <meta charset="UTF-8"> and <title>Compose Sonner Demo</title> are
defined) to include <meta name="viewport" content="width=device-width,
initial-scale=1.0"/> so mobile browsers render and scale the page correctly.

In `@sonner/build.gradle.kts`:
- Around line 30-33: The JS module name has a typo: update the string passed to
outputModuleName.set inside the js(IR) { compilerOptions { ... } } block from
"compose-sooner-jscanvas" to the correct "compose-sonner-jscanvas" so the module
name matches the Sonner project naming.
- Around line 14-17: The Gradle config sets the Wasm JS output module name with
a typo: update the wasmJs -> compilerOptions -> outputModuleName.set invocation
to use the correct module name "compose-sonner" instead of "compose-sooner"
(i.e., change the string passed to outputModuleName.set in the
wasmJs.compilerOptions block).
🧹 Nitpick comments (4)
sample/src/commonMain/kotlin/com/dokar/sonner/sample/SampleScreen.kt (1)

49-49: Unused state variable titleHeight.

The titleHeight state is declared but never used after the layout refactoring. This creates unnecessary state overhead.

Proposed fix
     var sampleType by remember { mutableStateOf(SampleType.Basic) }
-
-    var titleHeight by remember { mutableIntStateOf(0) }
gradle/libs.versions.toml (1)

19-19: Inconsistent versioning for compose-material3.

This library uses a hardcoded version "1.9.0" while all other Compose libraries reference "compose-plugin". This could lead to version mismatches and compatibility issues.

Suggested fix
-compose-material3 = { module = "org.jetbrains.compose.material3:material3", version = "1.9.0" }
+compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "compose-plugin" }
sonner/build.gradle.kts (1)

2-2: Unused import.

KotlinNativeTarget is imported but never used in this file.

Suggested fix
 import org.jetbrains.kotlin.gradle.dsl.JvmTarget
-import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
sample/build.gradle.kts (1)

37-45: Consider adding targetSdk to the Android library configuration.

The androidLibrary block specifies compileSdk and minSdk but omits targetSdk. While targetSdk may be optional for libraries, explicitly setting it ensures consistent behavior across the project.

Suggested fix
     androidLibrary {
         namespace = "com.dokar.sonner.sample"
         compileSdk = libs.versions.android.compileSdk.get().toInt()
         minSdk = libs.versions.android.minSdk.get().toInt()
+        targetSdk = libs.versions.android.targetSdk.get().toInt()

         compilerOptions {
             jvmTarget.set(JvmTarget.JVM_11)
         }
     }

Comment on lines +10 to +11
android.builtInKotlin=false
android.newDsl=false
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

AGP 9.0 android.builtInKotlin android.newDsl flags requirements

💡 Result:

Short summary — AGP 9.0 changes and required flags/migration

  • Default flags in AGP 9.0: android.newDsl = true and android.builtInKotlin = true (both enabled by default). You can opt out by setting them in gradle.properties: android.newDsl=false and/or android.builtInKotlin=false. [1][2]

  • Built-in Kotlin requirements/behavior:

    • AGP 9.0 has a runtime dependency on Kotlin Gradle Plugin (KGP) 2.2.10 and will upgrade lower KGP/KSP versions automatically to the matching versions. [1]
    • With built-in Kotlin you must remove applying org.jetbrains.kotlin.android (kotlin-android); migrate kapt, kotlinOptions, kotlin.sourceSets as documented. Module-by-module opt-in/out is possible via android.builtInKotlin. Using org.jetbrains.kotlin.multiplatform with com.android.* is disallowed when built-in Kotlin is enabled. [2]
  • New DSL effects and compatibility:

    • android.newDsl switches to the new DSL and removes legacy variant APIs (e.g., android.applicationVariants); some plugins/build logic must be updated. If you need older behavior temporarily, set android.newDsl=false while you migrate. [1]
    • android.enableLegacyVariantApi is deprecated/removed in AGP 9.x — use android.newDsl instead. [4]
  • Migration advice and gotchas:

    • If you can’t migrate immediately, opt out via gradle.properties (android.builtInKotlin=false and android.newDsl=false) but expect that opt-out will not be supported indefinitely (AGP 10+). Migrate by removing kotlin-android, updating kapt and kotlin DSL usages, and fixing plugins that rely on legacy variant APIs. [2][3]

Sources:
[1] Android Gradle plugin 9.0 release notes — Android Developers.
[2] Migrate to built-in Kotlin — Android Developers.
[3] Kotlin / JetBrains blog post on updating projects for AGP 9.0.


android.builtInKotlin=false is necessary for Kotlin Multiplatform compatibility; android.newDsl=false requires migration planning.

In AGP 9.0, both flags default to true. Setting android.builtInKotlin=false is necessary here because AGP 9.0 explicitly disallows mixing org.jetbrains.kotlin.multiplatform with com.android.* when built-in Kotlin is enabled.

The android.newDsl=false flag temporarily opts out of the new DSL to avoid breaking legacy variant APIs and plugins, but this opt-out will not be supported in AGP 10+. Plan to migrate away from these opt-outs by:

  • Removing org.jetbrains.kotlin.android plugin application
  • Updating any plugins or build logic that depend on legacy variant APIs (e.g., android.applicationVariants)
🤖 Prompt for AI Agents
In `@gradle.properties` around lines 10 - 11, The gradle.properties flags
android.builtInKotlin=false and android.newDsl=false are temporary opt-outs that
block AGP 9+ built-in Kotlin and the new Android DSL; update the build to remove
these opt-outs by enabling built-in Kotlin and the new DSL (remove or set
android.builtInKotlin=true and android.newDsl=true), then migrate build logic
that relies on legacy behavior: remove uses of the org.jetbrains.kotlin.android
/ org.jetbrains.kotlin.multiplatform mixing (stop applying
org.jetbrains.kotlin.android where it conflicts) and refactor any plugins or
build scripts that reference legacy variant APIs (e.g.,
android.applicationVariants) to use the new DSL/APIs or update those plugins to
versions that support the new DSL.

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Check if Gradle 9.3.0 distribution exists
curl -sI "https://services.gradle.org/distributions/gradle-9.3.0-bin.zip" | head -n 1

Repository: dokar3/compose-sonner

Length of output: 186


🌐 Web query:

Gradle 9.3.0 release compatibility Android Gradle Plugin 9.0.0

💡 Result:

Yes — AGP 9.0 requires Gradle 9.1.0 minimum, so Gradle 9.3.0 (newer) is compatible. [1][2]

Sources:

  • Android Gradle Plugin compatibility table (AGP 9.0 → minimum Gradle 9.1.0). [1]
  • Gradle 9.3.0 release notes. [2]

🌐 Web query:

Gradle 9.3 breaking changes compatibility AGP requirements

💡 Result:

Short answer

  • Gradle 9.3 is a Gradle 9.x release — Android Gradle Plugin (AGP) support follows the rule that each AGP major release requires a matching (or newer) Gradle major series. To use Gradle 9.3 with Android projects you need AGP 9.x (AGP 9.0+; AGP 9.0 lists Gradle 9.1.0 as its minimum). If your project is still on AGP 8.x, keep Gradle in the 8.x line (AGP 8.13 requires Gradle 8.13). [1][2]

What to watch for (compatibility / breaking effects)

  • AGP 9.0 introduced many source/API/DSL changes (new DSL interfaces, removal of the old variant API, built‑in Kotlin, changed defaults and removed Gradle properties). Plugins or custom build logic that target AGP 8.x or older may fail under AGP 9.x (and therefore under Gradle 9.x) until updated. If you upgrade Gradle to 9.3, ensure every third‑party Gradle/AGP plugin you use supports AGP 9.x. [1]
  • If you cannot upgrade AGP, do not upgrade Gradle past the maximum supported Gradle version for your AGP (e.g., stay on Gradle 8.x for AGP 8.x). The AGP release notes and compatibility table are the authoritative source for the exact Gradle version requirements. [2]

Recommendations

  • If you want Gradle 9.3: first upgrade to AGP 9.0+ (follow the AGP 9.0 migration guide and run the AGP Upgrade Assistant). Test custom plugins/build logic for the new DSL and built‑in Kotlin changes. [1]
  • If you must remain on AGP 8.x: stay on the supported Gradle 8.x release (do not move to Gradle 9.3). [2]

Sources

  • AGP 9.0 release notes (compatibility, minimum Gradle 9.1.0 and DSL/behavior changes). [1]
  • Android Gradle plugin / Android Studio compatibility table (shows AGP 8.13 ↔ Gradle 8.13 and general AGP↔Gradle mapping). [2]

Would you like a checklist for upgrading (steps, gradle.properties flags to set, and common plugin checks)?


Gradle 9.3.0 is compatible with AGP 9.0.0 (exceeds the minimum 9.1.0 requirement). However, ensure third-party Gradle plugins and custom build logic are updated for AGP 9.0's breaking changes, including DSL updates and removal of the old variant API.

🤖 Prompt for AI Agents
In `@gradle/wrapper/gradle-wrapper.properties` at line 3, The gradle-wrapper
currently points to Gradle 9.3.0 (distributionUrl) which is compatible with AGP
9.0.0 but your project may still use third‑party plugins or the removed variant
API; update any Gradle plugins, custom buildSrc or build logic, and plugin
versions to AGP 9.0‑compatible releases, replace usages of the old variant API
with the new Gradle DSL/APIs, and run a full build to fix deprecation/breaking
changes (search for distributionUrl, buildSrc, and any usage of "variant" APIs
or old DSL entries to locate affected code). Ensure you bump plugin versions in
build.gradle.* and test CI to confirm no runtime build breaks.

@dokar3 dokar3 merged commit 42170e6 into main Jan 22, 2026
2 checks passed
@dokar3 dokar3 deleted the update-dependencies branch January 22, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant