Skip to content

feat: upgrade Kotlin to 2.1.20 across core SDK and kits#732

Merged
nickolas-dimitrakas merged 2 commits into
workstation/6.0-Releasefrom
feat/upgrade-kotlin-2-1-20
Jul 16, 2026
Merged

feat: upgrade Kotlin to 2.1.20 across core SDK and kits#732
nickolas-dimitrakas merged 2 commits into
workstation/6.0-Releasefrom
feat/upgrade-kotlin-2-1-20

Conversation

@denischilik

Copy link
Copy Markdown
Contributor

Summary

  • Upgrade Kotlin from 2.0.20 to 2.1.20 across the root build, buildSrc, and all integrated kits (the Rokt kit was already on 2.1.20; the isolated urbanairship-20 kit stays on 2.2.20).
  • Root kotlin-gradle-plugin classpath now references $kotlin_version so the two declarations can no longer drift apart.
  • Fix tooling/common compilation: String.toLowerCase() is an error in Kotlin 2.1 — replaced with lowercase().
  • Fix kit unit tests (appsflyer, braze 38-41, ga, ga4): JSONObject().put("as", map) resolved to the put(String, Map) overload under Kotlin 2.0 but to put(String, Object) under 2.1, leaving a raw Map where the config parser expects a nested JSONObject. Tests now construct the nested JSONObject explicitly, which is compiler-version independent.
  • Update the [Unreleased] CHANGELOG entry and the root KGP version referenced in ONBOARDING.md.

Test plan

  • ./gradlew build (core, kit-base, tooling: assemble + unit tests + lint)
  • ./gradlew -p kits testRelease -c ../settings-kits.gradle -Pmparticle.kit.mparticleFromMavenLocalOnly=true (all 24 kits)
  • ktlintCheck and lint for core and kits
  • Isolated urbanairship-20 kit testRelease against the new core from mavenLocal
  • Instrumented tests via CI

@denischilik denischilik requested a review from a team as a code owner July 15, 2026 19:59
@cursor

cursor Bot commented Jul 15, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Wide toolchain bump touches all modules and may surface compile or dependency issues for integrators, but production SDK paths are largely version pins with small tooling and test-only fixes.

Overview
Upgrades Kotlin from 2.0.20 to 2.1.20 on the root project, buildSrc, and every integrated kit’s build.gradle. The root kotlin-gradle-plugin classpath now uses $kotlin_version so it stays aligned with ext.kotlin_version.

Follow-up fixes keep the tree building on 2.1: tooling/common replaces deprecated toLowerCase() with lowercase() in Config.from, and Appsflyer, Braze (38–41), GA, and GA4 kit tests wrap kit settings maps in JSONObject(...) when calling put("as", ...) so config fixtures match nested JSON (Kotlin 2.1 resolves JSONObject.put differently than 2.0).

CHANGELOG and ONBOARDING document the bump and update the isolated-kit KGP reference to 2.1.20.

Reviewed by Cursor Bugbot for commit 9569ddd. Bugbot is set up for automated code reviews on this repo. Configure here.

@sonarqubecloud

Copy link
Copy Markdown

@nickolas-dimitrakas nickolas-dimitrakas merged commit 29b0a28 into workstation/6.0-Release Jul 16, 2026
47 of 48 checks passed
@nickolas-dimitrakas nickolas-dimitrakas deleted the feat/upgrade-kotlin-2-1-20 branch July 16, 2026 14:17
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