Skip to content

Upgrade Kotlin to 2.4.21 [CLF-719] - #197

Merged
pyricau merged 1 commit into
mainfrom
zachklipp/kotlin-upgrade-a07950
Nov 4, 2026
Merged

pyricau merged 1 commit into
mainfrom
zachklipp/kotlin-upgrade-a07950

Conversation

@zach-klippenstein

@zach-klippenstein zach-klippenstein commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Upgrades Kotlin from 2.3.10 to 2.4.21 (latest stable) ahead of the 2.11 release.

Stacked on #200 (ktfmt migration); GitHub will retarget to main once that merges.

Version changes

  • kotlin: 2.3.10 → 2.4.21. The Compose compiler Gradle plugin shares this version ref, so it moves with it.
  • No other plugin bumps were required: Dokka 2.1.0 and binary-compatibility-validator 0.16.3 build fine against 2.4.21. Compose itself is intentionally untouched (separate PR).

Source fix needed for a green ./gradlew build

  • Lint: under Kotlin 2.4.21, Android lint flags roots.forEach { ... } in Radiography.scan as a NewApi error (java.lang.Iterable#forEach requires API 24, min is 23). Replaced with an equivalent for loop. No behavior change.

apiCheck passes with no API dump changes. ktfmtCheck passes.

Testing

  • ./gradlew ktfmtCheck build passes locally.
  • ./gradlew connectedCheck passes on an API 35 emulator and a physical Samsung device on Android 16: all 34 compose-tests, 5 radiography, and the compose-unsupported-tests and sample tests. (One sample-compose run hit a "No compose hierarchies found" failure while another session was sharing the emulator; it passed on rerun.)

Linear: CLF-719

🤖 Generated with Claude Code

@zach-klippenstein
zach-klippenstein force-pushed the zachklipp/kotlin-upgrade-a07950 branch from 1a385fe to 3155638 Compare November 4, 2026 00:55
@zach-klippenstein
zach-klippenstein changed the base branch from main to zachklipp/fix-main-ci-c61e01 November 4, 2026 00:55
Base automatically changed from zachklipp/fix-main-ci-c61e01 to main November 4, 2026 01:09
Bumps the Kotlin version (and the Compose compiler Gradle plugin, which
shares the version ref) from 2.3.10 to 2.4.21.

Android lint under Kotlin 2.4.21 reports `Iterable.forEach` in
`Radiography.scan` as a NewApi error (requires API 24, min is 23), so
the inline `forEach` is replaced with an equivalent `for` loop.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@zach-klippenstein
zach-klippenstein force-pushed the zachklipp/kotlin-upgrade-a07950 branch from 3155638 to 9edc71a Compare November 4, 2026 01:25
@zach-klippenstein
zach-klippenstein changed the base branch from main to zachklipp/radiography-ktlint-ktfmt-cfa2a9 November 4, 2026 01:25
Base automatically changed from zachklipp/radiography-ktlint-ktfmt-cfa2a9 to main November 4, 2026 01:29
@pyricau
pyricau merged commit d6869f2 into main Nov 4, 2026
13 checks passed
@pyricau
pyricau deleted the zachklipp/kotlin-upgrade-a07950 branch November 4, 2026 08:12
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.

3 participants