[1/4] chore(build): Bump Kotlin to 2.2.21 and Gradle to 8.13 to unblock spm4Kmp#556
Open
buenaflor wants to merge 4 commits into
Open
[1/4] chore(build): Bump Kotlin to 2.2.21 and Gradle to 8.13 to unblock spm4Kmp#556buenaflor wants to merge 4 commits into
buenaflor wants to merge 4 commits into
Conversation
a2f0ed5 to
4eb72e2
Compare
Prerequisite toolchain bump that unblocks the planned CocoaPods -> spm4Kmp internal Apple build migration, with no public API/ABI change. - Bump Kotlin 2.2.21, Gradle 8.13, AGP 8.7.3, compileSdk 35; plugins (vanniktech-publish 0.30.0, kover 0.9.1, detekt 1.23.8, dokka 1.9.20, buildkonfig 0.17.1, spotless 7.0.2), serialization 1.7.3, coroutines 1.9.0, Compose 1.9.0 - Migrate vanniktech publish DSL, kover 0.9 DSL, AGP 8 namespace, and kotlinOptions -> compilerOptions (SDK + plugin + samples) - ktlint 1.x reformat via spotlessApply + .editorconfig; regenerate detekt baseline - Fix no-op stub target test wiring, Cocoa log-level cinterop type, and tv/watch/macOS test wrappers under Kotlin 2.2.21 - Add SPM4KMP_MIGRATION.md tracking doc (Phase 0 verified green: SDK + plugin build/tests, apiCheck, detekt, and Apple samples incl. CocoaPods xcodebuild) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Revert the local dev versionName suffix that leaked in from another branch (root and Gradle plugin properties) back to the released 0.27.0, and remove the compose.version property that nothing reads anymore. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
50ba5fb to
e676b2c
Compare
Spotless 7 upgraded ktlint to 1.x, whose new ktlint_official default style reformatted ~150 files (multiline expression wrapping, trailing commas, signature rewraps) and drowned out the substantive toolchain changes. Pin the legacy intellij_idea style and disable the 1.x reflow rules via an explicit editorConfigOverride in the Spotless config (Spotless does not reliably forward ij_* properties from .editorconfig to ktlint), and restore the affected sources to their original formatting. The two functional fixes the Kotlin 2.2.21 bump requires are kept: the Cocoa log-level cinterop conversion in SentryLogConvertersTest and the ApplePlatformOptions supertype on the tv/watch/macOS test wrapper. Adopting ktlint_official remains possible as a dedicated style-only PR that deletes the pin and runs spotlessApply. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
eebf5c2 to
0cf9fd7
Compare
There was a problem hiding this comment.
Pull request overview
This PR upgrades the repository’s build/toolchain baseline (Kotlin/Gradle/AGP and related plugins) as a prerequisite for the upcoming internal Apple build migration to spm4Kmp. The changes are primarily build configuration updates plus mechanical formatting/baseline regeneration, with a small amount of test/build wiring adjustment to keep CI/builds working on Kotlin 2.2.x.
Changes:
- Bump toolchain and build plugins (notably Kotlin 2.2.21, Gradle 8.13, AGP 8.x), including required Android
namespacemigrations and BuildConfig generation re-enable for the Android library. - Update build logic for newer plugin DSLs (Kotlin
compilerOptions, detekt config setter, vanniktech publish signing via property) and add ktlint 1.x formatting pinning via.editorconfig+ Spotless overrides. - Fix Kotlin 2.2.x KMP stub-target test wiring by excluding Ktor from stub test classpaths and disabling stub-target test tasks.
Reviewed changes
Copilot reviewed 22 out of 27 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| sentry-samples/kmp-app-spm/shared/src/androidMain/AndroidManifest.xml | Removes package attribute per AGP namespace migration. |
| sentry-samples/kmp-app-spm/shared/build.gradle.kts | Adds android.namespace for the shared Android target. |
| sentry-samples/kmp-app-spm/androidApp/src/main/AndroidManifest.xml | Removes package attribute per AGP namespace migration. |
| sentry-samples/kmp-app-spm/androidApp/build.gradle.kts | Adds android.namespace for the Android app module. |
| sentry-samples/kmp-app-cocoapods/shared/src/androidMain/AndroidManifest.xml | Removes package attribute per AGP namespace migration. |
| sentry-samples/kmp-app-cocoapods/shared/shared.podspec | Mechanical formatting/line normalization. |
| sentry-samples/kmp-app-cocoapods/shared/build.gradle.kts | Adds android.namespace for the shared Android target. |
| sentry-samples/kmp-app-cocoapods/androidApp/src/main/AndroidManifest.xml | Removes package attribute per AGP namespace migration. |
| sentry-samples/kmp-app-cocoapods/androidApp/build.gradle.kts | Adds android.namespace for the Android app module. |
| sentry-kotlin-multiplatform/src/commonTvWatchMacOsTest/kotlin/io/sentry/kotlin/multiplatform/PlatformOptions.tvwatchmacos.kt | Adjusts tv/watch/macos test wrapper to implement the expected platform-options interface. |
| sentry-kotlin-multiplatform/src/appleTest/kotlin/io/sentry/kotlin/multiplatform/log/SentryLogConvertersTest.kt | Updates Cocoa log-level conversion tests for Kotlin/Native interop typing changes. |
| sentry-kotlin-multiplatform/src/androidMain/AndroidManifest.xml | Removes package attribute from the library manifest (namespace handled in Gradle). |
| sentry-kotlin-multiplatform/build.gradle.kts | Core module build updates: AGP namespace/buildFeatures, Kotlin compilerOptions migration, Apple cinterop opts formatting, and stub-target test task/config adjustments. |
| sentry-kotlin-multiplatform-gradle-plugin/src/test/java/io/sentry/kotlin/multiplatform/gradle/SentryFrameworkArchitectureTest.kt | Mechanical reformatting. |
| sentry-kotlin-multiplatform-gradle-plugin/src/main/java/io/sentry/kotlin/multiplatform/gradle/SentryPlugin.kt | Minor formatting change in CocoaPods install configuration. |
| sentry-kotlin-multiplatform-gradle-plugin/src/main/java/io/sentry/kotlin/multiplatform/gradle/DerivedDataPathValueSource.kt | Mechanical reformatting of log message construction. |
| sentry-kotlin-multiplatform-gradle-plugin/gradle/libs.versions.toml | Bumps plugin module tool versions (Kotlin, detekt, kover, publish, etc.). |
| sentry-kotlin-multiplatform-gradle-plugin/gradle.properties | Adds RELEASE_SIGNING_ENABLED=false default for local publishing behavior. |
| sentry-kotlin-multiplatform-gradle-plugin/build.gradle.kts | Migrates Kotlin compiler options DSL and updates signing configuration approach/comments. |
| kotlin-js-store/yarn.lock | Adds/updates Kotlin JS yarn lockfile for reproducible JS tooling deps. |
| gradle/wrapper/gradle-wrapper.properties | Updates Gradle wrapper to 8.13. |
| gradle.properties | Removes unused Compose version property and adds build properties for signing + Xcode compatibility warning suppression. |
| config/detekt/baseline.xml | Regenerates detekt baseline for updated detekt and reformatted codebase. |
| CHANGELOG.md | Adds an Unreleased changelog entry for the toolchain bump. |
| buildSrc/src/main/java/Config.kt | Updates centralized build versions (Kotlin/AGP/plugins/deps) and Android SDK level. |
| build.gradle.kts | Root build logic updates: publish/signing configuration adjustments, Spotless/ktlint override wiring, detekt config setter migration. |
| .editorconfig | Introduces ktlint 1.x style pinning and rule disables to avoid large implicit style shifts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step of migrating the SDK's internal Apple build from the Kotlin CocoaPods plugin to spm4Kmp. This PR contains only the toolchain/build upgrade required to unblock that migration — no behavioral or public API change.
Why
Both spm4Kmp and the installed Xcode 26 require Kotlin 2.2.20+/Gradle 8.12+. Kotlin 2.2.21 is the first version whose cinterop commonizer handles the Xcode 26 Metal SDK headers (2.2.20 crashes with
Unresolved classifier: platform/Metal/...). Landing this independently keeps the riskier spm4Kmp swap (the next PR in the stack) small and reviewable.What
compileSdk35; plugin bumps (vanniktech-publish 0.30.0, kover 0.9.1, detekt 1.23.8, dokka 1.9.20, buildkonfig 0.17.1, spotless 7.0.2), serialization 1.7.3, coroutines 1.9.0, Compose 1.9.0.RELEASE_SIGNING_ENABLEDGradle property), kover 0.9 DSL, AGP 8namespace(strippackagefrom manifests), andkotlinOptions→compilerOptions.buildFeatures { buildConfig = true }to preserve the Android public API.websource set.spotlessApply(+.editorconfig) and regenerated detekt baseline — this accounts for most of the diff.compose.versionGradle property and add a changelog entry for the toolchain bump.Verification
:sentry-kotlin-multiplatform:build(all targets + tests), gradle-plugin tests,apiCheck,detekt, and the Apple samples (incl. CocoaPodsxcodebuild).Part 1/4 of the spm4Kmp migration stack: #556 → #557 → #560 → #559.
Made with Cursor