From e1f96f7d207659f2b66494e2ccbcb1e624001993 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 29 Mar 2024 15:02:25 +0800 Subject: [PATCH] Revert "Switch Glide's dependencies to a version catalog. (#5183)" This reverts commit 32827dc04400d9f618740316447d108258ccf4ed. # Conflicts: # integration/avif/build.gradle --- annotation/compiler/build.gradle | 8 +- annotation/compiler/test/build.gradle | 18 ++-- annotation/ksp/build.gradle | 8 +- annotation/ksp/integrationtest/build.gradle | 14 +-- annotation/ksp/test/build.gradle | 14 +-- benchmark/build.gradle | 15 ++- build.gradle | 18 ++-- gradle.properties | 72 ++++++++++++- instrumentation/build.gradle | 30 +++--- integration/avif/build.gradle | 8 +- integration/compose/build.gradle | 24 ++--- integration/concurrent/build.gradle | 18 ++-- integration/cronet/build.gradle | 18 ++-- integration/gifencoder/build.gradle | 20 ++-- integration/ktx/build.gradle | 30 +++--- integration/okhttp/build.gradle | 10 +- integration/okhttp3/build.gradle | 10 +- integration/okhttp4/build.gradle | 10 +- integration/recyclerview/build.gradle | 10 +- integration/sqljournaldiskcache/build.gradle | 24 ++--- integration/volley/build.gradle | 26 ++--- library/build.gradle | 38 +++---- library/pmd/build.gradle | 2 +- library/test/build.gradle | 26 ++--- mocks/build.gradle | 12 +-- samples/contacturi/build.gradle | 8 +- samples/flickr/build.gradle | 12 +-- samples/gallery/build.gradle | 16 +-- samples/giphy/build.gradle | 10 +- samples/imgur/build.gradle | 36 +++---- samples/svg/build.gradle | 10 +- settings.gradle | 107 ------------------- testutil/build.gradle | 14 +-- third_party/disklrucache/build.gradle | 10 +- third_party/gif_decoder/build.gradle | 18 ++-- 35 files changed, 342 insertions(+), 382 deletions(-) diff --git a/annotation/compiler/build.gradle b/annotation/compiler/build.gradle index 7329c93608..5d09e8e1aa 100644 --- a/annotation/compiler/build.gradle +++ b/annotation/compiler/build.gradle @@ -11,11 +11,11 @@ configurations { dependencies { jarjar "com.googlecode.jarjar:jarjar:1.3" - compileOnly libs.javapoet - compileOnly libs.autoservice - compileOnly libs.findbugs.jsr305 + compileOnly "com.squareup:javapoet:${JAVAPOET_VERSION}" + compileOnly "com.google.auto.service:auto-service:${AUTO_SERVICE_VERSION}" + compileOnly "com.google.code.findbugs:jsr305:${JSR_305_VERSION}" implementation project(':annotation') - annotationProcessor libs.autoservice + annotationProcessor "com.google.auto.service:auto-service:${AUTO_SERVICE_VERSION}" } javadoc { diff --git a/annotation/compiler/test/build.gradle b/annotation/compiler/test/build.gradle index 925402b22c..1c8294c6e5 100644 --- a/annotation/compiler/test/build.gradle +++ b/annotation/compiler/test/build.gradle @@ -27,11 +27,11 @@ afterEvaluate { } android { - compileSdk libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName VERSION_NAME as String } @@ -56,9 +56,9 @@ android { dependencies { testImplementation project(':glide') testImplementation project(':annotation:compiler') - testImplementation libs.junit - testImplementation libs.javapoet - testImplementation libs.findbugs.jsr305 + testImplementation "junit:junit:${JUNIT_VERSION}" + testImplementation "com.squareup:javapoet:${JAVAPOET_VERSION}" + testImplementation "com.google.code.findbugs:jsr305:${JSR_305_VERSION}" // Using 0.10 of compile-testing is required for Android Studio to function, but not for the // gradle build. Not yet clear why, but it looks like some kind of version conflict between // javapoet, guava and/or truth. @@ -68,13 +68,13 @@ dependencies { // confusing. exclude group: "com.google.auto.value", module: "auto-value" } - testImplementation libs.androidx.annotation - testImplementation libs.androidx.fragment + testImplementation "androidx.annotation:annotation:${ANDROID_X_ANNOTATION_VERSION}" + testImplementation "androidx.fragment:fragment:${ANDROID_X_FRAGMENT_VERSION}" // TODO: Find some way to include a similar dependency on java 9+ and re-enable these tests in gradle. // testImplementation files(Jvm.current().getJre().homeDir.getAbsolutePath()+'/lib/rt.jar') testAnnotationProcessor project(':annotation:compiler') - testAnnotationProcessor libs.autoservice + testAnnotationProcessor "com.google.auto.service:auto-service:${AUTO_SERVICE_VERSION}" } task regenerateTestResources { diff --git a/annotation/ksp/build.gradle b/annotation/ksp/build.gradle index febb5e62b4..b8a62747a8 100644 --- a/annotation/ksp/build.gradle +++ b/annotation/ksp/build.gradle @@ -4,11 +4,11 @@ plugins { } dependencies { - implementation libs.kotlinpoet + implementation("com.squareup:kotlinpoet:1.12.0") implementation project(":annotation") - implementation libs.ksp - implementation libs.autoservice.annotations - ksp libs.ksp.autoservice + implementation 'com.google.devtools.ksp:symbol-processing-api:1.7.0-1.0.6' + ksp("dev.zacsweers.autoservice:auto-service-ksp:1.0.0") + implementation("com.google.auto.service:auto-service-annotations:1.0.1") } apply from: "${rootProject.projectDir}/scripts/upload.gradle" diff --git a/annotation/ksp/integrationtest/build.gradle b/annotation/ksp/integrationtest/build.gradle index 16ee4b0d07..610e2716ac 100644 --- a/annotation/ksp/integrationtest/build.gradle +++ b/annotation/ksp/integrationtest/build.gradle @@ -15,24 +15,24 @@ plugins { } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdkVersion COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdkVersion MIN_SDK_VERSION as int + targetSdkVersion TARGET_SDK_VERSION as int versionName VERSION_NAME as String } } dependencies { - implementation libs.junit + implementation "junit:junit:$JUNIT_VERSION" testImplementation project(":annotation:ksp:test") testImplementation project(":annotation:ksp") testImplementation project(":annotation") testImplementation project(":glide") testImplementation project(":integration:okhttp3") - testImplementation libs.ksp.compiletesting - testImplementation libs.truth - testImplementation libs.kotlin.test + testImplementation "com.github.tschuchortdev:kotlin-compile-testing-ksp:${KOTLIN_COMPILE_TESTING_VERSION}" + testImplementation "com.google.truth:truth:${TRUTH_VERSION}" + testImplementation "org.jetbrains.kotlin:kotlin-test:${JETBRAINS_KOTLIN_TEST_VERSION}" testImplementation project(path: ':annotation:ksp:test') } \ No newline at end of file diff --git a/annotation/ksp/test/build.gradle b/annotation/ksp/test/build.gradle index 8de75bffa7..64f7287156 100644 --- a/annotation/ksp/test/build.gradle +++ b/annotation/ksp/test/build.gradle @@ -4,22 +4,22 @@ plugins { } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdkVersion COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdkVersion MIN_SDK_VERSION as int + targetSdkVersion TARGET_SDK_VERSION as int versionName VERSION_NAME as String } } dependencies { - implementation libs.junit + implementation "junit:junit:$JUNIT_VERSION" implementation project(":annotation:ksp") - implementation libs.ksp.compiletesting - implementation libs.truth + implementation "com.github.tschuchortdev:kotlin-compile-testing-ksp:${KOTLIN_COMPILE_TESTING_VERSION}" + implementation "com.google.truth:truth:${TRUTH_VERSION}" testImplementation project(":annotation:ksp") testImplementation project(":annotation") testImplementation project(":glide") - testImplementation libs.kotlin.test + testImplementation "org.jetbrains.kotlin:kotlin-test:${JETBRAINS_KOTLIN_TEST_VERSION}" } \ No newline at end of file diff --git a/benchmark/build.gradle b/benchmark/build.gradle index e5022d06ee..0eedc157d2 100644 --- a/benchmark/build.gradle +++ b/benchmark/build.gradle @@ -4,8 +4,7 @@ plugins { } android { - compileSdkVersion libs.versions.compile.sdk.version.get() - + compileSdk COMPILE_SDK_VERSION as int buildToolsVersion "30.0.3" compileOptions { @@ -15,7 +14,7 @@ android { defaultConfig { minSdk 19 - targetSdk libs.versions.target.sdk.version.get() as int + targetSdk TARGET_SDK_VERSION as int versionCode 1 versionName "1.0" @@ -33,12 +32,12 @@ android { } dependencies { - androidTestImplementation libs.androidx.test.runner - androidTestImplementation libs.androidx.junit - androidTestImplementation libs.junit + androidTestImplementation "androidx.test:runner:${ANDROID_X_TEST_RUNNER_VERSION}" + androidTestImplementation "androidx.test.ext:junit:${ANDROID_X_TEST_JUNIT_VERSION}" + androidTestImplementation "junit:junit:{$JUNIT_VERSION}" androidTestImplementation project(':library') androidTestImplementation project(':testutil') - androidTestImplementation libs.androidx.benchmark.junit - androidTestImplementation libs.guava + androidTestImplementation "androidx.benchmark:benchmark-junit4:${ANDROID_X_BENCHMARK_VERSION}" + androidTestImplementation "com.google.guava:guava:${GUAVA_VERSION}" } \ No newline at end of file diff --git a/build.gradle b/build.gradle index 048c15c1e1..b80b4b3768 100644 --- a/build.gradle +++ b/build.gradle @@ -9,17 +9,17 @@ buildscript { } dependencies { - classpath libs.android.gradle + classpath "com.android.tools.build:gradle:$ANDROID_GRADLE_VERSION" if (!hasProperty('DISABLE_ERROR_PRONE')) { - classpath libs.errorprone.gradle + classpath "net.ltgt.gradle:gradle-errorprone-plugin:$ERROR_PRONE_PLUGIN_VERSION" } - classpath libs.proguard.gradle - classpath libs.violations - classpath libs.androidx.benchmark.gradle - classpath libs.kotlin.gradle - classpath libs.ksp.gradle - classpath libs.coroutines.binarycompat.gradle - classpath libs.dokka.gradle + classpath 'com.guardsquare:proguard-gradle:7.1.0' + classpath "se.bjurr.violations:violations-gradle-plugin:$VIOLATIONS_PLUGIN_VERSION" + classpath "androidx.benchmark:benchmark-gradle-plugin:$ANDROID_X_BENCHMARK_VERSION" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$JETBRAINS_KOTLIN_VERSION" + classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:$KSP_GRADLE_PLUGIN_VERSION" + classpath "org.jetbrains.kotlinx:binary-compatibility-validator:$JETBRAINS_KOTLINX_BINARY_COMPATIBILITY_VALIDATOR_VERSION" + classpath "org.jetbrains.dokka:dokka-gradle-plugin:$JETBRAINS_DOKKA_VERSION" } } diff --git a/gradle.properties b/gradle.properties index fe3862769c..7915f6fc9c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -40,8 +40,76 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xmx4096M TEST_JVM_MEMORY_SIZE=4096M -## Glide versioning - these may be overwritten in lower level gradle.properties files +## Glide versioning VERSION_MAJOR=4 VERSION_MINOR=16 VERSION_PATCH=0 -VERSION_NAME=4.16.0-SNAPSHOT \ No newline at end of file +VERSION_NAME=4.16.0-SNAPSHOT + +## SDK versioning +COMPILE_SDK_VERSION=33 +MIN_SDK_VERSION=14 +OK_HTTP_4_MIN_SDK_VERSION=21 +TARGET_SDK_VERSION=32 + +## AndroidX versions +ANDROID_X_ANNOTATION_VERSION=1.3.0 +ANDROID_X_APPCOMPAT_VERSION=1.3.1 +ANDROID_X_BENCHMARK_VERSION=1.1.0 +ANDROID_X_CARDVIEW_VERSION=1.0.0 +ANDROID_X_COMPOSE_VERSION=1.3.2 +ANDROID_X_COMPOSE_FOUNDATION_VERSION=1.3.1 +ANDROID_X_COMPOSE_MATERIAL_VERSION=1.3.1 +ANDROID_X_CONCURRENT_FUTURES_VERSION=1.1.0 +ANDROID_X_CORE_VERSION=1.6.0 +ANDROID_X_EXIF_INTERFACE_VERSION=1.3.3 +# At least versions 1.5 and later require java 8 desugaring, which Glide can't +# currently use, so we're stuck on an older version. +ANDROID_X_FRAGMENT_VERSION=1.3.6 +ANDROID_X_RECYCLERVIEW_VERSION=1.2.1 +ANDROID_X_TEST_CORE_VERSION=1.4.0 +ANDROID_X_TEST_ESPRESSO_VERSION=3.4.0 +ANDROID_X_TEST_JUNIT_VERSION=1.1.3 +ANDROID_X_TEST_RULES_VERSION=1.4.0 +ANDROID_X_TEST_RUNNER_VERSION=1.4.0 +ANDROID_X_TEST_CORE_KTX_VERSION=1.4.0 +ANDROID_X_TEST_JUNIT_KTX_VERSION=1.1.3 +ANDROID_X_TRACING_VERSION=1.0.0 +ANDROID_X_VECTOR_DRAWABLE_ANIMATED_VERSION=1.1.0 +ANDROID_X_CORE_KTX_VERSION=1.8.0 +ANDROID_X_LIFECYCLE_KTX_VERSION=2.4.1 + +ANDROID_SUPPORT_MULTIDEX_VERSION=1.0.3 + +# org.jetbrains versions +JETBRAINS_KOTLINX_COROUTINES_VERSION=1.6.4 +JETBRAINS_KOTLINX_COROUTINES_TEST_VERSION=1.6.4 +JETBRAINS_KOTLIN_VERSION=1.7.0 +JETBRAINS_KOTLIN_TEST_VERSION=1.7.0 +JETBRAINS_KOTLINX_BINARY_COMPATIBILITY_VALIDATOR_VERSION=0.11.0 +JETBRAINS_DOKKA_VERSION=1.7.10 + +## Other dependency versions +ACCOMPANIEST_VERSION=0.25.1 +ANDROID_GRADLE_VERSION=7.3.0 +AUTO_SERVICE_VERSION=1.0-rc3 +KOTLIN_COMPILE_TESTING_VERSION=1.4.9 +DAGGER_VERSION=2.15 +ERROR_PRONE_PLUGIN_VERSION=2.0.2 +ERROR_PRONE_VERSION=2.18.0 +GUAVA_TESTLIB_VERSION=18.0 +GUAVA_VERSION=28.1-android +JAVAPOET_VERSION=1.9.0 +JSR_305_VERSION=3.0.2 +JUNIT_VERSION=4.13.2 +KSP_GRADLE_PLUGIN_VERSION=1.7.0-1.0.6 +MOCKITO_ANDROID_VERSION=5.3.1 +MOCKITO_VERSION=5.3.1 +MOCKWEBSERVER_VERSION=3.0.0-RC1 +OK_HTTP_VERSION=3.10.0 +OK_HTTP_4_VERSION=4.10.0 +PMD_VERSION=6.0.0 +ROBOLECTRIC_VERSION=4.8.1 +TRUTH_VERSION=1.1.3 +VIOLATIONS_PLUGIN_VERSION=1.8 +VOLLEY_VERSION=1.2.0 diff --git a/instrumentation/build.gradle b/instrumentation/build.gradle index e9d692a3e8..b3fdc67172 100644 --- a/instrumentation/build.gradle +++ b/instrumentation/build.gradle @@ -8,34 +8,34 @@ apply plugin: 'com.android.application' dependencies { annotationProcessor project(":annotation:compiler") implementation project(":library") - implementation libs.android.support.multidex - implementation libs.androidx.appcompat + implementation "com.android.support:multidex:$ANDROID_SUPPORT_MULTIDEX_VERSION" + implementation "androidx.appcompat:appcompat:$ANDROID_X_APPCOMPAT_VERSION" androidTestImplementation project(':library') androidTestImplementation project(':mocks') androidTestImplementation project(':testutil') - androidTestImplementation libs.mockito.android - androidTestImplementation libs.androidx.junit - androidTestImplementation libs.androidx.test.rules - androidTestImplementation libs.androidx.test.core - androidTestImplementation libs.androidx.espresso.idling - androidTestImplementation libs.androidx.espresso - androidTestImplementation libs.truth - androidTestImplementation libs.junit - androidTestImplementation libs.androidx.exifinterface + androidTestImplementation "org.mockito:mockito-android:$MOCKITO_ANDROID_VERSION" + androidTestImplementation "androidx.test.ext:junit:$ANDROID_X_TEST_JUNIT_VERSION" + androidTestImplementation "androidx.test:rules:$ANDROID_X_TEST_RULES_VERSION" + androidTestImplementation "androidx.test:core:$ANDROID_X_TEST_CORE_VERSION" + androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$ANDROID_X_TEST_ESPRESSO_VERSION" + androidTestImplementation "androidx.test.espresso:espresso-core:$ANDROID_X_TEST_ESPRESSO_VERSION" + androidTestImplementation "com.google.truth:truth:$TRUTH_VERSION" + androidTestImplementation "junit:junit:$JUNIT_VERSION" + androidTestImplementation "androidx.exifinterface:exifinterface:$ANDROID_X_EXIF_INTERFACE_VERSION" // Not totally clear why this is required, but it seems to be missing when tests are run on // 4.1.2 and 4.2.0 emulators. - androidTestImplementation libs.findbugs.jsr305 + androidTestImplementation "com.google.code.findbugs:jsr305:$JSR_305_VERSION" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { applicationId 'com.bumptech.glide.instrumentation' - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionCode 1 versionName '1.0' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/integration/avif/build.gradle b/integration/avif/build.gradle index 88668a316f..092dc6ec69 100644 --- a/integration/avif/build.gradle +++ b/integration/avif/build.gradle @@ -3,17 +3,17 @@ apply plugin: 'com.android.library' dependencies { implementation project(':library') implementation 'org.aomedia.avif.android:avif:0.11.1.647c3c2' - implementation libs.guava + implementation "com.google.guava:guava:${GUAVA_VERSION}" annotationProcessor project(':annotation:compiler') } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName VERSION_NAME as String } diff --git a/integration/compose/build.gradle b/integration/compose/build.gradle index 8f32dd384e..89480bfd7f 100644 --- a/integration/compose/build.gradle +++ b/integration/compose/build.gradle @@ -50,19 +50,19 @@ dependencies { implementation(project(':integration:recyclerview')) { transitive = false } - implementation libs.compose.foundation - implementation libs.compose.ui - implementation libs.drawablepainter - implementation libs.androidx.core.ktx - debugImplementation libs.compose.ui.testmanifest - androidTestImplementation libs.junit - androidTestImplementation libs.compose.ui.testjunit4 - androidTestImplementation libs.androidx.espresso - androidTestImplementation libs.androidx.espresso.idling - androidTestImplementation libs.androidx.junit - androidTestImplementation libs.compose.material - androidTestImplementation libs.truth + implementation "androidx.compose.foundation:foundation:$ANDROID_X_COMPOSE_FOUNDATION_VERSION" + implementation "androidx.compose.ui:ui:$ANDROID_X_COMPOSE_VERSION" + implementation "com.google.accompanist:accompanist-drawablepainter:$ACCOMPANIEST_VERSION" + implementation "androidx.core:core-ktx:$ANDROID_X_CORE_KTX_VERSION" + debugImplementation "androidx.compose.ui:ui-test-manifest:$ANDROID_X_COMPOSE_VERSION" + androidTestImplementation "junit:junit:$JUNIT_VERSION" + androidTestImplementation "androidx.compose.ui:ui-test-junit4:$ANDROID_X_COMPOSE_VERSION" + androidTestImplementation "androidx.test.espresso:espresso-core:$ANDROID_X_TEST_ESPRESSO_VERSION" + androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$ANDROID_X_TEST_ESPRESSO_VERSION" + androidTestImplementation "androidx.test.ext:junit:$ANDROID_X_TEST_JUNIT_VERSION" + androidTestImplementation "androidx.compose.material:material:$ANDROID_X_COMPOSE_MATERIAL_VERSION" androidTestImplementation project(':testutil') + androidTestImplementation "com.google.truth:truth:${TRUTH_VERSION}" } apply from: "${rootProject.projectDir}/scripts/upload.gradle" diff --git a/integration/concurrent/build.gradle b/integration/concurrent/build.gradle index 4b165aeab8..fbcf2118ca 100644 --- a/integration/concurrent/build.gradle +++ b/integration/concurrent/build.gradle @@ -2,23 +2,23 @@ apply plugin: 'com.android.library' dependencies { implementation project(':library') - implementation libs.guava - implementation libs.androidx.futures + implementation "com.google.guava:guava:${GUAVA_VERSION}" + implementation "androidx.concurrent:concurrent-futures:${ANDROID_X_CONCURRENT_FUTURES_VERSION}" testImplementation project(':mocks') testImplementation project(':testutil') - testImplementation libs.androidx.test.core - testImplementation libs.truth - testImplementation libs.junit - testImplementation libs.robolectric + testImplementation "androidx.test:core:${ANDROID_X_TEST_CORE_VERSION}" + testImplementation "com.google.truth:truth:${TRUTH_VERSION}" + testImplementation "junit:junit:${JUNIT_VERSION}" + testImplementation "org.robolectric:robolectric:${ROBOLECTRIC_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName = VERSION_NAME as String } diff --git a/integration/cronet/build.gradle b/integration/cronet/build.gradle index 2cf3ac755b..77431dd2f1 100644 --- a/integration/cronet/build.gradle +++ b/integration/cronet/build.gradle @@ -2,25 +2,25 @@ apply plugin: 'com.android.library' dependencies { implementation project(':library') - implementation libs.cronet - implementation libs.guava + implementation 'com.google.android.gms:play-services-cronet:17.0.0' + implementation "com.google.guava:guava:${GUAVA_VERSION}" implementation project(':annotation') annotationProcessor project(':annotation:compiler') - api libs.androidx.annotation + api "androidx.annotation:annotation:${ANDROID_X_ANNOTATION_VERSION}" - testImplementation libs.truth - testImplementation libs.junit - testImplementation libs.robolectric - testImplementation libs.mockito + testImplementation "com.google.truth:truth:${TRUTH_VERSION}" + testImplementation "junit:junit:${JUNIT_VERSION}" + testImplementation "org.robolectric:robolectric:${ROBOLECTRIC_VERSION}" + testImplementation "org.mockito:mockito-core:${MOCKITO_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { minSdk 16 as int - targetSdk libs.versions.target.sdk.version.get() as int + targetSdk TARGET_SDK_VERSION as int versionName VERSION_NAME as String } diff --git a/integration/gifencoder/build.gradle b/integration/gifencoder/build.gradle index ece4e4a913..ca9543beea 100644 --- a/integration/gifencoder/build.gradle +++ b/integration/gifencoder/build.gradle @@ -4,17 +4,17 @@ dependencies { implementation project(':library') testImplementation project(":testutil") - testImplementation libs.truth - testImplementation libs.junit - testImplementation libs.mockito - testImplementation libs.robolectric - testImplementation libs.androidx.test.core - testImplementation libs.androidx.junit - testImplementation libs.androidx.test.runner + testImplementation "com.google.truth:truth:${TRUTH_VERSION}" + testImplementation "junit:junit:${JUNIT_VERSION}" + testImplementation "org.mockito:mockito-core:${MOCKITO_VERSION}" + testImplementation "org.robolectric:robolectric:${ROBOLECTRIC_VERSION}" + testImplementation "androidx.test:core:${ANDROID_X_TEST_CORE_VERSION}" + testImplementation "androidx.test.ext:junit:${ANDROID_X_TEST_JUNIT_VERSION}" + testImplementation "androidx.test:runner:${ANDROID_X_TEST_RUNNER_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int sourceSets { main { @@ -23,8 +23,8 @@ android { } defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName = VERSION_NAME as String } diff --git a/integration/ktx/build.gradle b/integration/ktx/build.gradle index b90be75c4c..aa0ee75015 100644 --- a/integration/ktx/build.gradle +++ b/integration/ktx/build.gradle @@ -4,11 +4,11 @@ plugins { } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" @@ -40,18 +40,18 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) { dependencies { api project(":library") - implementation libs.androidx.core.ktx - implementation libs.coroutines.core - testImplementation libs.androidx.test.ktx - testImplementation libs.kotlin.junit - testImplementation libs.androidx.test.ktx.junit - testImplementation libs.androidx.junit - testImplementation libs.robolectric - testImplementation libs.androidx.test.runner - testImplementation libs.junit - testImplementation libs.coroutines.test - testImplementation libs.truth - androidTestImplementation libs.androidx.junit + implementation "androidx.core:core-ktx:$ANDROID_X_CORE_KTX_VERSION" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$JETBRAINS_KOTLINX_COROUTINES_VERSION" + testImplementation "androidx.test:core-ktx:$ANDROID_X_TEST_CORE_KTX_VERSION" + testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$JETBRAINS_KOTLIN_VERSION" + testImplementation "androidx.test.ext:junit-ktx:$ANDROID_X_TEST_JUNIT_KTX_VERSION" + testImplementation "androidx.test.ext:junit:$ANDROID_X_TEST_JUNIT_VERSION" + testImplementation "org.robolectric:robolectric:$ROBOLECTRIC_VERSION" + testImplementation "androidx.test:runner:$ANDROID_X_TEST_RUNNER_VERSION" + testImplementation "junit:junit:$JUNIT_VERSION" + testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$JETBRAINS_KOTLINX_COROUTINES_TEST_VERSION" + testImplementation "com.google.truth:truth:$TRUTH_VERSION" + androidTestImplementation "androidx.test.ext:junit:$ANDROID_X_TEST_JUNIT_VERSION" } apply from: "${rootProject.projectDir}/scripts/upload.gradle" diff --git a/integration/okhttp/build.gradle b/integration/okhttp/build.gradle index b3f71f8c19..2ad9df11fa 100644 --- a/integration/okhttp/build.gradle +++ b/integration/okhttp/build.gradle @@ -4,16 +4,16 @@ dependencies { implementation project(':library') annotationProcessor project(':annotation:compiler') - api libs.okhttp2 - api libs.androidx.annotation + api "com.squareup.okhttp:okhttp:2.7.5" + api "androidx.annotation:annotation:${ANDROID_X_ANNOTATION_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName VERSION_NAME as String } diff --git a/integration/okhttp3/build.gradle b/integration/okhttp3/build.gradle index c6e1e02721..8d69f27b2b 100644 --- a/integration/okhttp3/build.gradle +++ b/integration/okhttp3/build.gradle @@ -4,16 +4,16 @@ dependencies { implementation project(':library') annotationProcessor project(':annotation:compiler') - api libs.okhttp3 - api libs.androidx.annotation + api "com.squareup.okhttp3:okhttp:${OK_HTTP_VERSION}" + api "androidx.annotation:annotation:${ANDROID_X_ANNOTATION_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName VERSION_NAME as String } diff --git a/integration/okhttp4/build.gradle b/integration/okhttp4/build.gradle index a9da17bb93..3ead9875b0 100644 --- a/integration/okhttp4/build.gradle +++ b/integration/okhttp4/build.gradle @@ -4,16 +4,16 @@ dependencies { implementation project(':library') annotationProcessor project(':annotation:compiler') - api libs.okhttp4 - api libs.androidx.annotation + api "com.squareup.okhttp3:okhttp:${OK_HTTP_4_VERSION}" + api "androidx.annotation:annotation:${ANDROID_X_ANNOTATION_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.okhttp.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk OK_HTTP_4_MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName VERSION_NAME as String } diff --git a/integration/recyclerview/build.gradle b/integration/recyclerview/build.gradle index e3d078a198..3bb4ac4f25 100644 --- a/integration/recyclerview/build.gradle +++ b/integration/recyclerview/build.gradle @@ -2,16 +2,16 @@ apply plugin: 'com.android.library' dependencies { implementation project(':library') - compileOnly libs.androidx.recyclerview - compileOnly libs.androidx.fragment + compileOnly "androidx.recyclerview:recyclerview:${ANDROID_X_RECYCLERVIEW_VERSION}" + compileOnly "androidx.fragment:fragment:${ANDROID_X_FRAGMENT_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName VERSION_NAME as String } diff --git a/integration/sqljournaldiskcache/build.gradle b/integration/sqljournaldiskcache/build.gradle index af44543f1e..224f825dcf 100644 --- a/integration/sqljournaldiskcache/build.gradle +++ b/integration/sqljournaldiskcache/build.gradle @@ -4,11 +4,11 @@ plugins { } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName VERSION_NAME as String } @@ -21,16 +21,16 @@ android { dependencies { implementation project(':library') - implementation libs.errorprone.annotations + implementation "com.google.errorprone:error_prone_annotations:$ERROR_PRONE_VERSION" - testImplementation libs.guava.testlib - testImplementation libs.truth - testImplementation libs.junit - testImplementation libs.mockito - testImplementation libs.robolectric - testImplementation libs.androidx.test.core - testImplementation libs.androidx.junit - testImplementation libs.androidx.test.runner + testImplementation "com.google.guava:guava-testlib:${GUAVA_TESTLIB_VERSION}" + testImplementation "com.google.truth:truth:${TRUTH_VERSION}" + testImplementation "junit:junit:${JUNIT_VERSION}" + testImplementation "org.mockito:mockito-core:${MOCKITO_VERSION}" + testImplementation "org.robolectric:robolectric:${ROBOLECTRIC_VERSION}" + testImplementation "androidx.test:core:${ANDROID_X_TEST_CORE_VERSION}" + testImplementation "androidx.test.ext:junit:${ANDROID_X_TEST_JUNIT_VERSION}" + testImplementation "androidx.test:runner:${ANDROID_X_TEST_RUNNER_VERSION}" } apply from: "${rootProject.projectDir}/scripts/upload.gradle" diff --git a/integration/volley/build.gradle b/integration/volley/build.gradle index 8120eca2df..d0a9c3febb 100644 --- a/integration/volley/build.gradle +++ b/integration/volley/build.gradle @@ -2,27 +2,27 @@ apply plugin: 'com.android.library' dependencies { implementation project(':library') - api libs.volley - api libs.androidx.annotation + api "com.android.volley:volley:${VOLLEY_VERSION}" + api "androidx.annotation:annotation:${ANDROID_X_ANNOTATION_VERSION}" annotationProcessor project(':annotation:compiler') testImplementation project(":testutil") - testImplementation libs.truth - testImplementation libs.junit - testImplementation libs.mockito - testImplementation libs.robolectric - testImplementation libs.mockwebserver - testImplementation libs.androidx.test.core - testImplementation libs.androidx.junit - testImplementation libs.androidx.test.runner + testImplementation "com.google.truth:truth:${TRUTH_VERSION}" + testImplementation "junit:junit:${JUNIT_VERSION}" + testImplementation "org.mockito:mockito-core:${MOCKITO_VERSION}" + testImplementation "org.robolectric:robolectric:${ROBOLECTRIC_VERSION}" + testImplementation "com.squareup.okhttp3:mockwebserver:${MOCKWEBSERVER_VERSION}" + testImplementation "androidx.test:core:${ANDROID_X_TEST_CORE_VERSION}" + testImplementation "androidx.test.ext:junit:${ANDROID_X_TEST_JUNIT_VERSION}" + testImplementation "androidx.test:runner:${ANDROID_X_TEST_RUNNER_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName VERSION_NAME as String } diff --git a/library/build.gradle b/library/build.gradle index 9c8bd6eabf..b3625fcd89 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -12,27 +12,27 @@ dependencies { api project(':third_party:gif_decoder') api project(':third_party:disklrucache') api project(':annotation') - api libs.androidx.fragment - api libs.androidx.vectordrawable - api libs.androidx.exifinterface - api libs.androidx.tracing - compileOnly libs.androidx.appcompat + api "androidx.fragment:fragment:${ANDROID_X_FRAGMENT_VERSION}" + api "androidx.vectordrawable:vectordrawable-animated:${ANDROID_X_VECTOR_DRAWABLE_ANIMATED_VERSION}" + api "androidx.exifinterface:exifinterface:${ANDROID_X_EXIF_INTERFACE_VERSION}" + api "androidx.tracing:tracing:${ANDROID_X_TRACING_VERSION}" + compileOnly "androidx.appcompat:appcompat:${ANDROID_X_APPCOMPAT_VERSION}" if (project.plugins.hasPlugin('net.ltgt.errorprone')) { - errorprone libs.errorprone.core + errorprone "com.google.errorprone:error_prone_core:${ERROR_PRONE_VERSION}" } - testImplementation libs.androidx.appcompat + testImplementation "androidx.appcompat:appcompat:${ANDROID_X_APPCOMPAT_VERSION}" testImplementation project(':testutil') - testImplementation libs.guava.testlib - testImplementation libs.truth - testImplementation libs.junit - testImplementation libs.mockito - testImplementation libs.robolectric - testImplementation libs.mockwebserver - testImplementation libs.androidx.test.core - testImplementation libs.androidx.junit - testImplementation libs.androidx.test.runner + testImplementation "com.google.guava:guava-testlib:${GUAVA_TESTLIB_VERSION}" + testImplementation "com.google.truth:truth:${TRUTH_VERSION}" + testImplementation "junit:junit:${JUNIT_VERSION}" + testImplementation "org.mockito:mockito-core:${MOCKITO_VERSION}" + testImplementation "org.robolectric:robolectric:${ROBOLECTRIC_VERSION}" + testImplementation "com.squareup.okhttp3:mockwebserver:${MOCKWEBSERVER_VERSION}" + testImplementation "androidx.test:core:${ANDROID_X_TEST_CORE_VERSION}" + testImplementation "androidx.test.ext:junit:${ANDROID_X_TEST_JUNIT_VERSION}" + testImplementation "androidx.test:runner:${ANDROID_X_TEST_RUNNER_VERSION}" } if (project.plugins.hasPlugin('net.ltgt.errorprone')) { @@ -59,11 +59,11 @@ if (project.plugins.hasPlugin('net.ltgt.errorprone')) { } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName VERSION_NAME as String consumerProguardFiles 'proguard-rules.txt' } diff --git a/library/pmd/build.gradle b/library/pmd/build.gradle index 05748e5bbd..3ef55b2ff2 100644 --- a/library/pmd/build.gradle +++ b/library/pmd/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'pmd' def library = project(':library') pmd { - toolVersion libs.versions.pmd.get() + toolVersion PMD_VERSION } tasks.create('pmd', Pmd) { diff --git a/library/test/build.gradle b/library/test/build.gradle index 9a8b568c1d..ec4ea82854 100644 --- a/library/test/build.gradle +++ b/library/test/build.gradle @@ -1,19 +1,19 @@ apply plugin: 'com.android.library' dependencies { - testImplementation libs.androidx.appcompat + testImplementation "androidx.appcompat:appcompat:${ANDROID_X_APPCOMPAT_VERSION}" testImplementation project(':library') testImplementation project(':mocks') testImplementation project(':testutil') - testImplementation libs.guava.testlib - testImplementation libs.truth - testImplementation libs.junit - testImplementation libs.mockito - testImplementation libs.robolectric - testImplementation libs.mockwebserver - testImplementation libs.androidx.test.core - testImplementation libs.androidx.junit - testImplementation libs.androidx.test.runner + testImplementation "com.google.guava:guava-testlib:${GUAVA_TESTLIB_VERSION}" + testImplementation "com.google.truth:truth:${TRUTH_VERSION}" + testImplementation "junit:junit:${JUNIT_VERSION}" + testImplementation "org.mockito:mockito-core:${MOCKITO_VERSION}" + testImplementation "org.robolectric:robolectric:${ROBOLECTRIC_VERSION}" + testImplementation "com.squareup.okhttp3:mockwebserver:${MOCKWEBSERVER_VERSION}" + testImplementation "androidx.test:core:${ANDROID_X_TEST_CORE_VERSION}" + testImplementation "androidx.test.ext:junit:${ANDROID_X_TEST_JUNIT_VERSION}" + testImplementation "androidx.test:runner:${ANDROID_X_TEST_RUNNER_VERSION}" } tasks.withType(JavaCompile) { @@ -40,11 +40,11 @@ android.testOptions.unitTests.all { Test testTask -> } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName VERSION_NAME as String } diff --git a/mocks/build.gradle b/mocks/build.gradle index 19d6e462a7..329b5581f5 100644 --- a/mocks/build.gradle +++ b/mocks/build.gradle @@ -2,17 +2,17 @@ apply plugin: 'com.android.library' dependencies { implementation project(':library') - implementation libs.androidx.annotation - implementation libs.guava - implementation libs.mockito + implementation "androidx.annotation:annotation:${ANDROID_X_ANNOTATION_VERSION}" + implementation "com.google.guava:guava:${GUAVA_VERSION}" + implementation "org.mockito:mockito-core:${MOCKITO_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName = VERSION_NAME as String } diff --git a/samples/contacturi/build.gradle b/samples/contacturi/build.gradle index 54c14954e5..b76fb33b58 100644 --- a/samples/contacturi/build.gradle +++ b/samples/contacturi/build.gradle @@ -2,17 +2,17 @@ apply plugin: 'com.android.application' dependencies { implementation project(':library') - implementation libs.androidx.appcompat + implementation "androidx.appcompat:appcompat:${ANDROID_X_APPCOMPAT_VERSION}" annotationProcessor project(':annotation:compiler') } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { applicationId 'com.bumptech.glide.samples.contacturi' - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionCode 1 versionName '1.0' diff --git a/samples/flickr/build.gradle b/samples/flickr/build.gradle index d78280f865..ad61f941d7 100644 --- a/samples/flickr/build.gradle +++ b/samples/flickr/build.gradle @@ -7,18 +7,18 @@ dependencies { } annotationProcessor project(':annotation:compiler') - implementation libs.androidx.appcompat - implementation libs.volley - implementation libs.androidx.recyclerview + implementation "androidx.appcompat:appcompat:${ANDROID_X_APPCOMPAT_VERSION}" + implementation "com.android.volley:volley:${VOLLEY_VERSION}" + implementation "androidx.recyclerview:recyclerview:${ANDROID_X_RECYCLERVIEW_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { applicationId 'com.bumptech.glide.samples.flickr' - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionCode 1 versionName '1.0' diff --git a/samples/gallery/build.gradle b/samples/gallery/build.gradle index 6f439a6a36..875578ead9 100644 --- a/samples/gallery/build.gradle +++ b/samples/gallery/build.gradle @@ -10,14 +10,14 @@ dependencies { transitive = false } - implementation libs.androidx.recyclerview - implementation libs.androidx.fragment.ktx - implementation libs.androidx.core.ktx - implementation libs.coroutines.core - implementation libs.coroutines.android - implementation libs.kotlin.jdk7 - implementation libs.compose.foundation - implementation libs.compose.ui + implementation "androidx.recyclerview:recyclerview:$ANDROID_X_RECYCLERVIEW_VERSION" + implementation "androidx.fragment:fragment-ktx:$ANDROID_X_FRAGMENT_VERSION" + implementation "androidx.core:core-ktx:$ANDROID_X_CORE_KTX_VERSION" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$JETBRAINS_KOTLINX_COROUTINES_VERSION" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$JETBRAINS_KOTLINX_COROUTINES_VERSION" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$JETBRAINS_KOTLIN_VERSION" + implementation "androidx.compose.foundation:foundation:$ANDROID_X_COMPOSE_FOUNDATION_VERSION" + implementation "androidx.compose.ui:ui:$ANDROID_X_COMPOSE_VERSION" ksp project(':annotation:ksp') } diff --git a/samples/giphy/build.gradle b/samples/giphy/build.gradle index d58829317b..0f6f3b3e14 100644 --- a/samples/giphy/build.gradle +++ b/samples/giphy/build.gradle @@ -6,18 +6,18 @@ dependencies { transitive = false } implementation 'com.google.code.gson:gson:2.8.2' - implementation libs.androidx.recyclerview - implementation libs.androidx.fragment + implementation "androidx.recyclerview:recyclerview:${ANDROID_X_RECYCLERVIEW_VERSION}" + implementation "androidx.fragment:fragment:${ANDROID_X_FRAGMENT_VERSION}" annotationProcessor project(':annotation:compiler') } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { applicationId 'com.bumptech.glide.samples.giphy' - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionCode 1 versionName '1.0' } diff --git a/samples/imgur/build.gradle b/samples/imgur/build.gradle index 466841de03..2f678528ef 100644 --- a/samples/imgur/build.gradle +++ b/samples/imgur/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { applicationId "com.bumptech.glide.samples.imgur" - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionCode 1 versionName "1.0" @@ -28,29 +28,29 @@ dependencies { implementation project(':library') annotationProcessor project(':annotation:compiler') - implementation libs.dagger - implementation libs.dagger.android - implementation (libs.dagger.android.support) { + implementation "com.google.dagger:dagger:${DAGGER_VERSION}" + annotationProcessor "com.google.dagger:dagger-compiler:${DAGGER_VERSION}" + implementation "com.google.dagger:dagger-android:${DAGGER_VERSION}" + implementation ("com.google.dagger:dagger-android-support:${DAGGER_VERSION}") { exclude group: "com.android.support" } - annotationProcessor libs.dagger.compiler - annotationProcessor libs.dagger.android.processor + annotationProcessor "com.google.dagger:dagger-android-processor:${DAGGER_VERSION}" - implementation libs.okhttp3 - implementation libs.retrofit - implementation libs.retrofit.gson - implementation libs.retrofit.rxjava + implementation "com.squareup.okhttp3:okhttp:${OK_HTTP_VERSION}" + implementation 'com.squareup.retrofit2:retrofit:2.3.0' + implementation 'com.squareup.retrofit2:converter-gson:2.3.0' + implementation 'com.squareup.retrofit2:adapter-rxjava:2.3.0' - implementation libs.rx.android - implementation libs.rx.java + implementation 'io.reactivex:rxandroid:1.2.1' + implementation 'io.reactivex:rxjava:1.3.4' - implementation libs.androidx.appcompat - implementation libs.androidx.cardview - implementation libs.androidx.recyclerview + implementation "androidx.appcompat:appcompat:${ANDROID_X_APPCOMPAT_VERSION}" + implementation "androidx.cardview:cardview:${ANDROID_X_CARDVIEW_VERSION}" + implementation "androidx.recyclerview:recyclerview:${ANDROID_X_RECYCLERVIEW_VERSION}" // Fixes a compilation warning related to dagger, see // https://github.com/google/guava/issues/2721. - compileOnly libs.errorprone.annotations + compileOnly "com.google.errorprone:error_prone_annotations:${ERROR_PRONE_VERSION}" } task run(type: Exec, dependsOn: 'installDebug') { diff --git a/samples/svg/build.gradle b/samples/svg/build.gradle index 41a9d5738e..0bf05d57c7 100644 --- a/samples/svg/build.gradle +++ b/samples/svg/build.gradle @@ -3,17 +3,17 @@ apply plugin: 'com.android.application' dependencies { implementation project(':library') annotationProcessor project(':annotation:compiler') - implementation libs.svg - implementation libs.androidx.fragment + implementation 'com.caverock:androidsvg:1.2.1' + implementation "androidx.fragment:fragment:${ANDROID_X_FRAGMENT_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { applicationId 'com.bumptech.glide.samples.svg' - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionCode 1 versionName '1.0' diff --git a/settings.gradle b/settings.gradle index a7528e0ef2..c4fe9a6083 100644 --- a/settings.gradle +++ b/settings.gradle @@ -39,110 +39,3 @@ include ':testutil' include ':mocks' rootProject.name = 'glide-parent' - -dependencyResolutionManagement { - // versionCatalogs end up in the global namespace and we can't nest namespaces, so we end up - // stuffing everything into libs :/. - versionCatalogs { - libs { - // Versions for things other than dependencies - version('compile-sdk-version', 'android-33') - version('min-sdk-version', '14') - version('okhttp-min-sdk-version', '21') - version('target-sdk-version', '32') - version('pmd', '6.0.0') - - // Versions for dependencies - version('compose', '1.3.2') - version('coroutines', '1.6.4') - version('dagger', '2.15') - version('errorprone', '2.18.0') - version('kotlin', '1.7.0') - version('mockito', '5.3.1') - version('retrofit', '2.3.0') - version('androidx-benchmark', '1.1.0') - version('androidx-espresso', '3.4.0') - // At least versions 1.5 and later require java 8 desugaring, which Glide can't - // currently use, so we're stuck on an older version. - version('androidx-fragment', '1.3.6') - - library('android.support.multidex', "com.android.support:multidex:1.0.3") - library('autoservice', 'com.google.auto.service:auto-service:1.0-rc3') - library('autoservice.annotations', 'com.google.auto.service:auto-service-annotations:1.0.1') - library('android-gradle', 'com.android.tools.build:gradle:7.3.0') - library('androidx-cardview', 'androidx.cardview:cardview:1.0.0') - library('androidx-core', 'androidx.core:core:1.6.0') - library('androidx-annotation', 'androidx.annotation:annotation:1.3.0') - library('androidx-appcompat', 'androidx.appcompat:appcompat:1.3.1') - library('androidx-benchmark.gradle', 'androidx.benchmark', 'benchmark-gradle-plugin').versionRef('androidx-benchmark') - library('androidx-benchmark.junit', 'androidx.benchmark', 'benchmark-junit4').versionRef('androidx-benchmark') - library('androidx-core.ktx', 'androidx.core:core-ktx:1.8.0') - library('androidx-espresso', 'androidx.test.espresso', 'espresso-core').versionRef('androidx-espresso') - library('androidx-espresso.idling', 'androidx.test.espresso.idling', 'idling-concurrent').versionRef('androidx-espresso') - library('androidx-exifinterface', 'androidx.exifinterface:exifinterface:1.3.3') - library('androidx-fragment', 'androidx.fragment', 'fragment').versionRef('androidx-fragment') - library('androidx-fragment.ktx', 'androidx.fragment', 'fragment-ktx').versionRef('androidx-fragment') - library('androidx-futures', 'androidx.concurrent:concurrent-futures:1.1.0') - library('androidx-junit', 'androidx.test.ext:junit:1.1.3') - library('androidx-recyclerview','androidx.recyclerview:recyclerview:1.2.1') - library('androidx-test.core', 'androidx.test:core:1.4.0') - library('androidx-test.ktx', 'androidx.test:core-ktx:1.4.0') - library('androidx-test.ktx.junit', 'androidx.test.ext:junit-ktx:1.1.3') - library('androidx-test.rules', 'androidx.test:rules:1.4.0') - library('androidx-test.runner', 'androidx.test:runner:1.4.0') - library('androidx-tracing', 'androidx.tracing:tracing:1.0.0') - library('androidx.vectordrawable', 'androidx.vectordrawable:vectordrawable-animated:1.1.0') - library('proguard-gradle', 'com.guardsquare:proguard-gradle:7.1.0') - library('compose-foundation', 'androidx.compose.foundation:foundation:1.3.1') - library('compose-material', 'androidx.compose.material:material:1.3.1') - library('compose-ui', 'androidx.compose.ui', 'ui').versionRef('compose') - library('compose-ui.testmanifest', 'androidx.compose.ui', 'ui-test-manifest').versionRef('compose') - library('compose-ui.testjunit4', 'androidx.compose.ui', 'ui-test-junit4').versionRef('compose') - library('coroutines-binarycompat.gradle', 'org.jetbrains.kotlinx:binary-compatibility-validator:0.11.0') - library('coroutines-android', 'org.jetbrains.kotlinx', 'kotlinx-coroutines-android').versionRef('coroutines') - library('coroutines-core', 'org.jetbrains.kotlinx', 'kotlinx-coroutines-core').versionRef('coroutines') - library('coroutines-test', 'org.jetbrains.kotlinx', 'kotlinx-coroutines-test').versionRef('coroutines') - library('cronet', 'com.google.android.gms:play-services-cronet:17.0.0') - library('dagger', 'com.google.dagger', 'dagger').versionRef('dagger') - library('dagger-compiler', 'com.google.dagger', 'dagger-compiler').versionRef('dagger') - library('dagger-android', 'com.google.dagger', 'dagger-android').versionRef('dagger') - library('dagger-android.support', 'com.google.dagger', 'dagger-android-support').versionRef('dagger') - library('dagger-android.processor', 'com.google.dagger', 'dagger-android-processor').versionRef('dagger') - library('dokka-gradle', 'org.jetbrains.dokka:dokka-gradle-plugin:1.7.10') - library('drawablepainter', 'com.google.accompanist:accompanist-drawablepainter:0.25.1') - library('errorprone-annotations', 'com.google.errorprone', 'error_prone_annotations').versionRef('errorprone') - library('errorprone-core', 'com.google.errorprone', 'error_prone_core').versionRef('errorprone') - library('errorprone-gradle', 'net.ltgt.gradle:gradle-errorprone-plugin:2.0.2') - library('findbugs-jsr305', 'com.google.code.findbugs:jsr305:3.0.2') - library('guava', 'com.google.guava:guava:28.1-android') - library('guava-testlib', 'com.google.guava:guava-testlib:18.0') - library('javapoet', 'com.squareup:javapoet:1.9.0') - library('junit', 'junit:junit:4.13.2') - library('kotlin-junit', 'org.jetbrains.kotlin', 'kotlin-test-junit').versionRef('kotlin') - library('kotlin-jdk7', 'org.jetbrains.kotlin', 'kotlin-stdlib-jdk7').versionRef('kotlin') - library('kotlin-gradle', 'org.jetbrains.kotlin', 'kotlin-gradle-plugin').versionRef('kotlin') - library('kotlin-test', 'org.jetbrains.kotlin:kotlin-test:1.7.0') - library('kotlinpoet', 'com.squareup:kotlinpoet:1.12.0') - library('ksp', 'com.google.devtools.ksp:symbol-processing-api:1.7.0-1.0.6') - library('ksp-autoservice', 'dev.zacsweers.autoservice:auto-service-ksp:1.0.0') - library('ksp-compiletesting', 'com.github.tschuchortdev:kotlin-compile-testing-ksp:1.4.9') - library('ksp-gradle', 'com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.7.0-1.0.6') - library('mockwebserver', 'com.squareup.okhttp3:mockwebserver:3.0.0-RC1') - library('mockito', 'org.mockito', 'mockito-core').versionRef('mockito') - library('mockito-android', 'org.mockito', 'mockito-android').versionRef('mockito') - library('okhttp2', 'com.squareup.okhttp:okhttp:2.7.5') - library('okhttp3', 'com.squareup.okhttp3:okhttp:3.10.0') - library('okhttp4', 'com.squareup.okhttp3:okhttp:4.10.0') - library('retrofit', 'com.squareup.retrofit2', 'retrofit').versionRef('retrofit') - library('retrofit-gson', 'com.squareup.retrofit2', 'converter-gson').versionRef('retrofit') - library('retrofit-rxjava', 'com.squareup.retrofit2', 'adapter-rxjava').versionRef('retrofit') - library('robolectric', 'org.robolectric:robolectric:4.8.1') - library('rx-android', 'io.reactivex:rxandroid:1.2.1') - library('rx-java', 'io.reactivex:rxjava:1.3.4') - library('svg', 'com.caverock:androidsvg:1.2.1') - library('truth', 'com.google.truth:truth:1.1.3') - library('violations', 'se.bjurr.violations:violations-gradle-plugin:1.8') - library('volley', 'com.android.volley:volley:1.2.0') - } - } -} diff --git a/testutil/build.gradle b/testutil/build.gradle index 8cb2dcebb9..e570898dc1 100644 --- a/testutil/build.gradle +++ b/testutil/build.gradle @@ -1,19 +1,19 @@ apply plugin: 'com.android.library' dependencies { - implementation libs.truth + implementation "com.google.truth:truth:${TRUTH_VERSION}" implementation project(":library") - api libs.androidx.annotation - api libs.androidx.core - api libs.androidx.test.core + api "androidx.annotation:annotation:${ANDROID_X_ANNOTATION_VERSION}" + api "androidx.core:core:${ANDROID_X_CORE_VERSION}" + api "androidx.test:core:${ANDROID_X_TEST_CORE_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName VERSION_NAME as String } diff --git a/third_party/disklrucache/build.gradle b/third_party/disklrucache/build.gradle index baeeb3066d..923f99b3f9 100644 --- a/third_party/disklrucache/build.gradle +++ b/third_party/disklrucache/build.gradle @@ -6,16 +6,16 @@ checkstyle { } dependencies { - testImplementation libs.junit - testImplementation libs.truth + testImplementation "junit:junit:${JUNIT_VERSION}" + testImplementation "com.google.truth:truth:${TRUTH_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int versionName VERSION_NAME as String consumerProguardFiles 'proguard-rules.txt' } diff --git a/third_party/gif_decoder/build.gradle b/third_party/gif_decoder/build.gradle index c3a4c55e90..fc783c776a 100644 --- a/third_party/gif_decoder/build.gradle +++ b/third_party/gif_decoder/build.gradle @@ -1,22 +1,22 @@ apply plugin: 'com.android.library' dependencies { - implementation libs.androidx.annotation + implementation "androidx.annotation:annotation:${ANDROID_X_ANNOTATION_VERSION}" testImplementation project(':testutil') - testImplementation libs.androidx.annotation - testImplementation libs.truth - testImplementation libs.junit - testImplementation libs.mockito - testImplementation libs.robolectric + testImplementation "androidx.annotation:annotation:${ANDROID_X_ANNOTATION_VERSION}" + testImplementation "com.google.truth:truth:${TRUTH_VERSION}" + testImplementation "junit:junit:${JUNIT_VERSION}" + testImplementation "org.mockito:mockito-core:${MOCKITO_VERSION}" + testImplementation "org.robolectric:robolectric:${ROBOLECTRIC_VERSION}" } android { - compileSdkVersion libs.versions.compile.sdk.version.get() + compileSdk COMPILE_SDK_VERSION as int defaultConfig { - minSdk libs.versions.min.sdk.version.get() as int - targetSdk libs.versions.target.sdk.version.get() as int + minSdk MIN_SDK_VERSION as int + targetSdk TARGET_SDK_VERSION as int } }