From 3ced1cbaa28c616e6a9d0b1a0a2bae9633018d79 Mon Sep 17 00:00:00 2001 From: ibaker Date: Mon, 21 Aug 2023 18:01:28 +0100 Subject: [PATCH] Update `annotation-experimental` version This picks up a fix to ensure Android Studio puts the `@OptIn` annotation in the correct place: https://issuetracker.google.com/251172715 This also introduces a transitive dependency from `media3-common` on the Kotlin standard library, so this CL also includes some updates to the dev guide to document how apps can avoid including this dep if they want. PiperOrigin-RevId: 558821673 --- RELEASENOTES.md | 5 +++++ constants.gradle | 3 +-- demos/main/build.gradle | 11 +++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index e1ff64235c..8aaf14484a 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -62,6 +62,11 @@ This release includes the following changes since `PlayerView.setShowPlayButtonIfPlaybackIsSuppressed(false)` or `MediaSession.Builder.setShowPlayButtonIfPlaybackIsSuppressed(false)` ([#11213](https://github.com/google/ExoPlayer/issues/11213)). + * Upgrade `androidx.annotation:annotation-experimental` to `1.3.1`. This + also introduces a transitive dependency on the Kotlin standard library + from `media3-common`. Apps can + [downgrade to remove this dependency if they want](https://developer.android.com/guide/topics/media/exoplayer/shrinking#remove-kotlin-dep). + Fixes https://issuetracker.google.com/251172715. * ExoPlayer: * Fix seeking issues in AC4 streams caused by not identifying decode-only samples correctly diff --git a/constants.gradle b/constants.gradle index a146db9710..4eefd7e70d 100644 --- a/constants.gradle +++ b/constants.gradle @@ -34,8 +34,7 @@ project.ext { kotlinAnnotationsVersion = '1.8.20' // Updating this to 1.4.0+ will import Kotlin stdlib [internal ref: b/277891049]. androidxAnnotationVersion = '1.3.0' - // Updating this to 1.3.0+ will import Kotlin stdlib [internal ref: b/277891049]. - androidxAnnotationExperimentalVersion = '1.2.0' + androidxAnnotationExperimentalVersion = '1.3.1' androidxAppCompatVersion = '1.6.1' androidxCollectionVersion = '1.2.0' androidxConstraintLayoutVersion = '2.1.4' diff --git a/demos/main/build.gradle b/demos/main/build.gradle index 850a24ac0a..c483532be9 100644 --- a/demos/main/build.gradle +++ b/demos/main/build.gradle @@ -72,6 +72,17 @@ android { dependencies { compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion + // Demonstrate downgrading the annotation-experimental version to avoid + // transitively depending on the Kotlin standard library (which was + // introduced as a dependency in annotation-experimental:1.3.0). This demo + // app still depends on Kotlin via the IMA extension and UI modules, but + // this shows how an app can avoid the Kotlin dependency if they don't use + // these modules. + implementation('androidx.annotation:annotation-experimental') { + version { + strictly '1.2.0' + } + } implementation 'androidx.appcompat:appcompat:' + androidxAppCompatVersion implementation 'androidx.multidex:multidex:' + androidxMultidexVersion implementation 'com.google.android.material:material:' + androidxMaterialVersion