Upgrade Gradle and AGP

The newer versions include a bugfix that automatically highlights
when our project requires enhanced Java 8 desugaring.

Issue: androidx/media#1312
PiperOrigin-RevId: 631373018
This commit is contained in:
tonihei 2024-05-07 04:18:42 -07:00 committed by Copybara-Service
parent 75733e294e
commit 16df05ec29
13 changed files with 32 additions and 15 deletions

View File

@ -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'
}

View File

@ -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
}
@ -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'

View File

@ -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
}
@ -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'
}

View File

@ -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
}
@ -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'
}

View File

@ -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
}
@ -55,7 +56,7 @@ android {
disable 'GoogleAppIndexingWarning','MissingTranslation','IconDensities'
}
flavorDimensions "decoderExtensions"
flavorDimensions = ["decoderExtensions"]
productFlavors {
noDecoderExtensions {
@ -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'

View File

@ -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
}
@ -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'
}

View File

@ -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
}
@ -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'
}

View File

@ -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

View File

@ -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
}
@ -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'
}

View File

@ -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
}
@ -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'
}

View File

@ -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
@ -49,7 +49,7 @@ android {
disable 'GoogleAppIndexingWarning','MissingTranslation'
}
flavorDimensions "mediaPipe"
flavorDimensions = ["mediaPipe"]
productFlavors {
noMediaPipe {

View File

@ -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

View File

@ -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