Target Android 15 (API 35) for Play upload#26
Merged
Conversation
Google Play now requires new apps to target at least API level 35. Set targetSdk to 35 and compileSdk to 36 (API 35 is not installed locally; the installed platform is 36, and compileSdk may exceed targetSdk). Bump versionCode to 2 because the prior target 34 upload consumed version code 1 on the internal testing track. Suppress the AGP 8.5.0 unsupported compileSdk warning, which is non fatal.
Robolectric 4.12.2 supports a maximum Android SDK of 34. Bumping targetSdk to 35 for the Play upload made every un-annotated Robolectric suite fail to initialize with targetSdkVersion=35 > maxSdkVersion=34, turning 10 Compose UI suites red. Pinning the test runtime to SDK 34 via robolectric.properties keeps the suite green while the app still ships targetSdk 35. Suite back to 483 passing, 0 failures, 4 skipped.
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.
Summary
Targets Android 15 (API 35) so the app meets the Play Console new app target SDK requirement, and keeps the unit suite green under that bump.
Two commits:
7a00a00).compileSdk34 to 36,targetSdk34 to 35,versionCode1 to 2, plusandroid.suppressUnsupportedCompileSdk=36.3105e9a). Robolectric 4.12.2 supports a maximum Android SDK of 34. Without a pin it defaults to the apptargetSdkVersion, so the bump to 35 made every un-annotated Robolectric suite fail to initialize (targetSdkVersion=35 > maxSdkVersion=34), turning 10 Compose UI suites red. A globalrobolectric.propertieswithsdk=34keeps the test runtime on 34 while the app still shipstargetSdk 35.Verification
./gradlew :app:testDebugUnitTest).versionCode 2,targetSdk 35,compileSdk 36, permissions limited to CAMERA and RECORD_AUDIO, no INTERNET or ACCESS_NETWORK_STATE, validly signed with the release key.Notes