diff --git a/common_library_config.gradle b/common_library_config.gradle index a831ddea0b8..b2f7afab0d2 100644 --- a/common_library_config.gradle +++ b/common_library_config.gradle @@ -25,9 +25,11 @@ android { aarMetadata { minCompileSdk = project.ext.compileSdkVersion } + multiDexEnabled true } compileOptions { + coreLibraryDesugaringEnabled true sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } @@ -39,3 +41,8 @@ android { unitTests.includeAndroidResources true } } + +dependencies { + implementation 'androidx.multidex:multidex:' + androidxMultidexVersion + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' +} diff --git a/constants.gradle b/constants.gradle index 47c25e2bd98..32717c3562f 100644 --- a/constants.gradle +++ b/constants.gradle @@ -29,34 +29,37 @@ project.ext { // https://cs.android.com/android/platform/superproject/+/master:external/guava/METADATA guavaVersion = '31.1-android' mockitoVersion = '3.12.4' - robolectricVersion = '4.8.1' + robolectricVersion = '4.10' // Keep this in sync with Google's internal Checker Framework version. checkerframeworkVersion = '3.13.0' checkerframeworkCompatVersion = '2.5.5' - errorProneVersion = '2.10.0' + errorProneVersion = '2.18.0' jsr305Version = '3.0.2' - kotlinAnnotationsVersion = '1.5.31' + 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' - androidxAppCompatVersion = '1.3.1' - androidxCollectionVersion = '1.1.0' - androidxConstraintLayoutVersion = '2.0.4' - androidxCoreVersion = '1.7.0' + androidxAppCompatVersion = '1.6.1' + androidxCollectionVersion = '1.2.0' + androidxConstraintLayoutVersion = '2.1.4' + // Updating this to 1.9.0+ will import Kotlin stdlib [internal ref: b/277891049]. + androidxCoreVersion = '1.8.0' androidxFuturesVersion = '1.1.0' androidxMediaVersion = '1.6.0' - androidxMedia2Version = '1.2.0' + androidxMedia2Version = '1.2.1' androidxMultidexVersion = '2.0.1' - androidxRecyclerViewVersion = '1.2.1' - androidxMaterialVersion = '1.4.0' - androidxTestCoreVersion = '1.4.0' - androidxTestJUnitVersion = '1.1.3' - androidxTestRunnerVersion = '1.4.0' - androidxTestRulesVersion = '1.4.0' - androidxTestServicesStorageVersion = '1.4.0' - androidxTestTruthVersion = '1.4.0' + androidxRecyclerViewVersion = '1.3.0' + androidxMaterialVersion = '1.8.0' + androidxTestCoreVersion = '1.5.0' + androidxTestJUnitVersion = '1.1.5' + androidxTestRunnerVersion = '1.5.2' + androidxTestRulesVersion = '1.5.0' + androidxTestServicesStorageVersion = '1.4.2' + androidxTestTruthVersion = '1.5.0' androidxWindowVersion = '1.0.0' truthVersion = '1.1.3' - okhttpVersion = '4.9.2' + okhttpVersion = '4.11.0' modulePrefix = ':' if (gradle.ext.has('androidxMediaModulePrefix')) { modulePrefix += gradle.ext.androidxMediaModulePrefix diff --git a/demos/main/build.gradle b/demos/main/build.gradle index 2d7d92a0fb2..45b67670e3d 100644 --- a/demos/main/build.gradle +++ b/demos/main/build.gradle @@ -14,6 +14,7 @@ apply from: '../../constants.gradle' apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' android { compileSdkVersion project.ext.compileSdkVersion diff --git a/libraries/datasource/build.gradle b/libraries/datasource/build.gradle index 5bf5c91f511..6f95395801c 100644 --- a/libraries/datasource/build.gradle +++ b/libraries/datasource/build.gradle @@ -14,10 +14,6 @@ apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle" android { - defaultConfig { - multiDexEnabled true - } - buildTypes { debug { testCoverageEnabled = true @@ -39,7 +35,6 @@ dependencies { compileOnly 'org.checkerframework:checker-compat-qual:' + checkerframeworkCompatVersion compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion - androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'com.linkedin.dexmaker:dexmaker:' + dexmakerVersion androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion diff --git a/libraries/datasource_cronet/build.gradle b/libraries/datasource_cronet/build.gradle index d372272a335..06803f41f94 100644 --- a/libraries/datasource_cronet/build.gradle +++ b/libraries/datasource_cronet/build.gradle @@ -13,12 +13,6 @@ // limitations under the License. apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle" -android { - defaultConfig { - multiDexEnabled true - } -} - dependencies { api "com.google.android.gms:play-services-cronet:18.0.1" implementation project(modulePrefix + 'lib-common') @@ -27,13 +21,12 @@ dependencies { compileOnly 'com.google.errorprone:error_prone_annotations:' + errorProneVersion compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion - androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion androidTestImplementation 'androidx.test:rules:' + androidxTestRulesVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion // Instrumentation tests assume that an app-packaged version of cronet is // available. - androidTestImplementation 'org.chromium.net:cronet-embedded:95.4638.50' + androidTestImplementation 'org.chromium.net:cronet-embedded:108.5359.79' androidTestImplementation project(modulePrefix + 'test-utils') testImplementation project(modulePrefix + 'test-utils') testImplementation 'com.squareup.okhttp3:mockwebserver:' + okhttpVersion diff --git a/libraries/decoder/build.gradle b/libraries/decoder/build.gradle index 19a5af644d6..c085f93c315 100644 --- a/libraries/decoder/build.gradle +++ b/libraries/decoder/build.gradle @@ -14,10 +14,6 @@ apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle" android { - defaultConfig { - multiDexEnabled true - } - buildTypes { debug { testCoverageEnabled = true diff --git a/libraries/decoder_flac/build.gradle b/libraries/decoder_flac/build.gradle index de0fb39ac5d..522cd160c66 100644 --- a/libraries/decoder_flac/build.gradle +++ b/libraries/decoder_flac/build.gradle @@ -14,9 +14,6 @@ apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle" android { - defaultConfig { - multiDexEnabled true - } sourceSets { main { jniLibs.srcDir 'src/main/libs' @@ -34,7 +31,6 @@ dependencies { compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion androidTestImplementation project(modulePrefix + 'test-utils') - androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion testImplementation 'androidx.test:core:' + androidxTestCoreVersion testImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion diff --git a/libraries/decoder_opus/build.gradle b/libraries/decoder_opus/build.gradle index c7dc538a662..1f3f7d8d537 100644 --- a/libraries/decoder_opus/build.gradle +++ b/libraries/decoder_opus/build.gradle @@ -31,7 +31,6 @@ dependencies { compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion testImplementation project(modulePrefix + 'test-utils') testImplementation 'org.robolectric:robolectric:' + robolectricVersion - androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion } diff --git a/libraries/decoder_vp9/build.gradle b/libraries/decoder_vp9/build.gradle index adb52f8dbef..e723f74fd7d 100644 --- a/libraries/decoder_vp9/build.gradle +++ b/libraries/decoder_vp9/build.gradle @@ -31,7 +31,6 @@ dependencies { compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion testImplementation project(modulePrefix + 'test-utils') testImplementation 'org.robolectric:robolectric:' + robolectricVersion - androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion androidTestImplementation 'com.google.truth:truth:' + truthVersion diff --git a/libraries/effect/build.gradle b/libraries/effect/build.gradle index 80111883f70..1b4fda56ff3 100644 --- a/libraries/effect/build.gradle +++ b/libraries/effect/build.gradle @@ -20,7 +20,6 @@ android { // "pm clear" command after each test invocation. This command ensures // that the app's state is completely cleared between tests. testInstrumentationRunnerArguments clearPackageData: 'true' - multiDexEnabled true } buildTypes { diff --git a/libraries/exoplayer/build.gradle b/libraries/exoplayer/build.gradle index 017d903c817..b7fef71ab03 100644 --- a/libraries/exoplayer/build.gradle +++ b/libraries/exoplayer/build.gradle @@ -19,7 +19,6 @@ android { // "pm clear" command after each test invocation. This command ensures // that the app's state is completely cleared between tests. testInstrumentationRunnerArguments clearPackageData: 'true' - multiDexEnabled true } buildTypes { @@ -48,7 +47,6 @@ dependencies { compileOnly 'org.checkerframework:checker-compat-qual:' + checkerframeworkCompatVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion compileOnly 'com.google.errorprone:error_prone_annotations:' + errorProneVersion - androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'com.linkedin.dexmaker:dexmaker:' + dexmakerVersion androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion diff --git a/libraries/exoplayer_ima/build.gradle b/libraries/exoplayer_ima/build.gradle index 446fe90a297..ceb19bac3d5 100644 --- a/libraries/exoplayer_ima/build.gradle +++ b/libraries/exoplayer_ima/build.gradle @@ -14,25 +14,19 @@ apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle" android { - defaultConfig { - // Enable multidex for androidTests. - multiDexEnabled true - } - sourceSets { androidTest.assets.srcDir '../test_data/src/test/assets' } } dependencies { - api 'com.google.ads.interactivemedia.v3:interactivemedia:3.29.0' + api 'com.google.ads.interactivemedia.v3:interactivemedia:3.30.1' implementation project(modulePrefix + 'lib-exoplayer') implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion compileOnly 'com.google.errorprone:error_prone_annotations:' + errorProneVersion compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion androidTestImplementation project(modulePrefix + 'test-utils') - androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion androidTestImplementation 'androidx.test:rules:' + androidxTestRulesVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestCompileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion diff --git a/libraries/exoplayer_workmanager/build.gradle b/libraries/exoplayer_workmanager/build.gradle index e77846c4988..dc9b0e4a3cc 100644 --- a/libraries/exoplayer_workmanager/build.gradle +++ b/libraries/exoplayer_workmanager/build.gradle @@ -17,7 +17,7 @@ apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle" dependencies { implementation project(modulePrefix + 'lib-exoplayer') - implementation 'androidx.work:work-runtime:2.7.0' + implementation 'androidx.work:work-runtime:2.8.1' compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion } diff --git a/libraries/muxer/build.gradle b/libraries/muxer/build.gradle index d8aca87bc3f..7c0ce562b4f 100644 --- a/libraries/muxer/build.gradle +++ b/libraries/muxer/build.gradle @@ -20,7 +20,6 @@ android { // "pm clear" command after each test invocation. This command ensures // that the app's state is completely cleared between tests. testInstrumentationRunnerArguments clearPackageData: 'true' - multiDexEnabled true } buildTypes { diff --git a/libraries/session/build.gradle b/libraries/session/build.gradle index 860137f3764..5cdcf67f559 100644 --- a/libraries/session/build.gradle +++ b/libraries/session/build.gradle @@ -17,9 +17,6 @@ apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle" group 'androidx.media3' android { - defaultConfig { - multiDexEnabled true - } buildTypes { debug { testCoverageEnabled = true @@ -40,7 +37,6 @@ dependencies { androidTestImplementation 'com.squareup.okhttp3:mockwebserver:' + okhttpVersion androidTestImplementation project(modulePrefix + 'test-utils') androidTestImplementation project(modulePrefix + 'test-data') - androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion testImplementation project(modulePrefix + 'test-utils') testImplementation project(modulePrefix + 'test-utils-robolectric') diff --git a/libraries/test_exoplayer_playback/build.gradle b/libraries/test_exoplayer_playback/build.gradle index 4991a5820d4..4a5ef3824c3 100644 --- a/libraries/test_exoplayer_playback/build.gradle +++ b/libraries/test_exoplayer_playback/build.gradle @@ -13,14 +13,7 @@ // limitations under the License. apply from: "$gradle.ext.androidxMediaSettingsDir/common_library_config.gradle" -android { - defaultConfig { - multiDexEnabled true - } -} - dependencies { - androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion androidTestImplementation 'androidx.test:rules:' + androidxTestRulesVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'androidx.annotation:annotation:' + androidxAnnotationVersion diff --git a/libraries/transformer/build.gradle b/libraries/transformer/build.gradle index cbb64e4e8df..7bb9aaca8a8 100644 --- a/libraries/transformer/build.gradle +++ b/libraries/transformer/build.gradle @@ -20,7 +20,6 @@ android { // "pm clear" command after each test invocation. This command ensures // that the app's state is completely cleared between tests. testInstrumentationRunnerArguments clearPackageData: 'true' - multiDexEnabled true } buildTypes {