Skip to content

Commit

Permalink
Upgrade Gradle and AGP
Browse files Browse the repository at this point in the history
The newer versions include a bugfix that automatically highlights
when our project requires enhanced Java 8 desugaring.

Issue: androidx#1312
PiperOrigin-RevId: 631373018
  • Loading branch information
tonihei authored and copybara-github committed May 7, 2024
1 parent 75733e2 commit 16df05e
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.1'
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.4'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0'
}
Expand Down
4 changes: 3 additions & 1 deletion demos/cast/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ apply plugin: 'com.android.application'
android {
namespace 'androidx.media3.demo.cast'

compileSdkVersion project.ext.compileSdkVersion
compileSdk project.ext.compileSdkVersion

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -65,6 +66,7 @@ dependencies {
implementation 'androidx.multidex:multidex:' + androidxMultidexVersion
implementation 'androidx.recyclerview:recyclerview:' + androidxRecyclerViewVersion
implementation 'com.google.android.material:material:' + androidxMaterialVersion
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

apply plugin: 'com.google.android.gms.strict-version-matcher-plugin'
5 changes: 4 additions & 1 deletion demos/compose/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ apply plugin: 'kotlin-android'
android {
namespace 'androidx.media3.demo.compose'

compileSdkVersion project.ext.compileSdkVersion
compileSdk project.ext.compileSdkVersion

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -73,4 +74,6 @@ dependencies {

// For detecting and debugging leaks only. LeakCanary is not needed for demo app to work.
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10'

coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}
4 changes: 3 additions & 1 deletion demos/gl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ apply plugin: 'com.android.application'
android {
namespace 'androidx.media3.demo.gl'

compileSdkVersion project.ext.compileSdkVersion
compileSdk project.ext.compileSdkVersion

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -57,4 +58,5 @@ dependencies {
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
implementation 'androidx.multidex:multidex:' + androidxMultidexVersion
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}
6 changes: 4 additions & 2 deletions demos/main/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ apply plugin: 'kotlin-android'
android {
namespace 'androidx.media3.demo.main'

compileSdkVersion project.ext.compileSdkVersion
compileSdk project.ext.compileSdkVersion

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -55,7 +56,7 @@ android {
disable 'GoogleAppIndexingWarning','MissingTranslation','IconDensities'
}

flavorDimensions "decoderExtensions"
flavorDimensions = ["decoderExtensions"]

productFlavors {
noDecoderExtensions {
Expand Down Expand Up @@ -90,6 +91,7 @@ dependencies {
withDecoderExtensionsImplementation project(modulePrefix + 'lib-decoder-vp9')
withDecoderExtensionsImplementation project(modulePrefix + 'lib-decoder-midi')
withDecoderExtensionsImplementation project(modulePrefix + 'lib-datasource-rtmp')
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}

apply plugin: 'com.google.android.gms.strict-version-matcher-plugin'
4 changes: 3 additions & 1 deletion demos/session/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ apply plugin: 'kotlin-android'
android {
namespace 'androidx.media3.demo.session'

compileSdkVersion project.ext.compileSdkVersion
compileSdk project.ext.compileSdkVersion

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -68,4 +69,5 @@ dependencies {
implementation project(modulePrefix + 'lib-ui')
implementation project(modulePrefix + 'lib-session')
implementation project(modulePrefix + 'demo-session-service')
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}
4 changes: 3 additions & 1 deletion demos/session_automotive/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ apply plugin: 'kotlin-android'
android {
namespace 'androidx.media3.demo.session.automotive'

compileSdkVersion project.ext.compileSdkVersion
compileSdk project.ext.compileSdkVersion

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -64,4 +65,5 @@ dependencies {
implementation 'com.google.android.material:material:' + androidxMaterialVersion
implementation project(modulePrefix + 'lib-session')
implementation project(modulePrefix + 'demo-session-service')
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}
2 changes: 1 addition & 1 deletion demos/session_service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ apply plugin: 'kotlin-android'
android {
namespace 'androidx.media3.demo.session.service'

compileSdkVersion project.ext.compileSdkVersion
compileSdk project.ext.compileSdkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
4 changes: 3 additions & 1 deletion demos/shortform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ apply plugin: 'kotlin-android'
android {
namespace 'androidx.media3.demo.shortform'

compileSdkVersion project.ext.compileSdkVersion
compileSdk project.ext.compileSdkVersion

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -93,4 +94,5 @@ dependencies {
testImplementation 'com.google.truth:truth:' + truthVersion
testImplementation 'org.robolectric:robolectric:' + robolectricVersion
testImplementation 'org.robolectric:robolectric:' + robolectricVersion
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}
4 changes: 3 additions & 1 deletion demos/surface/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ apply plugin: 'com.android.application'
android {
namespace 'androidx.media3.demo.surface'

compileSdkVersion project.ext.compileSdkVersion
compileSdk project.ext.compileSdkVersion

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -54,4 +55,5 @@ dependencies {
implementation project(modulePrefix + 'lib-exoplayer-smoothstreaming')
implementation project(modulePrefix + 'lib-ui')
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}
4 changes: 2 additions & 2 deletions demos/transformer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
android {
namespace 'androidx.media3.demo.transformer'

compileSdkVersion project.ext.compileSdkVersion
compileSdk project.ext.compileSdkVersion

compileOptions {
coreLibraryDesugaringEnabled true
Expand Down Expand Up @@ -49,7 +49,7 @@ android {
disable 'GoogleAppIndexingWarning','MissingTranslation'
}

flavorDimensions "mediaPipe"
flavorDimensions = ["mediaPipe"]

productFlavors {
noMediaPipe {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion libraries/test_session_current/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ apply plugin: 'com.android.application'
android {
namespace 'androidx.media3.test.session'

compileSdkVersion project.ext.compileSdkVersion
compileSdk project.ext.compileSdkVersion

defaultConfig {
versionName project.ext.releaseVersion
Expand Down

0 comments on commit 16df05e

Please sign in to comment.