Commit 9842fbab by tonihei Committed by Ian Baker

Update dependencies to latest versions

The only dependencies that are not updated are the ones that need
to be kept in sync with other system (like Android source tree) or
would require a Kotlin dependency in common or exoplayer modules.

As a side effect, some demo apps now need a Kotlin config and some
additional modules require desugaring/multidex logic. To simplify
the setup, the desugaring and multidex steps are added to the common
config.

PiperOrigin-RevId: 527243950
parent 27ed3b2b
...@@ -25,9 +25,11 @@ android { ...@@ -25,9 +25,11 @@ android {
aarMetadata { aarMetadata {
minCompileSdk = project.ext.compileSdkVersion minCompileSdk = project.ext.compileSdkVersion
} }
multiDexEnabled true
} }
compileOptions { compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8
} }
...@@ -39,3 +41,8 @@ android { ...@@ -39,3 +41,8 @@ android {
unitTests.includeAndroidResources true unitTests.includeAndroidResources true
} }
} }
dependencies {
implementation 'androidx.multidex:multidex:' + androidxMultidexVersion
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
}
...@@ -30,33 +30,35 @@ project.ext { ...@@ -30,33 +30,35 @@ project.ext {
// https://cs.android.com/android/platform/superproject/+/master:external/guava/METADATA // https://cs.android.com/android/platform/superproject/+/master:external/guava/METADATA
guavaVersion = '31.1-android' guavaVersion = '31.1-android'
mockitoVersion = '3.12.4' mockitoVersion = '3.12.4'
robolectricVersion = '4.8.1' robolectricVersion = '4.10'
// Keep this in sync with Google's internal Checker Framework version. // Keep this in sync with Google's internal Checker Framework version.
checkerframeworkVersion = '3.13.0' checkerframeworkVersion = '3.13.0'
checkerframeworkCompatVersion = '2.5.5' checkerframeworkCompatVersion = '2.5.5'
errorProneVersion = '2.10.0' errorProneVersion = '2.18.0'
jsr305Version = '3.0.2' 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' androidxAnnotationVersion = '1.3.0'
androidxAppCompatVersion = '1.3.1' androidxAppCompatVersion = '1.6.1'
androidxCollectionVersion = '1.1.0' androidxCollectionVersion = '1.2.0'
androidxConstraintLayoutVersion = '2.0.4' androidxConstraintLayoutVersion = '2.1.4'
androidxCoreVersion = '1.7.0' // Updating this to 1.9.0+ will import Kotlin stdlib [internal ref: b/277891049].
androidxCoreVersion = '1.8.0'
androidxFuturesVersion = '1.1.0' androidxFuturesVersion = '1.1.0'
androidxMediaVersion = '1.6.0' androidxMediaVersion = '1.6.0'
androidxMedia2Version = '1.2.0' androidxMedia2Version = '1.2.1'
androidxMultidexVersion = '2.0.1' androidxMultidexVersion = '2.0.1'
androidxRecyclerViewVersion = '1.2.1' androidxRecyclerViewVersion = '1.3.0'
androidxMaterialVersion = '1.4.0' androidxMaterialVersion = '1.8.0'
androidxTestCoreVersion = '1.4.0' androidxTestCoreVersion = '1.5.0'
androidxTestJUnitVersion = '1.1.3' androidxTestJUnitVersion = '1.1.5'
androidxTestRunnerVersion = '1.4.0' androidxTestRunnerVersion = '1.5.2'
androidxTestRulesVersion = '1.4.0' androidxTestRulesVersion = '1.5.0'
androidxTestServicesStorageVersion = '1.4.0' androidxTestServicesStorageVersion = '1.4.2'
androidxTestTruthVersion = '1.4.0' androidxTestTruthVersion = '1.5.0'
androidxWindowVersion = '1.0.0' androidxWindowVersion = '1.0.0'
truthVersion = '1.1.3' truthVersion = '1.1.3'
okhttpVersion = '4.9.2' okhttpVersion = '4.11.0'
modulePrefix = ':' modulePrefix = ':'
if (gradle.ext.has('exoplayerModulePrefix')) { if (gradle.ext.has('exoplayerModulePrefix')) {
modulePrefix += gradle.ext.exoplayerModulePrefix modulePrefix += gradle.ext.exoplayerModulePrefix
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
apply from: '../../constants.gradle' apply from: '../../constants.gradle'
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android { android {
compileSdkVersion project.ext.compileSdkVersion compileSdkVersion project.ext.compileSdkVersion
......
...@@ -13,12 +13,6 @@ ...@@ -13,12 +13,6 @@
// limitations under the License. // limitations under the License.
apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle" apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"
android {
defaultConfig {
multiDexEnabled true
}
}
dependencies { dependencies {
api "com.google.android.gms:play-services-cronet:18.0.1" api "com.google.android.gms:play-services-cronet:18.0.1"
implementation project(modulePrefix + 'library-common') implementation project(modulePrefix + 'library-common')
...@@ -27,13 +21,12 @@ dependencies { ...@@ -27,13 +21,12 @@ dependencies {
compileOnly 'com.google.errorprone:error_prone_annotations:' + errorProneVersion compileOnly 'com.google.errorprone:error_prone_annotations:' + errorProneVersion
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion
androidTestImplementation 'androidx.test:rules:' + androidxTestRulesVersion androidTestImplementation 'androidx.test:rules:' + androidxTestRulesVersion
androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion
// Instrumentation tests assume that an app-packaged version of cronet is // Instrumentation tests assume that an app-packaged version of cronet is
// available. // available.
androidTestImplementation 'org.chromium.net:cronet-embedded:95.4638.50' androidTestImplementation 'org.chromium.net:cronet-embedded:108.5359.79'
androidTestImplementation project(modulePrefix + 'testutils') androidTestImplementation project(modulePrefix + 'testutils')
testImplementation project(modulePrefix + 'testutils') testImplementation project(modulePrefix + 'testutils')
testImplementation 'com.squareup.okhttp3:mockwebserver:' + okhttpVersion testImplementation 'com.squareup.okhttp3:mockwebserver:' + okhttpVersion
......
...@@ -14,9 +14,6 @@ ...@@ -14,9 +14,6 @@
apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle" apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"
android { android {
defaultConfig {
multiDexEnabled true
}
sourceSets { sourceSets {
main { main {
jniLibs.srcDir 'src/main/libs' jniLibs.srcDir 'src/main/libs'
...@@ -34,7 +31,6 @@ dependencies { ...@@ -34,7 +31,6 @@ dependencies {
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
androidTestImplementation project(modulePrefix + 'testutils') androidTestImplementation project(modulePrefix + 'testutils')
androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion
androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion
testImplementation 'androidx.test:core:' + androidxTestCoreVersion testImplementation 'androidx.test:core:' + androidxTestCoreVersion
testImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion testImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion
......
...@@ -14,25 +14,19 @@ ...@@ -14,25 +14,19 @@
apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle" apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"
android { android {
defaultConfig {
// Enable multidex for androidTests.
multiDexEnabled true
}
sourceSets { sourceSets {
androidTest.assets.srcDir '../../testdata/src/test/assets/' androidTest.assets.srcDir '../../testdata/src/test/assets/'
} }
} }
dependencies { dependencies {
api 'com.google.ads.interactivemedia.v3:interactivemedia:3.29.0' api 'com.google.ads.interactivemedia.v3:interactivemedia:3.30.1'
implementation project(modulePrefix + 'library-core') implementation project(modulePrefix + 'library-core')
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
compileOnly 'com.google.errorprone:error_prone_annotations:' + errorProneVersion compileOnly 'com.google.errorprone:error_prone_annotations:' + errorProneVersion
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
androidTestImplementation project(modulePrefix + 'testutils') androidTestImplementation project(modulePrefix + 'testutils')
androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion
androidTestImplementation 'androidx.test:rules:' + androidxTestRulesVersion androidTestImplementation 'androidx.test:rules:' + androidxTestRulesVersion
androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion
androidTestCompileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion androidTestCompileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
......
...@@ -23,7 +23,6 @@ dependencies { ...@@ -23,7 +23,6 @@ dependencies {
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
androidTestImplementation project(modulePrefix + 'library-core') androidTestImplementation project(modulePrefix + 'library-core')
androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion
androidTestImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion androidTestImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion
androidTestImplementation 'androidx.test:core:' + androidxTestCoreVersion androidTestImplementation 'androidx.test:core:' + androidxTestCoreVersion
androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion
......
...@@ -31,7 +31,6 @@ dependencies { ...@@ -31,7 +31,6 @@ dependencies {
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
testImplementation project(modulePrefix + 'testutils') testImplementation project(modulePrefix + 'testutils')
testImplementation 'org.robolectric:robolectric:' + robolectricVersion testImplementation 'org.robolectric:robolectric:' + robolectricVersion
androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion
androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion
androidTestImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion androidTestImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion
} }
......
...@@ -31,7 +31,6 @@ dependencies { ...@@ -31,7 +31,6 @@ dependencies {
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
testImplementation project(modulePrefix + 'testutils') testImplementation project(modulePrefix + 'testutils')
testImplementation 'org.robolectric:robolectric:' + robolectricVersion testImplementation 'org.robolectric:robolectric:' + robolectricVersion
androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion
androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion
androidTestImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion androidTestImplementation 'androidx.test.ext:junit:' + androidxTestJUnitVersion
androidTestImplementation 'com.google.truth:truth:' + truthVersion androidTestImplementation 'com.google.truth:truth:' + truthVersion
......
...@@ -17,7 +17,7 @@ apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle" ...@@ -17,7 +17,7 @@ apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"
dependencies { dependencies {
implementation project(modulePrefix + 'library-core') implementation project(modulePrefix + 'library-core')
implementation 'androidx.work:work-runtime:2.7.0' implementation 'androidx.work:work-runtime:2.8.1'
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
} }
......
...@@ -19,7 +19,6 @@ android { ...@@ -19,7 +19,6 @@ android {
// "pm clear" command after each test invocation. This command ensures // "pm clear" command after each test invocation. This command ensures
// that the app's state is completely cleared between tests. // that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true' testInstrumentationRunnerArguments clearPackageData: 'true'
multiDexEnabled true
} }
buildTypes { buildTypes {
...@@ -48,7 +47,6 @@ dependencies { ...@@ -48,7 +47,6 @@ dependencies {
compileOnly 'org.checkerframework:checker-compat-qual:' + checkerframeworkCompatVersion compileOnly 'org.checkerframework:checker-compat-qual:' + checkerframeworkCompatVersion
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
compileOnly 'com.google.errorprone:error_prone_annotations:' + errorProneVersion compileOnly 'com.google.errorprone:error_prone_annotations:' + errorProneVersion
androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion
androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion
androidTestImplementation 'com.linkedin.dexmaker:dexmaker:' + dexmakerVersion androidTestImplementation 'com.linkedin.dexmaker:dexmaker:' + dexmakerVersion
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle" apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"
android { android {
defaultConfig {
multiDexEnabled true
}
buildTypes { buildTypes {
debug { debug {
testCoverageEnabled = true testCoverageEnabled = true
...@@ -39,7 +35,6 @@ dependencies { ...@@ -39,7 +35,6 @@ dependencies {
compileOnly 'org.checkerframework:checker-compat-qual:' + checkerframeworkCompatVersion compileOnly 'org.checkerframework:checker-compat-qual:' + checkerframeworkCompatVersion
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion
androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion
androidTestImplementation 'com.linkedin.dexmaker:dexmaker:' + dexmakerVersion androidTestImplementation 'com.linkedin.dexmaker:dexmaker:' + dexmakerVersion
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:' + dexmakerVersion
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle" apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"
android { android {
defaultConfig {
multiDexEnabled true
}
buildTypes { buildTypes {
debug { debug {
testCoverageEnabled = true testCoverageEnabled = true
......
...@@ -20,7 +20,6 @@ android { ...@@ -20,7 +20,6 @@ android {
// "pm clear" command after each test invocation. This command ensures // "pm clear" command after each test invocation. This command ensures
// that the app's state is completely cleared between tests. // that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true' testInstrumentationRunnerArguments clearPackageData: 'true'
multiDexEnabled true
} }
buildTypes { buildTypes {
......
...@@ -20,7 +20,6 @@ android { ...@@ -20,7 +20,6 @@ android {
// "pm clear" command after each test invocation. This command ensures // "pm clear" command after each test invocation. This command ensures
// that the app's state is completely cleared between tests. // that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true' testInstrumentationRunnerArguments clearPackageData: 'true'
multiDexEnabled true
} }
buildTypes { buildTypes {
......
...@@ -20,7 +20,6 @@ android { ...@@ -20,7 +20,6 @@ android {
// "pm clear" command after each test invocation. This command ensures // "pm clear" command after each test invocation. This command ensures
// that the app's state is completely cleared between tests. // that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true' testInstrumentationRunnerArguments clearPackageData: 'true'
multiDexEnabled true
} }
buildTypes { buildTypes {
......
...@@ -13,14 +13,7 @@ ...@@ -13,14 +13,7 @@
// limitations under the License. // limitations under the License.
apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle" apply from: "$gradle.ext.exoplayerSettingsDir/common_library_config.gradle"
android {
defaultConfig {
multiDexEnabled true
}
}
dependencies { dependencies {
androidTestImplementation 'androidx.multidex:multidex:' + androidxMultidexVersion
androidTestImplementation 'androidx.test:rules:' + androidxTestRulesVersion androidTestImplementation 'androidx.test:rules:' + androidxTestRulesVersion
androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion androidTestImplementation 'androidx.test:runner:' + androidxTestRunnerVersion
androidTestImplementation 'androidx.annotation:annotation:' + androidxAnnotationVersion androidTestImplementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment