fix: [SDK-4192] downgrade Kotlin from 2.2.0 to 1.9.25#2601
Merged
fadi-george merged 4 commits intomainfrom Apr 7, 2026
Merged
Conversation
abdulraqeeb33
requested changes
Apr 7, 2026
| } | ||
|
|
||
| sharedPreferences.edit() | ||
| sharedPreferences!!.edit() |
Contributor
There was a problem hiding this comment.
can we avoid the !! instead add .?
Contributor
Author
There was a problem hiding this comment.
Updated to use lateinit var
abdulraqeeb33
approved these changes
Apr 7, 2026
fadi-george
added a commit
that referenced
this pull request
Apr 7, 2026
Merged
This was referenced Apr 7, 2026
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.
Description
One Line Summary
Downgrade Kotlin from 2.2.0 to 1.9.25 to maximize compatibility with consuming projects (including wrapper SDKs on Kotlin 1.9.x).
Details
Motivation
The otel crash reporting PR (#2511) bumped Kotlin from 1.9.25 to 2.2.0. This forces all consumers of the SDK to use Kotlin 2.x, which is a messy change for wrapper SDKs (Flutter, React Native, Cordova, Capacitor, Unity, .NET) and any app still on Kotlin 1.9.x. Since no Kotlin 2.x language features are used in the SDK source code, downgrading to 1.9.25 restores the widest compatibility window — consumers on both 1.9.x and 2.x can use the SDK.
Scope
kotlinVersionreverted to1.9.25inOneSignalSDK/build.gradle-Xskip-metadata-version-checkcompiler flag to handle transitive dependencies (okio via OkHttp via OpenTelemetry OTLP exporter) compiled with Kotlin 2.x metadata. This is a compile-time-only metadata check skip; binary compatibility is maintained.OtelIntegrationTest.ktrequired an explicit!!non-null assertion that Kotlin 2.x's improved smart casts had made unnecessary.org.jetbrains.kotlin.plugin.composeplugin with the pre-2.0composeOptionsapproach using Compose compiler extension1.5.15(the version compatible with Kotlin 1.9.25). Also renamed user-facing "Activity" labels to "Screen".Testing
Unit testing
assembleReleasebuilds successfully (all modules including otel):OneSignal:otel:testReleaseUnitTestpasses:OneSignal:core:testReleaseUnitTestpasses (2 pre-existingSDKInitTestsfailures unrelated to this change — also fail onmain)Manual testing
Build verified locally via


./gradlew assembleRelease— all 358 tasks succeeded.Check crash still logs:
Affected code checklist
Checklist
Overview
Testing
Final pass
Made with Cursor