Skip to content

Commit df6bed6

Browse files
runningcodeclaude
andauthored
build: Bump target and compile SDK to 37 (JAVA-648) (#5796)
* build: Bump target and compile SDK to 37 Raise targetSdk and compileSdk from 36 to 37 and remove the temporary GradleDependency lint suppression that was in place only until this bump. API 37 makes MediaCodecInfo.getVideoCapabilities() nullable, so guard the access in SimpleVideoEncoder to keep it compiling. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * changelog * build: Drop obsolete OldTargetApi lint suppression Now that the integration test modules target API 37, lint no longer flags OldTargetApi, so remove the temporary suppression added while they were on 36. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * changelog --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 5f42ae8 commit df6bed6

6 files changed

Lines changed: 4 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0154)
1818
- [diff](https://github.com/getsentry/sentry-native/compare/0.15.3...0.15.4)
1919
- The SDK is now compiled with Android Gradle Plugin 9.2.1 ([#5779](https://github.com/getsentry/sentry-java/pull/5779))
20+
- The SDK has been fully tested for compatibility with Android 17 and platform 37; it is now compiled and tested against it ([#5796](https://github.com/getsentry/sentry-java/pull/5796))
2021

2122
## 8.49.0
2223

build.gradle.kts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -113,20 +113,6 @@ allprojects {
113113
subprojects {
114114
apply { plugin("io.sentry.spotless") }
115115

116-
// AGP 9.2 bundles lint 9.2.1, which flags compileSdk 36 as outdated because 37 is available.
117-
// We intentionally stay on compileSdk 36 until the API 37 bump (#5768), so silence that check
118-
// for every Android module (library and application).
119-
pluginManager.withPlugin("com.android.library") {
120-
extensions.configure<com.android.build.gradle.BaseExtension> {
121-
lintOptions { disable("GradleDependency") }
122-
}
123-
}
124-
pluginManager.withPlugin("com.android.application") {
125-
extensions.configure<com.android.build.gradle.BaseExtension> {
126-
lintOptions { disable("GradleDependency") }
127-
}
128-
}
129-
130116
plugins.withId(Config.QualityPlugins.detektPlugin) {
131117
configure<DetektExtension> {
132118
buildUponDefaultConfig = true

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ springboot4 = "4.1.0"
4747
sqldelight = "2.3.2"
4848

4949
# Android
50-
targetSdk = "36"
51-
compileSdk = "36"
50+
targetSdk = "37"
51+
compileSdk = "37"
5252
minSdk = "21"
5353

5454
[plugins]

sentry-android-integration-tests/sentry-uitest-android-benchmark/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ android {
7070
lint {
7171
warningsAsErrors = true
7272
checkDependencies = true
73-
// Suppress OldTargetApi: lint 9.2.1 expects API 37 but we target 36
74-
disable += "OldTargetApi"
7573

7674
// We run a full lint analysis as build part in CI, so skip vital checks for assemble tasks.
7775
checkReleaseBuilds = false

sentry-android-integration-tests/sentry-uitest-android/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ android {
6969
lint {
7070
warningsAsErrors = true
7171
checkDependencies = true
72-
// Suppress OldTargetApi: lint 9.2.1 expects API 37 but we target 36
73-
disable += "OldTargetApi"
7472

7573
// We run a full lint analysis as build part in CI, so skip vital checks for assemble tasks.
7674
checkReleaseBuilds = false

sentry-android-replay/src/main/java/io/sentry/android/replay/video/SimpleVideoEncoder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ internal class SimpleVideoEncoder(
8181
val videoCapabilities =
8282
mediaCodec.codecInfo.getCapabilitiesForType(muxerConfig.mimeType).videoCapabilities
8383

84-
if (!videoCapabilities.bitrateRange.contains(bitRate)) {
84+
if (videoCapabilities != null && !videoCapabilities.bitrateRange.contains(bitRate)) {
8585
options.logger.log(
8686
DEBUG,
8787
"Encoder doesn't support the provided bitRate: $bitRate, the value will be clamped to the closest one",

0 commit comments

Comments
 (0)