Claude Cursor Skill

kmp-toolchain-upgrade

Use when upgrading, or planning to upgrade, a Kotlin Multiplatform toolchain - Kotlin 2.5, Compose Multiplatform 1.13, AGP 9.x or AGP 10, the Gradle wrapper, JDK 17, Xcode 27 or CI macOS runner images - "what order do we bump things in?", "can we move to Kotlin 2.5?", compileSdk

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Download kushpawan-kmp-mobile-skills-skills_kmp-toolchain-upgrade-c04c11f.zip · 26 KB

Install

skills CLI npx skills add https://github.com/Kushpawan/kmp-mobile-skills/tree/main/skills/kmp-toolchain-upgrade
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install kushpawan-kmp-mobile-skills@llmmart
Git git clone https://github.com/Kushpawan/kmp-mobile-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole kushpawan/kmp-mobile-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

KMP toolchain upgrade

Kotlin, Compose Multiplatform, AGP, Gradle, the JDK and Xcode constrain each other, and in December 2026 all of them moved within weeks. Read every pin first, build an ordered plan in which each step names what it waits for, then bump one axis at a time with a build check after each. Recommend; never upgrade something the user did not ask for.

When to use

  • "Upgrade us to Kotlin 2.5 / CMP 1.13 / AGP 9.5", or "what is the latest we can safely run?".
  • A bump failed and the cause is another tool's version: compileSdk 37.1 required, Gradle too old for AGP, Kotlin/Native complaining about Xcode, SKIE failing after a Kotlin bump.
  • Deprecation warnings that are really upgrade blockers: androidTarget with com.android.library, iosX64 or macosX64, swiftExport {}, android.newDsl=false.
  • CI must move to a new Xcode or macOS image.
  • Checking readiness for AGP 10 before it ships.

When not to use

  • Adding or upgrading one ordinary library: kmp-gradle-version-catalog.
  • A red build whose cause is not yet known: kmp-build-failure-triage.
  • The AGP 9 module migration itself (split :composeApp, Android-KMP library plugin): JetBrains kotlin-tooling-agp9-migration. This skill decides when that migration happens in the sequence.
  • A pure Android project with no KMP: Google agp-9-upgrade.
  • Moving from SKIE to Swift export, or rewriting Swift call sites: kmp-swiftui-interop.

Step 0 — Read the project first

Run from the Gradle root. Paths to scripts/ are relative to this skill's directory.

python3 scripts/toolchain_report.py --root . --detect --format table     # pins + dated findings
cat gradle/libs.versions.toml
grep distributionUrl gradle/wrapper/gradle-wrapper.properties
./gradlew --version                                     # Gradle, Kotlin DSL, JVM actually used
xcodebuild -version; xcode-select -p; uname -m          # Xcode, active path, arm64 or x86_64
cat .xcode-version 2>/dev/null
grep -rnE 'runs-on:|xcode-select|Xcode_[0-9]|setup-java|java-version' .github/workflows 2>/dev/null
grep -rnE 'iosX64|macosX64|tvosX64|watchosX64|watchosArm32|wasmJs|androidTarget|android \{|androidLibrary \{' \
  --include='*.gradle.kts' . | grep -v /build/
grep -rnE 'skie|nativecoroutines|swiftExport|export \{|cocoapods|swiftPMDependencies' \
  --include='*.gradle.kts' --include='*.toml' . | grep -v /build/
grep -nE 'android\.(newDsl|builtInKotlin|enableLegacyVariantApi)|kotlin\.' gradle.properties
ls build-logic buildSrc 2>/dev/null                     # pins may live in convention plugins

The script needs Python 3.11+; on older Python it exits 2 and you read the same files by hand.

Record Why
Kotlin, Compose compiler plugin, CMP, AGP, KSP versions The axes being moved
Gradle wrapper and the JDK Gradle runs on AGP and Kotlin floors
compileSdk, minSdk (catalog, convention plugin or module) CMP 1.13 floors
Local Xcode and CI Xcode, CPU architecture, runner labels Kotlin's Xcode pairing; Xcode 27 is Apple silicon only
KMP targets per module iosX64/macosX64 block CMP 1.11+ and Room 3; others error on Kotlin 2.5
Android integration per module: androidTarget + com.android.*, or com.android.kotlin.multiplatform.library + android {} AGP 9 compatibility, Kotlin 2.5 deprecation
Swift bridging: SKIE, KMP-NativeCoroutines, Swift export, CocoaPods, SwiftPM Compiler plugins pinned to Kotlin versions
Compiler plugins: Koin Compiler Plugin, Room 3 / KSP, serialization Same reason
gradle.properties AGP flags and legacy variant API use AGP 10 readiness
What the user actually asked for The plan's goal; everything else is "recommended, not done"

Done when every row has a value or "not used", and the script report (or your manual equivalent) is saved for the plan.

Workflow

  1. Load the dated matrix. Open references/compatibility-matrix.md. It was checked on 2026-12-03 and changes monthly: before relying on a cell, re-open the linked official page (compatibility guide, KGP table, AGP notes, CMP changelog, KSP and SKIE releases). If the kotlinlang docs MCP server (https://mcp.kotlinlang.org/mcp) is connected, query it. A newer release than the matrix knows about means: read its notes, do not guess. Done when every version you plan to move to has a confirmed row or is marked "check".

  2. Fix the goal. Map the request to the smallest goal in references/upgrade-sequence.md section 6 ("get on CMP 1.13" needs Kotlin 2.4.0+, not 2.5). Do not widen it. Done when the goal is one sentence the user agreed to.

  3. Write the ordered plan. Use the blocker graph and default order in the sequence reference. Every row names its blocker and its build check; anything you recommend but the user did not ask for goes under "Not recommended now" or "Optional". Rules that decide the order:

    Must come first Before
    Remove iosX64, macosX64 CMP 1.11+, Room 3
    Remove macosX64, tvosX64, watchosX64, watchosArm32; languageVersion above 2.1 Kotlin 2.5.0
    JDK 17, then a Gradle wrapper inside both the AGP minimum and the Kotlin range AGP 9.x
    Split a :composeApp that applies com.android.application + KMP into androidApp + shared AGP 9 (Kotlin 2.5 only warns, on any AGP)
    compileSdk 37.1 (AGP with API 37), minSdk 24, Kotlin 2.4.0+ (2.4.20 with JS/Wasm) CMP 1.13
    SKIE / KMP-NativeCoroutines / Koin Compiler Plugin releases that name the target Kotlin Any Kotlin bump
    Xcode 27 on every iOS Mac and CI runner (runs-on: xcode-27 on GitHub) Kotlin 2.5.0
    AGP at or below 9.4.1, unless the user accepts an untested pair Kotlin 2.5.0 (its tested AGP range ends at 9.4.1)

    Done when the plan uses the template in the sequence reference and lists the unverified cells it depends on.

  4. Run the bridging gate before any Kotlin bump. If SKIE is present and no SKIE release names the target Kotlin, stop and tell the user; on 2026-12-03 none names 2.5.0. Same for a KMP-NativeCoroutines build and the Koin Compiler Plugin's verified list. Swift export users on 2.5.0 rewrite swiftExport {} to kotlin { export { swift {} } } in the bump commit. Done when each bridging tool has "supported (link)" or "blocked (link)".

  5. Show the plan and get a go-ahead. Structural steps (module split, target removal, CI image change, dropping SKIE) need an explicit yes. Done when the user picked which rows to execute.

  6. Execute one row at a time. Change only that row's files, with versions in the catalog (gradle/libs.versions.toml + libs. accessors, never a literal in build.gradle.kts), then run the row's build check (Verify). Gradle wrapper changes go through ./gradlew wrapper --gradle-version <version> so the jar and scripts update too. On FAIL, stop: triage with kmp-build-failure-triage, or revert that row and re-plan. Never stack a second bump on a red build. Done when the row's check is PASS and the row is a separate commit (if the user commits).

  7. Re-run the report and close out. python3 scripts/toolchain_report.py --detect --format table again. Report each executed row with its check result, the rows left, and every finding still open.

AGP 10 readiness (optional task)

AGP 10 was announced for "late 2026" and was not released on 2026-12-03. Readiness means the latest AGP 9.x builds warning-free with android.newDsl=true and android.builtInKotlin=true, with no android.newDsl.optOut, no legacy variant API (applicationVariants, libraryVariants, variantFilter) and no third-party plugin that still needs BaseExtension. The grep recipe is in the sequence reference, section 4. Report readiness; do not move to AGP 10 until it ships and the Kotlin compatibility table lists it.

Quick reference

Pair (checked 2026-12-03, re-check) Rule
Kotlin 2.5.0 ↔ Xcode 27.0 (2.4.x: 26.4; 2.3.x: 26.0)
Kotlin 2.5.0 ↔ Gradle / AGP Gradle 8.14–9.8.1; AGP 8.8.2–9.4.1 (9.5 is outside the tested range)
Kotlin 2.4.20–2.4.21 ↔ Gradle / AGP Gradle 7.6.3–9.7.0; AGP 8.5.2–9.3.1
AGP 9.4 / 9.5 Gradle 9.6.0+, JDK 17, API 37
CMP 1.13.0 Kotlin 2.4.0+ (native), 2.4.20+ (JS/Wasm); compileSdk 37.1; minSdk 24; no x86_64 Apple targets
Compose compiler plugin Always the Kotlin version
KSP2 (2.x.y) Decoupled from Kotlin; needs KGP 2.2.10+. KSP1 <kotlin>-<ksp> must match Kotlin exactly
SKIE 0.10.16 Up to Kotlin 2.4.21; 2.5.0 not yet
Room 3 KSP only; no iosX64 artifact
GitHub runners Xcode 27 only on runs-on: xcode-27; macos-latest has Xcode 26.x
Script Use
python3 scripts/toolchain_report.py --detect --format table Human-readable pins and findings
python3 scripts/toolchain_report.py --xcode "$(xcodebuild -version)" --jdk 17 JSON, Xcode and JDK passed in (CI or another Mac)
python3 scripts/toolchain_report.py --fail-on blocker Exit 1 when a blocker remains
python3 scripts/toolchain_report.py --help All options and exit codes

Verify

Report every check as PASS, FAIL or NOT RUN (with the reason). Never report a check that did not run as passed. Run the set after each executed row, not once at the end. Replace :shared and :androidApp with the project's modules (:composeApp before a split).

./gradlew help                                          # settings, catalog and plugins resolve
./gradlew :shared:compileCommonMainKotlinMetadata
./gradlew :shared:compileAndroidMain                    # legacy plugin: compileDebugKotlinAndroid
./gradlew :androidApp:assembleDebug
./gradlew :shared:compileKotlinIosSimulatorArm64        # macOS only
./gradlew :shared:linkDebugFrameworkIosSimulatorArm64   # proves the Xcode pairing, not just compile
./gradlew :shared:allTests                              # or the project's test tasks
xcodebuild -project iosApp/iosApp.xcodeproj -scheme iosApp \
  -destination 'generic/platform=iOS Simulator' build   # the Swift side of SKIE / Swift export
python3 scripts/toolchain_report.py --detect --fail-on blocker

kmp-build-check runs the Gradle part as one command with per-check PASS/FAIL. iOS checks are NOT RUN on a machine without Xcode, or with an Xcode outside the pair for the target Kotlin; say so and name where they will run (CI on xcode-27, a teammate's Mac). A CI change is verified only by a CI run.

Common mistakes

Mistake Why it bites Fix
Bumping Kotlin, CMP and AGP in one commit A failure cannot be attributed; reverting loses good changes One row per commit, build check between
Kotlin 2.5 before CI has Xcode 27 The iOS job fails or runs on an unpaired Xcode Move CI to runs-on: xcode-27 (Apple silicon) in or before the Kotlin commit
Taking the newest AGP with Kotlin 2.5.0 AGP 9.5 is outside Kotlin 2.5.0's tested range Stop at AGP 9.4.1, or tell the user the pair is untested
Bumping Kotlin with SKIE in the build SKIE is pinned to Kotlin versions; the iOS build breaks Check SKIE releases first; wait, or plan Swift export separately
CMP 1.13 on compileSdk 36 Build fails: 37.1 is required Bump compileSdk (and AGP with API 37) first
Leaving iosX64 in place for CMP 1.11+ or Room 3 No artifacts for that target; resolution fails Remove the target and its kspIosX64 line first
Treating Kotlin 2.5's androidTarget warning as noise It is deprecated on every AGP and incompatible with AGP 9 Schedule the module migration explicitly
Gradle wrapper edited by hand The wrapper jar and scripts stay old ./gradlew wrapper --gradle-version <v>
Moving to the newest Gradle (9.9.x) with Kotlin 2.5.0 Above Kotlin's fully supported 9.8.1 Stay inside both AGP's minimum and Kotlin's range
Quoting the matrix without re-checking It is a dated snapshot Re-open the official page; mark unknowns "check"
Upgrading things the user did not ask for Unreviewed risk, larger diff List them as recommendations only

Related skills

Files (kmp-mobile-skills)
  • references
    • compatibility-matrix.md 11.4 KB
      Loading…
    • upgrade-sequence.md 9.1 KB
      Loading…
  • scripts
    • tests
      • test_toolchain_report.py 10.3 KB
        Loading…
    • toolchain_report.py 28.2 KB
      Loading…
  • SKILL.md 15.1 KB
    ---
    name: kmp-toolchain-upgrade
    description: Use when upgrading, or planning to upgrade, a Kotlin Multiplatform toolchain - Kotlin 2.5, Compose Multiplatform 1.13, AGP 9.x or AGP 10, the Gradle wrapper, JDK 17, Xcode 27 or CI macOS runner images - "what order do we bump things in?", "can we move to Kotlin 2.5?", compileSdk 37.1 required, iosX64 or androidTarget deprecation, SKIE or KMP-NativeCoroutines lagging a new Kotlin, the Swift export DSL change, or any compatibility question that spans Kotlin, Compose, AGP, KSP and Xcode together.
    license: Apache-2.0
    compatibility: Kotlin Multiplatform Gradle project, ideally with gradle/libs.versions.toml. The report script needs Python 3.11+ (standard library only, no network); --detect runs xcodebuild and java. iOS build checks need macOS with Xcode (Xcode 27 needs Apple silicon).
    metadata:
      category: build
      platforms: android, ios
    ---
    
    # KMP toolchain upgrade
    
    Kotlin, Compose Multiplatform, AGP, Gradle, the JDK and Xcode constrain each other, and in December
    2026 all of them moved within weeks. Read every pin first, build an **ordered** plan in which each
    step names what it waits for, then bump **one axis at a time** with a build check after each.
    Recommend; never upgrade something the user did not ask for.
    
    ## When to use
    
    - "Upgrade us to Kotlin 2.5 / CMP 1.13 / AGP 9.5", or "what is the latest we can safely run?".
    - A bump failed and the cause is another tool's version: `compileSdk` 37.1 required, Gradle too old
      for AGP, Kotlin/Native complaining about Xcode, SKIE failing after a Kotlin bump.
    - Deprecation warnings that are really upgrade blockers: `androidTarget` with `com.android.library`,
      `iosX64` or `macosX64`, `swiftExport {}`, `android.newDsl=false`.
    - CI must move to a new Xcode or macOS image.
    - Checking readiness for AGP 10 before it ships.
    
    ## When not to use
    
    - Adding or upgrading one ordinary library: `kmp-gradle-version-catalog`.
    - A red build whose cause is not yet known: `kmp-build-failure-triage`.
    - The AGP 9 module migration itself (split `:composeApp`, Android-KMP library plugin): JetBrains
      [`kotlin-tooling-agp9-migration`](https://github.com/Kotlin/kotlin-agent-skills/tree/main/skills/kotlin-tooling-agp9-migration).
      This skill decides *when* that migration happens in the sequence.
    - A pure Android project with no KMP: Google [`agp-9-upgrade`](https://github.com/android/skills/tree/main/build-system/agp/agp-9-upgrade).
    - Moving from SKIE to Swift export, or rewriting Swift call sites: `kmp-swiftui-interop`.
    
    ## Step 0 — Read the project first
    
    Run from the Gradle root. Paths to `scripts/` are relative to this skill's directory.
    
    ```bash
    python3 scripts/toolchain_report.py --root . --detect --format table     # pins + dated findings
    cat gradle/libs.versions.toml
    grep distributionUrl gradle/wrapper/gradle-wrapper.properties
    ./gradlew --version                                     # Gradle, Kotlin DSL, JVM actually used
    xcodebuild -version; xcode-select -p; uname -m          # Xcode, active path, arm64 or x86_64
    cat .xcode-version 2>/dev/null
    grep -rnE 'runs-on:|xcode-select|Xcode_[0-9]|setup-java|java-version' .github/workflows 2>/dev/null
    grep -rnE 'iosX64|macosX64|tvosX64|watchosX64|watchosArm32|wasmJs|androidTarget|android \{|androidLibrary \{' \
      --include='*.gradle.kts' . | grep -v /build/
    grep -rnE 'skie|nativecoroutines|swiftExport|export \{|cocoapods|swiftPMDependencies' \
      --include='*.gradle.kts' --include='*.toml' . | grep -v /build/
    grep -nE 'android\.(newDsl|builtInKotlin|enableLegacyVariantApi)|kotlin\.' gradle.properties
    ls build-logic buildSrc 2>/dev/null                     # pins may live in convention plugins
    ```
    
    The script needs Python 3.11+; on older Python it exits 2 and you read the same files by hand.
    
    | Record | Why |
    |---|---|
    | Kotlin, Compose compiler plugin, CMP, AGP, KSP versions | The axes being moved |
    | Gradle wrapper and the JDK Gradle runs on | AGP and Kotlin floors |
    | `compileSdk`, `minSdk` (catalog, convention plugin or module) | CMP 1.13 floors |
    | Local Xcode and CI Xcode, CPU architecture, runner labels | Kotlin's Xcode pairing; Xcode 27 is Apple silicon only |
    | KMP targets per module | `iosX64`/`macosX64` block CMP 1.11+ and Room 3; others error on Kotlin 2.5 |
    | Android integration per module: `androidTarget` + `com.android.*`, or `com.android.kotlin.multiplatform.library` + `android {}` | AGP 9 compatibility, Kotlin 2.5 deprecation |
    | Swift bridging: SKIE, KMP-NativeCoroutines, Swift export, CocoaPods, SwiftPM | Compiler plugins pinned to Kotlin versions |
    | Compiler plugins: Koin Compiler Plugin, Room 3 / KSP, serialization | Same reason |
    | `gradle.properties` AGP flags and legacy variant API use | AGP 10 readiness |
    | What the user actually asked for | The plan's goal; everything else is "recommended, not done" |
    
    Done when every row has a value or "not used", and the script report (or your manual equivalent) is
    saved for the plan.
    
    ## Workflow
    
    1. **Load the dated matrix.** Open [references/compatibility-matrix.md](references/compatibility-matrix.md).
       It was checked on 2026-12-03 and changes monthly: before relying on a cell, re-open the linked
       official page (compatibility guide, KGP table, AGP notes, CMP changelog, KSP and SKIE releases).
       If the kotlinlang docs MCP server (`https://mcp.kotlinlang.org/mcp`) is connected, query it. A
       newer release than the matrix knows about means: read its notes, do not guess. Done when every
       version you plan to move to has a confirmed row or is marked "check".
    
    2. **Fix the goal.** Map the request to the smallest goal in
       [references/upgrade-sequence.md](references/upgrade-sequence.md) section 6 ("get on CMP 1.13"
       needs Kotlin 2.4.0+, not 2.5). Do not widen it. Done when the goal is one sentence the user agreed to.
    
    3. **Write the ordered plan.** Use the blocker graph and default order in the sequence reference.
       Every row names its blocker and its build check; anything you recommend but the user did not ask
       for goes under "Not recommended now" or "Optional". Rules that decide the order:
    
       | Must come first | Before |
       |---|---|
       | Remove `iosX64`, `macosX64` | CMP 1.11+, Room 3 |
       | Remove `macosX64`, `tvosX64`, `watchosX64`, `watchosArm32`; `languageVersion` above 2.1 | Kotlin 2.5.0 |
       | JDK 17, then a Gradle wrapper inside both the AGP minimum and the Kotlin range | AGP 9.x |
       | Split a `:composeApp` that applies `com.android.application` + KMP into `androidApp` + `shared` | AGP 9 (Kotlin 2.5 only warns, on any AGP) |
       | `compileSdk` 37.1 (AGP with API 37), `minSdk` 24, Kotlin 2.4.0+ (2.4.20 with JS/Wasm) | CMP 1.13 |
       | SKIE / KMP-NativeCoroutines / Koin Compiler Plugin releases that name the target Kotlin | Any Kotlin bump |
       | Xcode 27 on every iOS Mac and CI runner (`runs-on: xcode-27` on GitHub) | Kotlin 2.5.0 |
       | AGP at or below 9.4.1, unless the user accepts an untested pair | Kotlin 2.5.0 (its tested AGP range ends at 9.4.1) |
    
       Done when the plan uses the template in the sequence reference and lists the unverified cells it
       depends on.
    
    4. **Run the bridging gate before any Kotlin bump.** If SKIE is present and no SKIE release names the
       target Kotlin, stop and tell the user; on 2026-12-03 none names 2.5.0. Same for a
       KMP-NativeCoroutines build and the Koin Compiler Plugin's verified list. Swift export users on
       2.5.0 rewrite `swiftExport {}` to `kotlin { export { swift {} } }` in the bump commit. Done when each
       bridging tool has "supported (link)" or "blocked (link)".
    
    5. **Show the plan and get a go-ahead.** Structural steps (module split, target removal, CI image
       change, dropping SKIE) need an explicit yes. Done when the user picked which rows to execute.
    
    6. **Execute one row at a time.** Change only that row's files, with versions in the catalog
       (`gradle/libs.versions.toml` + `libs.` accessors, never a literal in `build.gradle.kts`), then run
       the row's build check (Verify). Gradle wrapper changes go through
       `./gradlew wrapper --gradle-version <version>` so the jar and scripts update too. On FAIL, stop:
       triage with `kmp-build-failure-triage`, or revert that row and re-plan. Never stack a second bump on
       a red build. Done when the row's check is PASS and the row is a separate commit (if the user commits).
    
    7. **Re-run the report and close out.** `python3 scripts/toolchain_report.py --detect --format table`
       again. Report each executed row with its check result, the rows left, and every finding still open.
    
    ### AGP 10 readiness (optional task)
    
    AGP 10 was announced for "late 2026" and was not released on 2026-12-03. Readiness means the latest
    AGP 9.x builds warning-free with `android.newDsl=true` and `android.builtInKotlin=true`, with no
    `android.newDsl.optOut`, no legacy variant API (`applicationVariants`, `libraryVariants`,
    `variantFilter`) and no third-party plugin that still needs `BaseExtension`. The grep recipe is in the
    sequence reference, section 4. Report readiness; do not move to AGP 10 until it ships and the Kotlin
    compatibility table lists it.
    
    ## Quick reference
    
    | Pair (checked 2026-12-03, re-check) | Rule |
    |---|---|
    | Kotlin 2.5.0 ↔ Xcode | 27.0 (2.4.x: 26.4; 2.3.x: 26.0) |
    | Kotlin 2.5.0 ↔ Gradle / AGP | Gradle 8.14–9.8.1; AGP 8.8.2–9.4.1 (9.5 is outside the tested range) |
    | Kotlin 2.4.20–2.4.21 ↔ Gradle / AGP | Gradle 7.6.3–9.7.0; AGP 8.5.2–9.3.1 |
    | AGP 9.4 / 9.5 | Gradle 9.6.0+, JDK 17, API 37 |
    | CMP 1.13.0 | Kotlin 2.4.0+ (native), 2.4.20+ (JS/Wasm); `compileSdk` 37.1; minSdk 24; no x86_64 Apple targets |
    | Compose compiler plugin | Always the Kotlin version |
    | KSP2 (`2.x.y`) | Decoupled from Kotlin; needs KGP 2.2.10+. KSP1 `<kotlin>-<ksp>` must match Kotlin exactly |
    | SKIE 0.10.16 | Up to Kotlin 2.4.21; 2.5.0 not yet |
    | Room 3 | KSP only; no `iosX64` artifact |
    | GitHub runners | Xcode 27 only on `runs-on: xcode-27`; `macos-latest` has Xcode 26.x |
    
    | Script | Use |
    |---|---|
    | `python3 scripts/toolchain_report.py --detect --format table` | Human-readable pins and findings |
    | `python3 scripts/toolchain_report.py --xcode "$(xcodebuild -version)" --jdk 17` | JSON, Xcode and JDK passed in (CI or another Mac) |
    | `python3 scripts/toolchain_report.py --fail-on blocker` | Exit 1 when a blocker remains |
    | `python3 scripts/toolchain_report.py --help` | All options and exit codes |
    
    ## Verify
    
    Report every check as `PASS`, `FAIL` or `NOT RUN` (with the reason). Never report a check that did
    not run as passed. Run the set after **each** executed row, not once at the end. Replace `:shared`
    and `:androidApp` with the project's modules (`:composeApp` before a split).
    
    ```bash
    ./gradlew help                                          # settings, catalog and plugins resolve
    ./gradlew :shared:compileCommonMainKotlinMetadata
    ./gradlew :shared:compileAndroidMain                    # legacy plugin: compileDebugKotlinAndroid
    ./gradlew :androidApp:assembleDebug
    ./gradlew :shared:compileKotlinIosSimulatorArm64        # macOS only
    ./gradlew :shared:linkDebugFrameworkIosSimulatorArm64   # proves the Xcode pairing, not just compile
    ./gradlew :shared:allTests                              # or the project's test tasks
    xcodebuild -project iosApp/iosApp.xcodeproj -scheme iosApp \
      -destination 'generic/platform=iOS Simulator' build   # the Swift side of SKIE / Swift export
    python3 scripts/toolchain_report.py --detect --fail-on blocker
    ```
    
    `kmp-build-check` runs the Gradle part as one command with per-check PASS/FAIL. iOS checks are NOT RUN
    on a machine without Xcode, or with an Xcode outside the pair for the target Kotlin; say so and name
    where they will run (CI on `xcode-27`, a teammate's Mac). A CI change is verified only by a CI run.
    
    ## Common mistakes
    
    | Mistake | Why it bites | Fix |
    |---|---|---|
    | Bumping Kotlin, CMP and AGP in one commit | A failure cannot be attributed; reverting loses good changes | One row per commit, build check between |
    | Kotlin 2.5 before CI has Xcode 27 | The iOS job fails or runs on an unpaired Xcode | Move CI to `runs-on: xcode-27` (Apple silicon) in or before the Kotlin commit |
    | Taking the newest AGP with Kotlin 2.5.0 | AGP 9.5 is outside Kotlin 2.5.0's tested range | Stop at AGP 9.4.1, or tell the user the pair is untested |
    | Bumping Kotlin with SKIE in the build | SKIE is pinned to Kotlin versions; the iOS build breaks | Check SKIE releases first; wait, or plan Swift export separately |
    | CMP 1.13 on `compileSdk` 36 | Build fails: 37.1 is required | Bump `compileSdk` (and AGP with API 37) first |
    | Leaving `iosX64` in place for CMP 1.11+ or Room 3 | No artifacts for that target; resolution fails | Remove the target and its `kspIosX64` line first |
    | Treating Kotlin 2.5's `androidTarget` warning as noise | It is deprecated on every AGP and incompatible with AGP 9 | Schedule the module migration explicitly |
    | Gradle wrapper edited by hand | The wrapper jar and scripts stay old | `./gradlew wrapper --gradle-version <v>` |
    | Moving to the newest Gradle (9.9.x) with Kotlin 2.5.0 | Above Kotlin's fully supported 9.8.1 | Stay inside both AGP's minimum and Kotlin's range |
    | Quoting the matrix without re-checking | It is a dated snapshot | Re-open the official page; mark unknowns "check" |
    | Upgrading things the user did not ask for | Unreviewed risk, larger diff | List them as recommendations only |
    
    ## Related skills
    
    - `kmp-gradle-version-catalog` — catalog entries, aliases, single-library upgrades.
    - `kmp-build-check` — the per-step both-platform build and test gate.
    - `kmp-build-failure-triage` — when a step's check fails.
    - `android-to-kmp-migration` — module layout for projects still mid-migration.
    - `kmp-swiftui-interop` — SKIE, KMP-NativeCoroutines and Swift export trade-offs and call sites.
    - `kmp-room-database` — Room 2 to Room 3 moves.
    - `kmp-ci-github-actions` — runner labels, Xcode selection, JDK setup in workflows.
    - JetBrains [`kotlin-tooling-agp9-migration`](https://github.com/Kotlin/kotlin-agent-skills/tree/main/skills/kotlin-tooling-agp9-migration)
      and [`kotlin-tooling-cocoapods-spm-migration`](https://github.com/Kotlin/kotlin-agent-skills/tree/main/skills/kotlin-tooling-cocoapods-spm-migration),
      plus the kotlinlang docs MCP server (`https://mcp.kotlinlang.org/mcp`, setup in the
      [kotlin-agent-skills README](https://github.com/Kotlin/kotlin-agent-skills)).
    - Google [`agp-9-upgrade`](https://github.com/android/skills/tree/main/build-system/agp/agp-9-upgrade) —
      the pure-Android `androidApp` host module only; it excludes KMP modules.
    - Koin [`di-migration`](https://github.com/InsertKoinIO/koin-skills/tree/main/skills/di-migration) —
      moving to Koin 4.x with the Compiler Plugin, whose Kotlin support gates the Kotlin bump.
    - Official sources: [KMP compatibility guide](https://kotlinlang.org/docs/multiplatform/multiplatform-compatibility-guide.html),
      [KGP compatibility](https://kotlinlang.org/docs/gradle-configure-project.html),
      [What's new in Kotlin 2.5.0](https://kotlinlang.org/docs/whatsnew25.html),
      [What's new in CMP 1.13](https://kotlinlang.org/docs/multiplatform/whats-new-compose-113.html),
      [AGP release notes](https://developer.android.com/build/releases/gradle-plugin),
      [AGP roadmap](https://developer.android.com/build/releases/gradle-plugin-roadmap),
      [KSP releases](https://github.com/google/ksp/releases),
      [SKIE releases](https://github.com/touchlab/SKIE/releases).
    

Comments

Sign in to join the conversation.

No comments yet. Start the conversation.

Reviews (0)

No reviews yet.