fix: [SDK-4511] fix Android build with Kotlin stdlib 2.2.x - #20
Merged
Conversation
14 tasks
- README: fix button count (three -> four) and `cd` path (demo-cap7 -> demo_cap7). - Remove ExampleInstrumentedTest.java and ExampleUnitTest.java; they were at the wrong package path with a guaranteed-fail assertion. Matches examples/demo which ships neither. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
@claude review |
Match Android applicationId/namespace/strings and capacitor appId to com.onesignal.example so the cap7 demo shares bundle id with the existing iOS demo configuration. Co-authored-by: Cursor <cursoragent@cursor.com>
project.hasProperty matches every Gradle property source, but
rootProject.extra only sees ext { ... } values, so a host that
pinned kotlin_version or the SDK levels via gradle.properties
or -P flags would crash at configuration with
UnknownPropertyException (or ClassCastException in the Int case).
Switch the buildscript kotlin_version reader and the
propertyOrCatalog / intPropertyOrCatalog helpers to
findProperty(...).toString(), and update the Android README to
document the full set of supported override sources.
Co-authored-by: Cursor <cursoragent@cursor.com>
sherwinski
approved these changes
May 14, 2026
Match the plugin catalog (minSdk = "24"); 23 would fail manifest merger since the library requires a higher floor than the host. Co-authored-by: Cursor <cursoragent@cursor.com>
Merged
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.
One Line Summary
Fix Android builds where
kotlin-stdlib2.2.x is on the app classpath but the OneSignal Capacitor plugin was compiled with Kotlin 1.9.25.Fixes #18.
Motivation
Apps using newer Android/Kotlin tooling can fail to build when the plugin brings or assumes incompatible Kotlin/AGP versions. This PR makes the Android build setup clearer and aligns the plugin/demo with host build tooling expectations so Capacitor 7 projects can validate the fixed path.
Scope
examples/demo_cap7with Angular, Capacitor config, iOS project files, Android project files, and a simple OneSignal integration surface to reproduce and validate Capacitor 7 builds.Testing
vp checkvp test(177 tests passed)Affected Code Checklist
Checklist
SDK-4511