feat(android): Compile against Android SDK 37#5723
Draft
runningcode wants to merge 3 commits into
Draft
Conversation
Contributor
|
804d9ed to
b85ca7b
Compare
📲 Install BuildsAndroid
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 4c04bb8 | 350.71 ms | 413.63 ms | 62.92 ms |
| bb0ff41 | 315.84 ms | 350.76 ms | 34.92 ms |
| 7c1a728 | 289.46 ms | 368.15 ms | 78.69 ms |
| ff8eea4 | 313.42 ms | 337.08 ms | 23.66 ms |
| bbc35bb | 298.53 ms | 372.17 ms | 73.64 ms |
| 91bb874 | 311.00 ms | 363.47 ms | 52.47 ms |
| abfcc92 | 337.38 ms | 427.39 ms | 90.00 ms |
| ae7fed0 | 293.84 ms | 380.22 ms | 86.38 ms |
| 3998a95 | 415.94 ms | 478.54 ms | 62.60 ms |
| d15471f | 307.28 ms | 381.85 ms | 74.57 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 4c04bb8 | 0 B | 0 B | 0 B |
| bb0ff41 | 0 B | 0 B | 0 B |
| 7c1a728 | 0 B | 0 B | 0 B |
| ff8eea4 | 1.58 MiB | 2.28 MiB | 718.64 KiB |
| bbc35bb | 1.58 MiB | 2.12 MiB | 553.01 KiB |
| 91bb874 | 1.58 MiB | 2.13 MiB | 559.07 KiB |
| abfcc92 | 1.58 MiB | 2.13 MiB | 557.31 KiB |
| ae7fed0 | 1.58 MiB | 2.12 MiB | 551.77 KiB |
| 3998a95 | 1.58 MiB | 2.10 MiB | 532.96 KiB |
| d15471f | 1.58 MiB | 2.13 MiB | 559.54 KiB |
4eaa43f to
d35a1d5
Compare
Bump compileSdk and targetSdk to 37 (Android 17). Also handle the now-nullable MediaCodecInfo.getVideoCapabilities() in SimpleVideoEncoder: the API 37 android.jar annotates it @nullable, which otherwise fails Kotlin compilation. The access is already inside a try/catch, so behavior is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
API 37 ships as a minor-versioned platform (android-37.0). Install it explicitly in the AGP compatibility matrix before building the release APK so the platform can be resolved. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
f0c3a94 to
e007f1c
Compare
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.
Ref: JAVA-631
📜 Description
Compile the Android SDK against API 37 (Android 17) by bumping
compileSdkandtargetSdkfrom 36 to 37 ingradle/libs.versions.toml.This also fixes a compilation break the new SDK surfaces: in the API 37
android.jar,MediaCodecInfo.CodecCapabilities.getVideoCapabilities()is now annotated@Nullable.SimpleVideoEncoderdereferenced it without a null check, which fails Kotlin compilation. The access is already wrapped in atry/catch, so adding the null guard keeps behavior unchanged.💡 Motivation and Context
Verify the SDK builds and behaves correctly against the latest Android SDK so downstream apps can compile/target API 37 without issues.
Verified against API 37 on this branch: full SDK + sample assemble, clean lint (
AGP 8.13.1), R8 full-mode release build (no missing rules, runs clean), external app consuming the published artifacts, and runtime coverage on an API 37 emulator (crashes, ANRs incl. native, Session Replay h264 encoding — the exactSimpleVideoEncoderpath — messages, and profiling), all landing in Sentry.💚 How did you test it?
./gradlew assemble+ sampleassembleRelease/assembleDebugagainst compileSdk/targetSdk 37lintReleaseon core Android modules — no issuespublishToMavenLocalartifacts from a standalone external app📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps