Skip to content

Commit ecb9d59

Browse files
toniheimicrokatz
authored andcommitted
Enfore minCompileSdk version when depending on ExoPlayer/Media3 libs
If an app sets a compileSdkVersion that is lower than the one used to create AARs of its dependencies, the build process may produce invalid outputs, for example by stripping methods from the APK that are only called when the app is running on a new API version. To avoid this issue, we can enforce that the compileSdk of apps or libraries depending on ExoPlayer/Media3 is at least the same as the one we used for compilation when creating the AAR. Issue: google/ExoPlayer#10684 PiperOrigin-RevId: 485100067 (cherry picked from commit 136b8c5)
1 parent 91d08c1 commit ecb9d59

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

RELEASENOTES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Release notes
2626
* Send missing `onMediaItemTransition` callback when calling `seekToNext`
2727
or `seekToPrevious` in a single-item playlist
2828
([#10667](https://github.com/google/ExoPlayer/issues/10667)).
29+
* Enforce minimum `compileSdkVersion` to avoid compilation errors
30+
([#10684](https://github.com/google/ExoPlayer/issues/10684)).
2931
* Downloads:
3032
* Fix potential infinite loop in `ProgressiveDownloader` caused by
3133
simultaneous download and playback with the same `PriorityTaskManager`

common_library_config.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ android {
2222
targetSdkVersion project.ext.targetSdkVersion
2323
consumerProguardFiles 'proguard-rules.txt'
2424
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
25+
aarMetadata {
26+
minCompileSdk = project.ext.compileSdkVersion
27+
}
2528
}
2629

2730
compileOptions {

0 commit comments

Comments
 (0)