From f7ccd6dd2dfd7154d0e5f6b9889a48ec937417d8 Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Tue, 23 Jul 2024 21:52:18 +0000 Subject: [PATCH 1/5] Consolidate Gradle dep versions. This ensures version upgrades are easier in the future. This does potentially resolve some existing discrepancies since not all dep versions matched across Gradle files. --- app/build.gradle | 170 +++++++++++++++++++++---------------------- build.gradle | 96 +++++++++++++++++++++++- data/build.gradle | 68 ++++++++--------- domain/build.gradle | 74 +++++++++---------- testing/build.gradle | 78 ++++++++++---------- utility/build.gradle | 70 +++++++++--------- 6 files changed, 324 insertions(+), 232 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 13fae2de07a..9d7f0c69c1c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,12 +5,12 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' android { - compileSdkVersion 33 - buildToolsVersion "30.0.2" + compileSdkVersion target_sdk_version + buildToolsVersion build_tools_version defaultConfig { applicationId "org.oppia.android" - minSdkVersion 21 - targetSdkVersion 33 + minSdkVersion min_sdk_version + targetSdkVersion target_sdk_version versionCode 1 versionName "1.0" multiDexEnabled true @@ -155,90 +155,90 @@ if (project.gradle.startParameter?.taskRequests?.args[0]?.remove("--list-shards" dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation( - 'androidx.appcompat:appcompat:1.0.2', - "androidx.compose.foundation:foundation:$compose_version", - "androidx.compose.foundation:foundation-layout:$compose_version", - "androidx.compose.material:material:$compose_version", - "androidx.compose.runtime:runtime:$compose_version", - "androidx.compose.runtime:runtime-livedata:$compose_version", - "androidx.compose.ui:ui:$compose_version", - "androidx.compose.ui:ui-tooling:$compose_version", - 'androidx.constraintlayout:constraintlayout:1.1.3', - 'androidx.core:core-ktx:1.0.2', - 'androidx.legacy:legacy-support-v4:1.0.0', - 'androidx.lifecycle:lifecycle-extensions:2.0.0', - 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0-alpha03', - 'androidx.navigation:navigation-fragment:2.0.0', - 'androidx.navigation:navigation-fragment-ktx:2.0.0', - 'androidx.navigation:navigation-ui:2.0.0', - 'androidx.navigation:navigation-ui-ktx:2.0.0', - "androidx.fragment:fragment:$fragment_version", - 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0-alpha03', - 'androidx.multidex:multidex:2.0.1', - 'androidx.recyclerview:recyclerview:1.0.0', - 'androidx.work:work-runtime-ktx:2.4.0', - 'com.github.bumptech.glide:glide:4.11.0', - 'com.google.android.flexbox:flexbox:3.0.0', - 'com.google.android.material:material:1.3.0', - "com.google.android.material:compose-theme-adapter:$compose_version", - 'com.google.dagger:dagger:2.41', - 'com.google.firebase:firebase-analytics:17.5.0', - 'com.google.firebase:firebase-analytics-ktx:17.5.0', - 'com.google.firebase:firebase-appcheck:16.0.0', - 'com.google.firebase:firebase-appcheck-debug:16.0.0', - 'com.google.firebase:firebase-appcheck-playintegrity:16.0.0', - 'com.google.firebase:firebase-core:17.5.0', - 'com.google.firebase:firebase-crashlytics:17.0.0', - 'com.google.firebase:firebase-firestore-ktx:24.2.1', - 'com.google.firebase:firebase-auth-ktx:19.3.1', - 'com.google.guava:guava:28.1-android', - 'com.google.protobuf:protobuf-javalite:3.17.3', - 'nl.dionsegijn:konfetti:1.2.5', - "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version", - 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4', - 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4', - 'org.mockito:mockito-core:2.7.22', - 'com.github.oppia:android-spotlight:cc23499d37dc8533a2876e45b5063e981a4583f4' + "androidx.appcompat:appcompat:$androidx_appcompat_appcompat", + "androidx.compose.foundation:foundation:$androidx_compose_foundation_foundation", + "androidx.compose.foundation:foundation-layout:$androidx_compose_foundation_foundation_layout", + "androidx.compose.material:material:$androidx_compose_material_material", + "androidx.compose.runtime:runtime:$androidx_compose_runtime_runtime", + "androidx.compose.runtime:runtime-livedata:$androidx_compose_runtime_runtime_livedata", + "androidx.compose.ui:ui:$androidx_compose_ui_ui", + "androidx.compose.ui:ui-tooling:$androidx_compose_ui_ui_tooling", + "androidx.constraintlayout:constraintlayout:$androidx_constraintlayout_constraintlayout", + "androidx.core:core-ktx:$androidx_core_core_ktx", + "androidx.legacy:legacy-support-v4:$androidx_legacy_legacy_support_v4", + "androidx.lifecycle:lifecycle-extensions:$androidx_lifecycle_lifecycle_extensions", + "androidx.lifecycle:lifecycle-runtime-ktx:$androidx_lifecycle_lifecycle_runtime_ktx", + "androidx.navigation:navigation-fragment:$androidx_navigation_navigation_fragment", + "androidx.navigation:navigation-fragment-ktx:$androidx_navigation_navigation_fragment_ktx", + "androidx.navigation:navigation-ui:$androidx_navigation_navigation_ui", + "androidx.navigation:navigation-ui-ktx:$androidx_navigation_navigation_ui_ktx", + "androidx.fragment:fragment:$androidx_fragment_fragment", + "androidx.lifecycle:lifecycle-runtime-ktx:$androidx_lifecycle_lifecycle_runtime_ktx", + "androidx.multidex:multidex:$androidx_multidex_multidex", + "androidx.recyclerview:recyclerview:$androidx_recyclerview_recyclerview", + "androidx.work:work-runtime-ktx:$androidx_work_work_runtime_ktx", + "com.github.bumptech.glide:glide:$com_github_bumptech_glide_glide", + "com.google.android.flexbox:flexbox:$com_google_android_flexbox_flexbox", + "com.google.android.material:material:$com_google_android_material_material", + "com.google.android.material:compose-theme-adapter:$com_google_android_material_compose_theme_adapter", + "com.google.dagger:dagger:$com_google_dagger_dagger", + "com.google.firebase:firebase-analytics:$com_google_firebase_firebase_analytics", + "com.google.firebase:firebase-analytics-ktx:$com_google_firebase_firebase_analytics_ktx", + "com.google.firebase:firebase-appcheck:$com_google_firebase_firebase_appcheck", + "com.google.firebase:firebase-appcheck-debug:$com_google_firebase_firebase_appcheck_debug", + "com.google.firebase:firebase-appcheck-playintegrity:$com_google_firebase_firebase_appcheck_playintegrity", + "com.google.firebase:firebase-core:$com_google_firebase_firebase_core", + "com.google.firebase:firebase-crashlytics:$com_google_firebase_firebase_crashlytics", + "com.google.firebase:firebase-firestore-ktx:$com_google_firebase_firebase_firestore_ktx", + "com.google.firebase:firebase-auth-ktx:$com_google_firebase_firebase_auth_ktx", + "com.google.guava:guava:$com_google_guava_guava", + "com.google.protobuf:protobuf-javalite:$com_google_protobuf_protobuf_javalite", + "nl.dionsegijn:konfetti:$nl_dionsegijn_konfetti", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$org_jetbrains_kotlin_kotlin_stdlib_jdk7", + "org.jetbrains.kotlinx:kotlinx-coroutines-core:$org_jetbrains_kotlinx_kotlinx_coroutines_core", + "org.jetbrains.kotlinx:kotlinx-coroutines-android:$org_jetbrains_kotlinx_kotlinx_coroutines_android", + "org.mockito:mockito-core:$org_mockito_mockito_core", + "com.github.oppia:android-spotlight:$com_github_oppia_android_spotlight" ) compileOnly( - 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.2', - 'javax.annotation:javax.annotation-api:1.3.2', - 'org.glassfish.jaxb:jaxb-runtime:2.3.2', + "jakarta.xml.bind:jakarta.xml.bind-api:$jakarta_xml_bind_jakarta_xml_bind_api", + "javax.annotation:javax.annotation-api:$javax_annotation_javax_annotation_api", + "org.glassfish.jaxb:jaxb-runtime:$org_glassfish_jaxb_jaxb_runtime", ) testImplementation( - "androidx.compose.ui:ui-test-junit4:$compose_version", - 'androidx.test:core:1.2.0', - 'androidx.test.espresso:espresso-contrib:3.1.0', - 'androidx.test.espresso:espresso-core:3.2.0', - 'androidx.test.espresso:espresso-intents:3.1.0', - 'androidx.test.ext:junit:1.1.1', - 'androidx.test.ext:truth:1.4.0', - 'androidx.work:work-testing:2.4.0', - 'com.github.bumptech.glide:mocks:4.11.0', - 'com.google.truth:truth:1.1.3', - 'com.google.truth.extensions:truth-liteproto-extension:1.1.3', - 'org.robolectric:annotations:4.5', - 'org.robolectric:robolectric:4.5', - 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4', - "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version", - 'org.mockito:mockito-core:2.7.22', + "androidx.compose.ui:ui-test-junit4:$androidx_compose_ui_ui_test_junit4", + "androidx.test:core:$androidx_test_core", + "androidx.test.espresso:espresso-contrib:$androidx_test_espresso_espresso_contrib", + "androidx.test.espresso:espresso-core:$androidx_test_espresso_espresso_core", + "androidx.test.espresso:espresso-intents:$androidx_test_espresso_espresso_intents", + "androidx.test.ext:junit:$androidx_test_ext_junit", + "androidx.test.ext:truth:$androidx_test_ext_truth", + "androidx.work:work-testing:$androidx_work_work_testing", + "com.github.bumptech.glide:mocks:$com_github_bumptech_glide_mocks", + "com.google.truth:truth:$com_google_truth_truth", + "com.google.truth.extensions:truth-liteproto-extension:$com_google_truth_extensions_truth_liteproto_extension", + "org.robolectric:annotations:$org_robolectric_annotations", + "org.robolectric:robolectric:$org_robolectric_robolectric", + "org.jetbrains.kotlinx:kotlinx-coroutines-test:$org_jetbrains_kotlinx_kotlinx_coroutines_test", + "org.jetbrains.kotlin:kotlin-test-junit:$org_jetbrains_kotlin_kotlin_test_junit", + "org.mockito:mockito-core:$org_mockito_mockito_core", project(":testing"), ) androidTestImplementation( - "androidx.compose.ui:ui-test-junit4:$compose_version", - 'androidx.test:core:1.2.0', - 'androidx.test.espresso:espresso-contrib:3.1.0', - 'androidx.test.espresso:espresso-core:3.2.0', - 'androidx.test.espresso:espresso-intents:3.1.0', - 'androidx.test.ext:junit:1.1.1', - 'androidx.test.ext:truth:1.4.0', - 'com.github.bumptech.glide:mocks:4.11.0', - 'com.google.truth:truth:1.1.3', - 'androidx.work:work-testing:2.4.0', - 'com.google.truth.extensions:truth-liteproto-extension:1.1.3', - 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4', - 'org.mockito:mockito-android:2.7.22', - 'org.robolectric:annotations:4.5', + "androidx.compose.ui:ui-test-junit4:$androidx_compose_ui_ui_test_junit4", + "androidx.test:core:$androidx_test_core", + "androidx.test.espresso:espresso-contrib:$androidx_test_espresso_espresso_contrib", + "androidx.test.espresso:espresso-core:$androidx_test_espresso_espresso_core", + "androidx.test.espresso:espresso-intents:$androidx_test_espresso_espresso_intents", + "androidx.test.ext:junit:$androidx_test_ext_junit", + "androidx.test.ext:truth:$androidx_test_ext_truth", + "com.github.bumptech.glide:mocks:$com_github_bumptech_glide_mocks", + "com.google.truth:truth:$com_google_truth_truth", + "androidx.work:work-testing:$androidx_work_work_testing", + "com.google.truth.extensions:truth-liteproto-extension:$com_google_truth_extensions_truth_liteproto_extension", + "org.jetbrains.kotlinx:kotlinx-coroutines-test:$org_jetbrains_kotlinx_kotlinx_coroutines_test", + "org.mockito:mockito-android:$org_mockito_mockito_android", + "org.robolectric:annotations:$org_robolectric_annotations", ) // Adding the testing module directly causes duplicates of the below groups so we need to // exclude them before adding the testing module to the androidTestImplementation dependencies @@ -257,16 +257,16 @@ dependencies { exclude group: "org.robolectric" } androidTestUtil( - 'androidx.test:orchestrator:1.2.0', + "androidx.test:orchestrator:$androidx_test_orchestrator", ) kapt( - 'com.google.dagger:dagger-compiler:2.41' + "com.google.dagger:dagger-compiler:$com_google_dagger_dagger_compiler" ) kaptTest( - 'com.google.dagger:dagger-compiler:2.41' + "com.google.dagger:dagger-compiler:$com_google_dagger_dagger_compiler" ) kaptAndroidTest( - 'com.google.dagger:dagger-compiler:2.41' + "com.google.dagger:dagger-compiler:$com_google_dagger_dagger_compiler" ) // TODO(#59): Remove this once Bazel is introduced api project(':data') diff --git a/build.gradle b/build.gradle index 11bc8b058d6..35dff374e79 100644 --- a/build.gradle +++ b/build.gradle @@ -1,9 +1,99 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.6.10' - ext.fragment_version = '1.2.0-rc01' - ext.compose_version = '1.1.1' + // Top-level versions. + ext.min_sdk_version = 21 + ext.target_sdk_version = 33 + ext.build_tools_version = "30.0.2" + ext.kotlin_version = "1.6.10" + ext.compose_version = "1.1.1" + + // Dependency versions. + ext.androidx_annotation_annotation = "1.1.0" + ext.androidx_appcompat_appcompat = "1.1.0" + ext.androidx_compose_foundation_foundation_layout = compose_version + ext.androidx_compose_foundation_foundation = compose_version + ext.androidx_compose_material_material = compose_version + ext.androidx_compose_runtime_runtime_livedata = compose_version + ext.androidx_compose_runtime_runtime = compose_version + ext.androidx_compose_ui_ui_test_junit4 = compose_version + ext.androidx_compose_ui_ui_tooling = compose_version + ext.androidx_compose_ui_ui = compose_version + ext.androidx_constraintlayout_constraintlayout = "1.1.3" + ext.androidx_core_core_ktx = "1.0.2" + ext.androidx_exifinterface_exifinterface = "1.0.0-rc01" + ext.androidx_fragment_fragment = "1.2.0_rc01" + ext.androidx_legacy_legacy_support_v4 = "1.0.0" + ext.androidx_lifecycle_lifecycle_extensions = "2.0.0" + ext.androidx_lifecycle_lifecycle_livedata_ktx = "2.2.0-alpha03" + ext.androidx_lifecycle_lifecycle_runtime_ktx = "2.2.0-alpha03" + ext.androidx_multidex_multidex = "2.0.1" + ext.androidx_navigation_navigation_fragment_ktx = "2.0.0" + ext.androidx_navigation_navigation_fragment = "2.0.0" + ext.androidx_navigation_navigation_ui_ktx = "2.0.0" + ext.androidx_navigation_navigation_ui = "2.0.0" + ext.androidx_recyclerview_recyclerview = "1.0.0" + ext.androidx_test_espresso_espresso_accessibility = "3.1.0" + ext.androidx_test_espresso_espresso_contrib = "3.1.0" + ext.androidx_test_espresso_espresso_core = "3.2.0" + ext.androidx_test_espresso_espresso_intents = "3.1.0" + ext.androidx_test_ext_junit = "1.1.1" + ext.androidx_test_ext_truth = "1.4.0" + ext.androidx_test_core = "1.2.0" + ext.androidx_test_orchestrator = "1.2.0" + ext.androidx_test_runner = "1.2.0" + ext.androidx_work_work_runtime_ktx = "2.4.0" + ext.androidx_work_work_testing = "2.4.0" + ext.com_github_bumptech_glide_compiler = "4.11.0" + ext.com_github_bumptech_glide_glide = "4.11.0" + ext.com_github_bumptech_glide_mocks = "4.11.0" + ext.com_github_oppia_android_spotlight = "cc23499d37dc8533a2876e45b5063e981a4583f4" + ext.com_github_oppia_androidsvg = "5bc9c7553e94c3476e8ea32baea3c77567228fcd" + ext.com_github_oppia_kotlitex = "ccdf4170817fa3b48b8e1e452772dd58ecb71cf2" + ext.com_google_android_flexbox_flexbox = "3.0.0" + ext.com_google_android_material_compose_theme_adapter = compose_version + ext.com_google_android_material_material = "1.3.0" + ext.com_google_auto_service_auto_service = "1.0-rc4" + ext.com_google_dagger_dagger_compiler = "2.41" + ext.com_google_dagger_dagger = "2.41" + ext.com_google_firebase_firebase_analytics_ktx = "17.5.0" + ext.com_google_firebase_firebase_analytics = "17.5.0" + ext.com_google_firebase_firebase_appcheck_debug = "16.0.0" + ext.com_google_firebase_firebase_appcheck_playintegrity = "16.0.0" + ext.com_google_firebase_firebase_appcheck = "16.0.0" + ext.com_google_firebase_firebase_auth_ktx = "19.3.1" + ext.com_google_firebase_firebase_core = "17.5.0" + ext.com_google_firebase_firebase_crashlytics = "17.0.0" + ext.com_google_firebase_firebase_firestore_ktx = "24.2.1" + ext.com_google_guava_guava = "28.1_android" + ext.com_google_protobuf_protobuf_javalite = "3.17.3" + ext.com_google_truth_extensions_truth_liteproto_extension = "1.1.3" + ext.com_google_truth_truth = "1.1.3" + ext.com_squareup_moshi_moshi_kotlin_codegen = "1.13.0" + ext.com_squareup_moshi_moshi_kotlin = "1.13.0" + ext.com_squareup_okhttp3_mockwebserver = "4.7.2" + ext.com_squareup_okhttp3_okhttp = "4.7.2" + ext.com_squareup_retrofit2_converter_moshi = "2.7.2" + ext.com_squareup_retrofit2_retrofit_mock = "2.7.2" + ext.com_squareup_retrofit2_retrofit = "2.7.2" + ext.jakarta_xml_bind_jakarta_xml_bind_api = "2.3.2" + ext.javax_annotation_javax_annotation_api = "1.3.2" + ext.junit_junit = "4.12" + ext.nl_dionsegijn_konfetti = "1.2.5" + ext.org_glassfish_jaxb_jaxb_runtime = "2.3.2" + ext.org_jetbrains_kotlin_kotlin_reflect = kotlin_version + ext.org_jetbrains_kotlin_kotlin_stdlib_jdk7 = kotlin_version + ext.org_jetbrains_kotlin_kotlin_stdlib = kotlin_version + ext.org_jetbrains_kotlin_kotlin_test_junit = kotlin_version + ext.org_jetbrains_kotlinx_kotlinx_coroutines_android = "1.6.4" + ext.org_jetbrains_kotlinx_kotlinx_coroutines_core = "1.6.4" + ext.org_jetbrains_kotlinx_kotlinx_coroutines_guava = "1.6.4" + ext.org_jetbrains_kotlinx_kotlinx_coroutines_test = "1.6.4" + ext.org_mockito_mockito_android = "2.7.22" + ext.org_mockito_mockito_core = "3.9.0" + ext.org_robolectric_annotations = "4.5" + ext.org_robolectric_robolectric = "4.5" + repositories { google() gradlePluginPortal() diff --git a/data/build.gradle b/data/build.gradle index daadba86bb8..76cae82748d 100644 --- a/data/build.gradle +++ b/data/build.gradle @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' android { - compileSdkVersion 33 - buildToolsVersion "30.0.2" + compileSdkVersion target_sdk_version + buildToolsVersion build_tools_version defaultConfig { - minSdkVersion 21 - targetSdkVersion 33 + minSdkVersion min_sdk_version + targetSdkVersion target_sdk_version versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -62,48 +62,50 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation( - 'androidx.appcompat:appcompat:1.0.2', - 'com.google.dagger:dagger:2.41', - 'com.google.guava:guava:28.1-android', - 'com.google.protobuf:protobuf-javalite:3.17.3', - 'com.squareup.moshi:moshi-kotlin:1.13.0', - 'com.squareup.okhttp3:okhttp:4.7.2', - 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4', + "androidx.appcompat:appcompat:$androidx_appcompat_appcompat", + "com.google.dagger:dagger:$com_google_dagger_dagger", + "com.google.guava:guava:$com_google_guava_guava", + "com.google.protobuf:protobuf-javalite:$com_google_protobuf_protobuf_javalite", + "com.squareup.moshi:moshi-kotlin:$com_squareup_moshi_moshi_kotlin", + "com.squareup.okhttp3:okhttp:$com_squareup_okhttp3_okhttp", + "org.jetbrains.kotlinx:kotlinx-coroutines-android:$org_jetbrains_kotlinx_kotlinx_coroutines_android", ) compileOnly( - 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.2', - 'javax.annotation:javax.annotation-api:1.3.2', - 'org.glassfish.jaxb:jaxb-runtime:2.3.2', + "jakarta.xml.bind:jakarta.xml.bind-api:$jakarta_xml_bind_jakarta_xml_bind_api", + "javax.annotation:javax.annotation-api:$javax_annotation_javax_annotation_api", + "org.glassfish.jaxb:jaxb-runtime:$org_glassfish_jaxb_jaxb_runtime", ) testImplementation( - 'androidx.test.ext:junit:1.1.1', - 'androidx.test.ext:truth:1.4.0', - 'com.google.dagger:dagger:2.41', - 'com.google.truth:truth:1.1.3', - 'com.google.truth.extensions:truth-liteproto-extension:1.1.3', - 'com.squareup.okhttp3:mockwebserver:4.7.2', - 'com.squareup.okhttp3:okhttp:4.7.2', - 'junit:junit:4.12', - 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4', - 'org.mockito:mockito-core:2.19.0', - 'org.robolectric:robolectric:4.5', + "androidx.test.ext:junit:$androidx_test_ext_junit", + "androidx.test.ext:truth:$androidx_test_ext_truth", + "com.google.dagger:dagger:$com_google_dagger_dagger", + "com.google.truth:truth:$com_google_truth_truth", + "com.google.truth.extensions:truth-liteproto-extension:$com_google_truth_extensions_truth_liteproto_extension", + "com.squareup.okhttp3:mockwebserver:$com_squareup_okhttp3_mockwebserver", + "com.squareup.okhttp3:okhttp:$com_squareup_okhttp3_okhttp", + "junit:junit:$junit_junit", + "org.jetbrains.kotlinx:kotlinx-coroutines-test:$org_jetbrains_kotlinx_kotlinx_coroutines_test", + "org.mockito:mockito-core:$org_mockito_mockito_core", + "org.robolectric:robolectric:$org_robolectric_robolectric", project(":testing"), ) // TODO(#59): Remove this once Bazel is introduced // TODO(#97): Isolate retrofit-mock dependency from production api( - 'com.squareup.retrofit2:converter-moshi:2.7.2', - 'com.squareup.retrofit2:retrofit:2.7.2', - 'com.squareup.retrofit2:retrofit-mock:2.7.2', + "com.squareup.retrofit2:converter-moshi:$com_squareup_retrofit2_converter_moshi", + "com.squareup.retrofit2:retrofit:$com_squareup_retrofit2_retrofit", + "com.squareup.retrofit2:retrofit-mock:$com_squareup_retrofit2_retrofit_mock", + ) + androidTestImplementation( + "androidx.test:runner:$androidx_test_runner", + "androidx.test.espresso:espresso-core:$androidx_test_espresso_espresso_core" ) - androidTestImplementation('androidx.test:runner:1.2.0', - 'androidx.test.espresso:espresso-core:3.2.0') kapt( - 'com.google.dagger:dagger-compiler:2.41', - 'com.squareup.moshi:moshi-kotlin-codegen:1.13.0' + "com.google.dagger:dagger-compiler:$com_google_dagger_dagger_compiler", + "com.squareup.moshi:moshi-kotlin-codegen:$com_squareup_moshi_moshi_kotlin_codegen" ) kaptTest( - 'com.google.dagger:dagger-compiler:2.41' + "com.google.dagger:dagger-compiler:$com_google_dagger_dagger_compiler" ) implementation project(":utility") diff --git a/domain/build.gradle b/domain/build.gradle index 5634edfa80f..654fb7ed959 100644 --- a/domain/build.gradle +++ b/domain/build.gradle @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' android { - compileSdkVersion 33 - buildToolsVersion "30.0.2" + compileSdkVersion target_sdk_version + buildToolsVersion build_tools_version defaultConfig { - minSdkVersion 21 - targetSdkVersion 33 + minSdkVersion min_sdk_version + targetSdkVersion target_sdk_version versionCode 1 versionName "1.0" javaCompileOptions { @@ -84,48 +84,48 @@ android.sourceSets.test.kotlin.exclude(filesToExclude) dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation( - 'androidx.appcompat:appcompat:1.0.2', - 'androidx.exifinterface:exifinterface:1.0.0-rc01', - 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0-alpha03', - 'androidx.lifecycle:lifecycle-extensions:2.0.0', - 'androidx.work:work-runtime-ktx:2.4.0', - 'com.google.dagger:dagger:2.41', - 'com.google.firebase:firebase-analytics-ktx:17.5.0', - 'com.google.firebase:firebase-crashlytics:17.0.0', - 'com.google.firebase:firebase-firestore-ktx:24.2.1', - 'com.google.firebase:firebase-auth-ktx:19.3.1', - 'com.google.guava:guava:28.1-android', - 'com.google.protobuf:protobuf-javalite:3.17.3', - "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version", - 'org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.6.4' + "androidx.appcompat:appcompat:$androidx_appcompat_appcompat", + "androidx.exifinterface:exifinterface:$androidx_exifinterface_exifinterface", + "androidx.lifecycle:lifecycle-livedata-ktx:$androidx_lifecycle_lifecycle_livedata_ktx", + "androidx.lifecycle:lifecycle-extensions:$androidx_lifecycle_lifecycle_extensions", + "androidx.work:work-runtime-ktx:$androidx_work_work_runtime_ktx", + "com.google.dagger:dagger:$com_google_dagger_dagger", + "com.google.firebase:firebase-analytics-ktx:$com_google_firebase_firebase_analytics_ktx", + "com.google.firebase:firebase-crashlytics:$com_google_firebase_firebase_crashlytics", + "com.google.firebase:firebase-firestore-ktx:$com_google_firebase_firebase_firestore_ktx", + "com.google.firebase:firebase-auth-ktx:$com_google_firebase_firebase_auth_ktx", + "com.google.guava:guava:$com_google_guava_guava", + "com.google.protobuf:protobuf-javalite:$com_google_protobuf_protobuf_javalite", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$org_jetbrains_kotlin_kotlin_stdlib_jdk7", + "org.jetbrains.kotlinx:kotlinx-coroutines-guava:$org_jetbrains_kotlinx_kotlinx_coroutines_guava" ) compileOnly( - 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.2', - 'javax.annotation:javax.annotation-api:1.3.2', - 'org.glassfish.jaxb:jaxb-runtime:2.3.2', + "jakarta.xml.bind:jakarta.xml.bind-api:$jakarta_xml_bind_jakarta_xml_bind_api", + "javax.annotation:javax.annotation-api:$javax_annotation_javax_annotation_api", + "org.glassfish.jaxb:jaxb-runtime:$org_glassfish_jaxb_jaxb_runtime", ) testImplementation( - 'androidx.test.espresso:espresso-core:3.2.0', - 'androidx.test.ext:junit:1.1.1', - 'androidx.test.ext:truth:1.4.0', - 'androidx.work:work-testing:2.4.0', - 'com.google.dagger:dagger:2.41', - 'com.google.truth.extensions:truth-liteproto-extension:1.1.3', - 'com.google.truth:truth:1.1.3', - 'com.squareup.okhttp3:mockwebserver:4.7.2', - 'junit:junit:4.12', - "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version", - 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2', - 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4', - 'org.mockito:mockito-core:3.9.0', - 'org.robolectric:robolectric:4.5', + "androidx.test.espresso:espresso-core:$androidx_test_espresso_espresso_core", + "androidx.test.ext:junit:$androidx_test_ext_junit", + "androidx.test.ext:truth:$androidx_test_ext_truth", + "androidx.work:work-testing:$androidx_work_work_testing", + "com.google.dagger:dagger:$com_google_dagger_dagger", + "com.google.truth.extensions:truth-liteproto-extension:$com_google_truth_extensions_truth_liteproto_extension", + "com.google.truth:truth:$com_google_truth_truth", + "com.squareup.okhttp3:mockwebserver:$com_squareup_okhttp3_mockwebserver", + "junit:junit:$junit_junit", + "org.jetbrains.kotlin:kotlin-test-junit:$org_jetbrains_kotlin_kotlin_test_junit", + "org.jetbrains.kotlinx:kotlinx-coroutines-android:$org_jetbrains_kotlinx_kotlinx_coroutines_android", + "org.jetbrains.kotlinx:kotlinx-coroutines-test:$org_jetbrains_kotlinx_kotlinx_coroutines_test", + "org.mockito:mockito-core:$org_mockito_mockito_core", + "org.robolectric:robolectric:$org_robolectric_robolectric", project(":testing"), ) kapt( - 'com.google.dagger:dagger-compiler:2.41', + "com.google.dagger:dagger-compiler:$com_google_dagger_dagger_compiler", ) kaptTest( - 'com.google.dagger:dagger-compiler:2.41', + "com.google.dagger:dagger-compiler:$com_google_dagger_dagger_compiler", ) // TODO(#59): Avoid needing to expose data implementations to other modules in order to make Oppia symbols // sufficiently visible for generated Dagger code. This can be done more cleanly via Bazel since dependencies can be diff --git a/testing/build.gradle b/testing/build.gradle index 94f2e559dff..babb1c8ef7c 100644 --- a/testing/build.gradle +++ b/testing/build.gradle @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' android { - compileSdkVersion 33 - buildToolsVersion "30.0.2" + compileSdkVersion target_sdk_version + buildToolsVersion build_tools_version defaultConfig { - minSdkVersion 21 - targetSdkVersion 33 + minSdkVersion min_sdk_version + targetSdkVersion target_sdk_version versionCode 1 versionName "1.0" } @@ -64,55 +64,55 @@ android.sourceSets.test.kotlin.exclude(filesToExclude) dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation( - 'androidx.annotation:annotation:1.1.0', - 'androidx.appcompat:appcompat:1.1.0', - 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0-alpha03', - 'androidx.core:core-ktx:1.0.2', - "androidx.test:core:1.0.0", - 'androidx.test.espresso:espresso-accessibility:3.1.0', - 'androidx.test.espresso:espresso-core:3.2.0', - 'androidx.test.ext:truth:1.4.0', - 'androidx.test:runner:1.2.0', - 'com.google.android.material:material:1.3.0', - 'com.google.dagger:dagger:2.41', - 'com.google.firebase:firebase-auth-ktx:19.3.1', - 'com.google.protobuf:protobuf-javalite:3.17.3', - 'com.google.truth:truth:1.1.3', - 'com.google.truth.extensions:truth-liteproto-extension:1.1.3', - 'nl.dionsegijn:konfetti:1.2.5', - 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4', - 'org.robolectric:robolectric:4.5', - 'org.jetbrains.kotlin:kotlin-reflect:$kotlin_version', - 'org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version', - 'org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.6.4', - 'org.mockito:mockito-core:2.19.0', + "androidx.annotation:annotation:$androidx_annotation_annotation", + "androidx.appcompat:appcompat:$androidx_appcompat_appcompat", + "androidx.lifecycle:lifecycle-livedata-ktx:$androidx_lifecycle_lifecycle_livedata_ktx", + "androidx.core:core-ktx:$androidx_core_core_ktx", + "androidx.test:core:$androidx_test_core", + "androidx.test.espresso:espresso-accessibility:$androidx_test_espresso_espresso_accessibility", + "androidx.test.espresso:espresso-core:$androidx_test_espresso_espresso_core", + "androidx.test.ext:truth:$androidx_test_ext_truth", + "androidx.test:runner:$androidx_test_runner", + "com.google.android.material:material:$com_google_android_material_material", + "com.google.dagger:dagger:$com_google_dagger_dagger", + "com.google.firebase:firebase-auth-ktx:$com_google_firebase_firebase_auth_ktx", + "com.google.protobuf:protobuf-javalite:$com_google_protobuf_protobuf_javalite", + "com.google.truth:truth:$com_google_truth_truth", + "com.google.truth.extensions:truth-liteproto-extension:$com_google_truth_extensions_truth_liteproto_extension", + "nl.dionsegijn:konfetti:$nl_dionsegijn_konfetti", + "org.jetbrains.kotlinx:kotlinx-coroutines-test:$org_jetbrains_kotlinx_kotlinx_coroutines_test", + "org.robolectric:robolectric:$org_robolectric_robolectric", + "org.jetbrains.kotlin:kotlin-reflect:$org_jetbrains_kotlin_kotlin_reflect", + "org.jetbrains.kotlin:kotlin-stdlib:$org_jetbrains_kotlin_kotlin_stdlib", + "org.jetbrains.kotlinx:kotlinx-coroutines-guava:$org_jetbrains_kotlinx_kotlinx_coroutines_guava", + "org.mockito:mockito-core:$org_mockito_mockito_core", project(":domain"), project(":model"), project(":utility"), ) compileOnly( - 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.2', - 'javax.annotation:javax.annotation-api:1.3.2', - 'org.glassfish.jaxb:jaxb-runtime:2.3.2', + "jakarta.xml.bind:jakarta.xml.bind-api:$jakarta_xml_bind_jakarta_xml_bind_api", + "javax.annotation:javax.annotation-api:$javax_annotation_javax_annotation_api", + "org.glassfish.jaxb:jaxb-runtime:$org_glassfish_jaxb_jaxb_runtime", ) testImplementation( - 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0-alpha03', - 'androidx.test.ext:junit:1.1.1', - 'com.google.android.material:material:1.3.0', - 'com.google.truth:truth:1.1.3', - 'junit:junit:4.12', - "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version", - 'org.mockito:mockito-core:2.19.0', + "androidx.lifecycle:lifecycle-livedata-ktx:$androidx_lifecycle_lifecycle_livedata_ktx", + "androidx.test.ext:junit:$androidx_test_ext_junit", + "com.google.android.material:material:$com_google_android_material_material", + "com.google.truth:truth:$com_google_truth_truth", + "junit:junit:$junit_junit", + "org.jetbrains.kotlin:kotlin-reflect:$org_jetbrains_kotlin_kotlin_reflect", + "org.mockito:mockito-core:$org_mockito_mockito_core", project(":domain"), ) kapt( - 'com.google.dagger:dagger-compiler:2.41', + "com.google.dagger:dagger-compiler:$com_google_dagger_dagger_compiler", ) kaptTest( - 'com.google.dagger:dagger-compiler:2.41', + "com.google.dagger:dagger-compiler:$com_google_dagger_dagger_compiler", ) annotationProcessor( - 'com.google.auto.service:auto-service:1.0-rc4', + "com.google.auto.service:auto-service:$com_google_auto_service_auto_service", ) // TODO(#59): Remove this once Bazel is introduced // sufficiently visible for generated Dagger code. This can be done more cleanly via Bazel since dependencies can be diff --git a/utility/build.gradle b/utility/build.gradle index 53e7905913f..73bc7b2f96d 100644 --- a/utility/build.gradle +++ b/utility/build.gradle @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' android { - compileSdkVersion 33 - buildToolsVersion "30.0.2" + compileSdkVersion target_sdk_version + buildToolsVersion build_tools_version defaultConfig { - minSdkVersion 21 - targetSdkVersion 33 + minSdkVersion min_sdk_version + targetSdkVersion target_sdk_version versionCode 1 versionName "1.0" javaCompileOptions { @@ -78,47 +78,47 @@ android.sourceSets.test.kotlin.exclude(filesToExclude) dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation( - 'androidx.appcompat:appcompat:1.0.2', - 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0-alpha03', - 'androidx.work:work-runtime-ktx:2.4.0', - 'com.github.oppia:androidsvg:5bc9c7553e94c3476e8ea32baea3c77567228fcd', - 'com.github.oppia:kotlitex:ccdf4170817fa3b48b8e1e452772dd58ecb71cf2', - 'com.github.bumptech.glide:glide:4.11.0', - 'com.google.dagger:dagger:2.41', - 'com.google.firebase:firebase-analytics-ktx:17.5.0', - 'com.google.firebase:firebase-core:17.5.0', - 'com.google.firebase:firebase-crashlytics:17.0.0', - 'com.google.firebase:firebase-firestore-ktx:24.2.1', - 'com.google.firebase:firebase-auth-ktx:19.3.1', - 'com.google.protobuf:protobuf-javalite:3.17.3', - "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version", - 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4', + "androidx.appcompat:appcompat:$androidx_appcompat_appcompat", + "androidx.lifecycle:lifecycle-livedata-ktx:$androidx_lifecycle_lifecycle_livedata_ktx", + "androidx.work:work-runtime-ktx:$androidx_work_work_runtime_ktx", + "com.github.oppia:androidsvg:$com_github_oppia_androidsvg", + "com.github.oppia:kotlitex:$com_github_oppia_kotlitex", + "com.github.bumptech.glide:glide:$com_github_bumptech_glide_glide", + "com.google.dagger:dagger:$com_google_dagger_dagger", + "com.google.firebase:firebase-analytics-ktx:$com_google_firebase_firebase_analytics_ktx", + "com.google.firebase:firebase-core:$com_google_firebase_firebase_core", + "com.google.firebase:firebase-crashlytics:$com_google_firebase_firebase_crashlytics", + "com.google.firebase:firebase-firestore-ktx:$com_google_firebase_firebase_firestore_ktx", + "com.google.firebase:firebase-auth-ktx:$com_google_firebase_firebase_auth_ktx", + "com.google.protobuf:protobuf-javalite:$com_google_protobuf_protobuf_javalite", + "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$org_jetbrains_kotlin_kotlin_stdlib_jdk7", + "org.jetbrains.kotlinx:kotlinx-coroutines-core:$org_jetbrains_kotlinx_kotlinx_coroutines_core", ) compileOnly( - 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.2', - 'javax.annotation:javax.annotation-api:1.3.2', - 'org.glassfish.jaxb:jaxb-runtime:2.3.2', + "jakarta.xml.bind:jakarta.xml.bind-api:$jakarta_xml_bind_jakarta_xml_bind_api", + "javax.annotation:javax.annotation-api:$javax_annotation_javax_annotation_api", + "org.glassfish.jaxb:jaxb-runtime:$org_glassfish_jaxb_jaxb_runtime", ) testImplementation( - 'androidx.test.ext:junit:1.1.1', - 'androidx.test.ext:truth:1.4.0', - 'com.google.dagger:dagger:2.41', - 'com.google.truth:truth:1.1.3', - 'com.google.truth.extensions:truth-liteproto-extension:1.1.3', - 'junit:junit:4.12', - "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version", - 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4', - 'org.mockito:mockito-core:2.19.0', - 'org.robolectric:robolectric:4.5', + "androidx.test.ext:junit:$androidx_test_ext_junit", + "androidx.test.ext:truth:$androidx_test_ext_truth", + "com.google.dagger:dagger:$com_google_dagger_dagger", + "com.google.truth:truth:$com_google_truth_truth", + "com.google.truth.extensions:truth-liteproto-extension:$com_google_truth_extensions_truth_liteproto_extension", + "junit:junit:$junit_junit", + "org.jetbrains.kotlin:kotlin-test-junit:$org_jetbrains_kotlin_kotlin_test_junit", + "org.jetbrains.kotlinx:kotlinx-coroutines-test:$org_jetbrains_kotlinx_kotlinx_coroutines_test", + "org.mockito:mockito-core:$org_mockito_mockito_core", + "org.robolectric:robolectric:$org_robolectric_robolectric", project(":data"), project(":testing"), ) kapt( - 'com.github.bumptech.glide:compiler:4.11.0', - 'com.google.dagger:dagger-compiler:2.41' + "com.github.bumptech.glide:compiler:$com_github_bumptech_glide_compiler", + "com.google.dagger:dagger-compiler:$com_google_dagger_dagger_compiler" ) kaptTest( - 'com.google.dagger:dagger-compiler:2.41' + "com.google.dagger:dagger-compiler:$com_google_dagger_dagger_compiler" ) // TODO(#59): Remove this once Bazel is introduced // sufficiently visible for generated Dagger code. This can be done more cleanly via Bazel since dependencies can be From 143f096da1982144e43170172631413b1f0f5e18 Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Tue, 23 Jul 2024 22:05:33 +0000 Subject: [PATCH 2/5] Consolidate Bazel Maven deps. This updates versions.bzl to match the actual versions of deps being used in the build (by removing the need for conflict resolutions in maven_install.json). --- third_party/maven_install.json | 22 +-------------------- third_party/versions.bzl | 36 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 39 deletions(-) diff --git a/third_party/maven_install.json b/third_party/maven_install.json index e05d3b9c565..690d33faf06 100644 --- a/third_party/maven_install.json +++ b/third_party/maven_install.json @@ -1,27 +1,7 @@ { "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", - "__INPUT_ARTIFACTS_HASH": 1471454102, + "__INPUT_ARTIFACTS_HASH": -2142319524, "__RESOLVED_ARTIFACTS_HASH": 1994124852, - "conflict_resolution": { - "androidx.annotation:annotation:1.1.0": "androidx.annotation:annotation:1.2.0", - "androidx.constraintlayout:constraintlayout:1.1.3": "androidx.constraintlayout:constraintlayout:2.0.1", - "androidx.core:core-ktx:1.0.1": "androidx.core:core-ktx:1.1.0", - "androidx.core:core:1.0.1": "androidx.core:core:1.7.0", - "androidx.lifecycle:lifecycle-livedata-core:2.2.0": "androidx.lifecycle:lifecycle-livedata-core:2.3.1", - "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0": "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1", - "androidx.recyclerview:recyclerview:1.0.0": "androidx.recyclerview:recyclerview:1.1.0", - "androidx.test.espresso:espresso-core:3.2.0": "androidx.test.espresso:espresso-core:3.3.0", - "androidx.test.ext:junit:1.1.1": "androidx.test.ext:junit:1.1.2", - "androidx.test:core:1.0.0": "androidx.test:core:1.4.0", - "androidx.test:runner:1.2.0": "androidx.test:runner:1.3.0", - "com.google.firebase:firebase-common:19.3.0": "com.google.firebase:firebase-common:20.1.1", - "com.google.protobuf:protobuf-javalite:3.17.3": "com.google.protobuf:protobuf-javalite:3.19.2", - "com.google.truth:truth:0.43": "com.google.truth:truth:1.1.3", - "junit:junit:4.12": "junit:junit:4.13.2", - "org.jetbrains.kotlin:kotlin-reflect:1.3.41": "org.jetbrains.kotlin:kotlin-reflect:1.6.0", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10": "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21", - "org.mockito:mockito-core:2.19.0": "org.mockito:mockito-core:3.9.0" - }, "artifacts": { "androidx.activity:activity-compose:aar": { "shasums": { diff --git a/third_party/versions.bzl b/third_party/versions.bzl index 2bcb6612f34..3b127e3fcaf 100644 --- a/third_party/versions.bzl +++ b/third_party/versions.bzl @@ -21,7 +21,7 @@ https://github.com/oppia/oppia-android/wiki/Updating-Maven-Dependencies # This list should contain only production (non-test) dependencies. MAVEN_PRODUCTION_DEPENDENCY_VERSIONS = { "androidx.activity:activity-compose": "1.4.0", - "androidx.annotation:annotation": "1.1.0", + "androidx.annotation:annotation": "1.2.0", "androidx.appcompat:appcompat": "1.3.1", "androidx.compose.compiler:compiler": "1.1.1", "androidx.compose.foundation:foundation": "1.1.1", @@ -29,25 +29,25 @@ MAVEN_PRODUCTION_DEPENDENCY_VERSIONS = { "androidx.compose.material:material": "1.1.1", "androidx.compose.runtime:runtime": "1.1.1", "androidx.compose.ui:ui": "1.1.1", - "androidx.constraintlayout:constraintlayout": "1.1.3", - "androidx.core:core": "1.0.1", - "androidx.core:core-ktx": "1.0.1", + "androidx.constraintlayout:constraintlayout": "2.0.1", + "androidx.core:core": "1.7.0", + "androidx.core:core-ktx": "1.1.0", "androidx.databinding:databinding-adapters": "3.4.2", "androidx.databinding:databinding-common": "3.4.2", "androidx.databinding:databinding-compiler": "3.4.2", "androidx.databinding:databinding-runtime": "3.4.2", "androidx.drawerlayout:drawerlayout": "1.1.0", "androidx.lifecycle:lifecycle-extensions": "2.2.0", - "androidx.lifecycle:lifecycle-livedata-core": "2.2.0", + "androidx.lifecycle:lifecycle-livedata-core": "2.3.1", "androidx.lifecycle:lifecycle-livedata-ktx": "2.2.0", - "androidx.lifecycle:lifecycle-viewmodel-ktx": "2.2.0", + "androidx.lifecycle:lifecycle-viewmodel-ktx": "2.3.1", "androidx.multidex:multidex": "2.0.1", "androidx.multidex:multidex-instrumentation": "2.0.0", "androidx.navigation:navigation-fragment": "2.0.0", "androidx.navigation:navigation-fragment-ktx": "2.0.0", "androidx.navigation:navigation-ui": "2.0.0", "androidx.navigation:navigation-ui-ktx": "2.0.0", - "androidx.recyclerview:recyclerview": "1.0.0", + "androidx.recyclerview:recyclerview": "1.1.0", "androidx.room:room-runtime": "2.2.5", "androidx.test.uiautomator:uiautomator": "2.2.0", "androidx.viewpager2:viewpager2": "1.0.0", @@ -67,13 +67,13 @@ MAVEN_PRODUCTION_DEPENDENCY_VERSIONS = { "com.google.firebase:firebase-appcheck-debug": "16.0.0", "com.google.firebase:firebase-appcheck-playintegrity": "16.0.0", "com.google.firebase:firebase-auth-ktx": "19.3.1", - "com.google.firebase:firebase-common": "19.3.0", + "com.google.firebase:firebase-common": "20.1.1", "com.google.firebase:firebase-crashlytics": "17.1.1", "com.google.firebase:firebase-firestore-ktx": "24.2.1", "com.google.gms:google-services": "4.3.3", "com.google.guava:failureaccess": "1.0.1", "com.google.j2objc:j2objc-annotations": "1.3", - "com.google.protobuf:protobuf-javalite": "3.17.3", + "com.google.protobuf:protobuf-javalite": "3.19.2", "com.squareup.moshi:moshi-kotlin": "1.13.0", "com.squareup.moshi:moshi-kotlin-codegen": "1.13.0", "com.squareup.okhttp3:okhttp": "4.7.2", @@ -85,7 +85,7 @@ MAVEN_PRODUCTION_DEPENDENCY_VERSIONS = { "nl.dionsegijn:konfetti": "1.2.5", "org.checkerframework:checker-compat-qual": "2.5.5", "org.checkerframework:checker-qual": "3.21.3", - "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar": "1.6.10", + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar": "1.6.21", "org.jetbrains.kotlinx:kotlinx-coroutines-android": "1.6.4", "org.jetbrains.kotlinx:kotlinx-coroutines-core": "1.6.4", "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm": "1.6.4", @@ -101,31 +101,31 @@ MAVEN_TEST_DEPENDENCY_VERSIONS = { "androidx.compose.ui:ui-test-junit4": "1.1.1", "androidx.test.espresso:espresso-accessibility": "3.1.0", "androidx.test.espresso:espresso-contrib": "3.1.0", - "androidx.test.espresso:espresso-core": "3.2.0", + "androidx.test.espresso:espresso-core": "3.3.0", "androidx.test.espresso:espresso-intents": "3.1.0", - "androidx.test.ext:junit": "1.1.1", + "androidx.test.ext:junit": "1.1.2", "androidx.test.ext:truth": "1.4.0", - "androidx.test:core": "1.0.0", - "androidx.test:runner": "1.2.0", + "androidx.test:core": "1.4.0", + "androidx.test:runner": "1.3.0", "androidx.work:work-testing": "2.4.0", "com.android.tools.apkparser:apkanalyzer": "30.0.4", "com.github.bumptech.glide:mocks": "4.11.0", "com.google.protobuf:protobuf-java": "3.17.3", "com.google.protobuf:protobuf-java-util": "3.17.3", "com.google.truth.extensions:truth-liteproto-extension": "1.1.3", - "com.google.truth:truth": "0.43", + "com.google.truth:truth": "1.1.3", "com.squareup.okhttp3:mockwebserver": "4.7.2", "com.squareup.retrofit2:retrofit-mock": "2.5.0", "io.xlate:yaml-json": "0.1.0", "jakarta.json:jakarta.json-api": "2.1.2", - "junit:junit": "4.12", + "junit:junit": "4.13.2", "org.eclipse.parsson:parsson": "1.1.2", "org.jetbrains.kotlin:kotlin-compiler-embeddable": "1.5.0", - "org.jetbrains.kotlin:kotlin-reflect": "1.3.41", + "org.jetbrains.kotlin:kotlin-reflect": "1.6.0", "org.jetbrains.kotlin:kotlin-test-junit": "1.3.72", "org.jetbrains.kotlinx:kotlinx-coroutines-test": "1.6.4", "org.mockito.kotlin:mockito-kotlin": "3.2.0", - "org.mockito:mockito-core": "2.19.0", + "org.mockito:mockito-core": "3.9.0", "org.robolectric:annotations": "4.5", "org.robolectric:robolectric": "4.5", "org.snakeyaml:snakeyaml-engine": "2.6", From 3b0c2828386aa815447a35aa135881ce698ec041 Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Tue, 23 Jul 2024 23:14:40 +0000 Subject: [PATCH 3/5] Align Gradle & Bazel dep versions. This removes unnecessary deps from Gradle builds, and updates Gradle dep versions to match those used in Bazel (per versions.bzl and maven_install.json). --- app/build.gradle | 5 +---- build.gradle | 53 +++++++++++++++++++++----------------------- domain/build.gradle | 2 +- utility/build.gradle | 3 +-- 4 files changed, 28 insertions(+), 35 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9d7f0c69c1c..0c9588e0e4c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -165,7 +165,6 @@ dependencies { "androidx.compose.ui:ui-tooling:$androidx_compose_ui_ui_tooling", "androidx.constraintlayout:constraintlayout:$androidx_constraintlayout_constraintlayout", "androidx.core:core-ktx:$androidx_core_core_ktx", - "androidx.legacy:legacy-support-v4:$androidx_legacy_legacy_support_v4", "androidx.lifecycle:lifecycle-extensions:$androidx_lifecycle_lifecycle_extensions", "androidx.lifecycle:lifecycle-runtime-ktx:$androidx_lifecycle_lifecycle_runtime_ktx", "androidx.navigation:navigation-fragment:$androidx_navigation_navigation_fragment", @@ -187,14 +186,13 @@ dependencies { "com.google.firebase:firebase-appcheck:$com_google_firebase_firebase_appcheck", "com.google.firebase:firebase-appcheck-debug:$com_google_firebase_firebase_appcheck_debug", "com.google.firebase:firebase-appcheck-playintegrity:$com_google_firebase_firebase_appcheck_playintegrity", - "com.google.firebase:firebase-core:$com_google_firebase_firebase_core", "com.google.firebase:firebase-crashlytics:$com_google_firebase_firebase_crashlytics", "com.google.firebase:firebase-firestore-ktx:$com_google_firebase_firebase_firestore_ktx", "com.google.firebase:firebase-auth-ktx:$com_google_firebase_firebase_auth_ktx", "com.google.guava:guava:$com_google_guava_guava", "com.google.protobuf:protobuf-javalite:$com_google_protobuf_protobuf_javalite", "nl.dionsegijn:konfetti:$nl_dionsegijn_konfetti", - "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$org_jetbrains_kotlin_kotlin_stdlib_jdk7", + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$org_jetbrains_kotlin_kotlin_stdlib_jdk8", "org.jetbrains.kotlinx:kotlinx-coroutines-core:$org_jetbrains_kotlinx_kotlinx_coroutines_core", "org.jetbrains.kotlinx:kotlinx-coroutines-android:$org_jetbrains_kotlinx_kotlinx_coroutines_android", "org.mockito:mockito-core:$org_mockito_mockito_core", @@ -237,7 +235,6 @@ dependencies { "androidx.work:work-testing:$androidx_work_work_testing", "com.google.truth.extensions:truth-liteproto-extension:$com_google_truth_extensions_truth_liteproto_extension", "org.jetbrains.kotlinx:kotlinx-coroutines-test:$org_jetbrains_kotlinx_kotlinx_coroutines_test", - "org.mockito:mockito-android:$org_mockito_mockito_android", "org.robolectric:annotations:$org_robolectric_annotations", ) // Adding the testing module directly causes duplicates of the below groups so we need to diff --git a/build.gradle b/build.gradle index 35dff374e79..c1af9f3e5cb 100644 --- a/build.gradle +++ b/build.gradle @@ -9,8 +9,8 @@ buildscript { ext.compose_version = "1.1.1" // Dependency versions. - ext.androidx_annotation_annotation = "1.1.0" - ext.androidx_appcompat_appcompat = "1.1.0" + ext.androidx_annotation_annotation = "1.2.0" + ext.androidx_appcompat_appcompat = "1.3.1" ext.androidx_compose_foundation_foundation_layout = compose_version ext.androidx_compose_foundation_foundation = compose_version ext.androidx_compose_material_material = compose_version @@ -19,29 +19,28 @@ buildscript { ext.androidx_compose_ui_ui_test_junit4 = compose_version ext.androidx_compose_ui_ui_tooling = compose_version ext.androidx_compose_ui_ui = compose_version - ext.androidx_constraintlayout_constraintlayout = "1.1.3" - ext.androidx_core_core_ktx = "1.0.2" - ext.androidx_exifinterface_exifinterface = "1.0.0-rc01" - ext.androidx_fragment_fragment = "1.2.0_rc01" - ext.androidx_legacy_legacy_support_v4 = "1.0.0" - ext.androidx_lifecycle_lifecycle_extensions = "2.0.0" - ext.androidx_lifecycle_lifecycle_livedata_ktx = "2.2.0-alpha03" - ext.androidx_lifecycle_lifecycle_runtime_ktx = "2.2.0-alpha03" + ext.androidx_constraintlayout_constraintlayout = "2.0.1" + ext.androidx_core_core_ktx = "1.1.0" + ext.androidx_exifinterface_exifinterface = "1.0.0" + ext.androidx_fragment_fragment = "1.3.6" + ext.androidx_lifecycle_lifecycle_extensions = "2.2.0" + ext.androidx_lifecycle_lifecycle_livedata_ktx = "2.2.0" + ext.androidx_lifecycle_lifecycle_runtime_ktx = "2.3.1" ext.androidx_multidex_multidex = "2.0.1" ext.androidx_navigation_navigation_fragment_ktx = "2.0.0" ext.androidx_navigation_navigation_fragment = "2.0.0" ext.androidx_navigation_navigation_ui_ktx = "2.0.0" ext.androidx_navigation_navigation_ui = "2.0.0" - ext.androidx_recyclerview_recyclerview = "1.0.0" + ext.androidx_recyclerview_recyclerview = "1.1.0" ext.androidx_test_espresso_espresso_accessibility = "3.1.0" ext.androidx_test_espresso_espresso_contrib = "3.1.0" - ext.androidx_test_espresso_espresso_core = "3.2.0" + ext.androidx_test_espresso_espresso_core = "3.3.0" ext.androidx_test_espresso_espresso_intents = "3.1.0" - ext.androidx_test_ext_junit = "1.1.1" + ext.androidx_test_ext_junit = "1.1.2" ext.androidx_test_ext_truth = "1.4.0" - ext.androidx_test_core = "1.2.0" + ext.androidx_test_core = "1.4.0" ext.androidx_test_orchestrator = "1.2.0" - ext.androidx_test_runner = "1.2.0" + ext.androidx_test_runner = "1.3.0" ext.androidx_work_work_runtime_ktx = "2.4.0" ext.androidx_work_work_testing = "2.4.0" ext.com_github_bumptech_glide_compiler = "4.11.0" @@ -62,34 +61,32 @@ buildscript { ext.com_google_firebase_firebase_appcheck_playintegrity = "16.0.0" ext.com_google_firebase_firebase_appcheck = "16.0.0" ext.com_google_firebase_firebase_auth_ktx = "19.3.1" - ext.com_google_firebase_firebase_core = "17.5.0" - ext.com_google_firebase_firebase_crashlytics = "17.0.0" + ext.com_google_firebase_firebase_crashlytics = "17.1.1" ext.com_google_firebase_firebase_firestore_ktx = "24.2.1" - ext.com_google_guava_guava = "28.1_android" - ext.com_google_protobuf_protobuf_javalite = "3.17.3" + ext.com_google_guava_guava = "31.0.1-android" + ext.com_google_protobuf_protobuf_javalite = "3.19.2" ext.com_google_truth_extensions_truth_liteproto_extension = "1.1.3" ext.com_google_truth_truth = "1.1.3" ext.com_squareup_moshi_moshi_kotlin_codegen = "1.13.0" ext.com_squareup_moshi_moshi_kotlin = "1.13.0" ext.com_squareup_okhttp3_mockwebserver = "4.7.2" ext.com_squareup_okhttp3_okhttp = "4.7.2" - ext.com_squareup_retrofit2_converter_moshi = "2.7.2" - ext.com_squareup_retrofit2_retrofit_mock = "2.7.2" - ext.com_squareup_retrofit2_retrofit = "2.7.2" + ext.com_squareup_retrofit2_converter_moshi = "2.5.0" + ext.com_squareup_retrofit2_retrofit_mock = "2.5.0" + ext.com_squareup_retrofit2_retrofit = "2.9.0" ext.jakarta_xml_bind_jakarta_xml_bind_api = "2.3.2" ext.javax_annotation_javax_annotation_api = "1.3.2" - ext.junit_junit = "4.12" + ext.junit_junit = "4.13.2" ext.nl_dionsegijn_konfetti = "1.2.5" ext.org_glassfish_jaxb_jaxb_runtime = "2.3.2" - ext.org_jetbrains_kotlin_kotlin_reflect = kotlin_version - ext.org_jetbrains_kotlin_kotlin_stdlib_jdk7 = kotlin_version - ext.org_jetbrains_kotlin_kotlin_stdlib = kotlin_version - ext.org_jetbrains_kotlin_kotlin_test_junit = kotlin_version + ext.org_jetbrains_kotlin_kotlin_reflect = "1.6.0" + ext.org_jetbrains_kotlin_kotlin_stdlib_jdk8 = "1.6.21" + ext.org_jetbrains_kotlin_kotlin_stdlib = "1.6.21" + ext.org_jetbrains_kotlin_kotlin_test_junit = "1.3.72" ext.org_jetbrains_kotlinx_kotlinx_coroutines_android = "1.6.4" ext.org_jetbrains_kotlinx_kotlinx_coroutines_core = "1.6.4" ext.org_jetbrains_kotlinx_kotlinx_coroutines_guava = "1.6.4" ext.org_jetbrains_kotlinx_kotlinx_coroutines_test = "1.6.4" - ext.org_mockito_mockito_android = "2.7.22" ext.org_mockito_mockito_core = "3.9.0" ext.org_robolectric_annotations = "4.5" ext.org_robolectric_robolectric = "4.5" diff --git a/domain/build.gradle b/domain/build.gradle index 654fb7ed959..1b741c1b4c3 100644 --- a/domain/build.gradle +++ b/domain/build.gradle @@ -96,7 +96,7 @@ dependencies { "com.google.firebase:firebase-auth-ktx:$com_google_firebase_firebase_auth_ktx", "com.google.guava:guava:$com_google_guava_guava", "com.google.protobuf:protobuf-javalite:$com_google_protobuf_protobuf_javalite", - "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$org_jetbrains_kotlin_kotlin_stdlib_jdk7", + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$org_jetbrains_kotlin_kotlin_stdlib_jdk8", "org.jetbrains.kotlinx:kotlinx-coroutines-guava:$org_jetbrains_kotlinx_kotlinx_coroutines_guava" ) compileOnly( diff --git a/utility/build.gradle b/utility/build.gradle index 73bc7b2f96d..fd68b92454a 100644 --- a/utility/build.gradle +++ b/utility/build.gradle @@ -86,12 +86,11 @@ dependencies { "com.github.bumptech.glide:glide:$com_github_bumptech_glide_glide", "com.google.dagger:dagger:$com_google_dagger_dagger", "com.google.firebase:firebase-analytics-ktx:$com_google_firebase_firebase_analytics_ktx", - "com.google.firebase:firebase-core:$com_google_firebase_firebase_core", "com.google.firebase:firebase-crashlytics:$com_google_firebase_firebase_crashlytics", "com.google.firebase:firebase-firestore-ktx:$com_google_firebase_firebase_firestore_ktx", "com.google.firebase:firebase-auth-ktx:$com_google_firebase_firebase_auth_ktx", "com.google.protobuf:protobuf-javalite:$com_google_protobuf_protobuf_javalite", - "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$org_jetbrains_kotlin_kotlin_stdlib_jdk7", + "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$org_jetbrains_kotlin_kotlin_stdlib_jdk8", "org.jetbrains.kotlinx:kotlinx-coroutines-core:$org_jetbrains_kotlinx_kotlinx_coroutines_core", ) compileOnly( From fca218963259163240f7f38816150aabd5f0dc92 Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Tue, 23 Jul 2024 23:30:11 +0000 Subject: [PATCH 4/5] Upgrade Espresso accessibility. This upgrades the AndroidX Espresso Accessibility package to version 3.2.0 in an attempt to fix #5435. --- build.gradle | 2 +- third_party/versions.bzl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index c1af9f3e5cb..c5e6edb22c8 100644 --- a/build.gradle +++ b/build.gradle @@ -32,7 +32,7 @@ buildscript { ext.androidx_navigation_navigation_ui_ktx = "2.0.0" ext.androidx_navigation_navigation_ui = "2.0.0" ext.androidx_recyclerview_recyclerview = "1.1.0" - ext.androidx_test_espresso_espresso_accessibility = "3.1.0" + ext.androidx_test_espresso_espresso_accessibility = "3.2.0" ext.androidx_test_espresso_espresso_contrib = "3.1.0" ext.androidx_test_espresso_espresso_core = "3.3.0" ext.androidx_test_espresso_espresso_intents = "3.1.0" diff --git a/third_party/versions.bzl b/third_party/versions.bzl index 3b127e3fcaf..30f331beccf 100644 --- a/third_party/versions.bzl +++ b/third_party/versions.bzl @@ -99,7 +99,7 @@ MAVEN_PRODUCTION_DEPENDENCY_VERSIONS = { MAVEN_TEST_DEPENDENCY_VERSIONS = { "androidx.arch.core:core-testing": "2.1.0", "androidx.compose.ui:ui-test-junit4": "1.1.1", - "androidx.test.espresso:espresso-accessibility": "3.1.0", + "androidx.test.espresso:espresso-accessibility": "3.2.0", "androidx.test.espresso:espresso-contrib": "3.1.0", "androidx.test.espresso:espresso-core": "3.3.0", "androidx.test.espresso:espresso-intents": "3.1.0", From 30dbadbea15dda69ec534529fa07179f5d5ed6f3 Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Tue, 23 Jul 2024 23:34:24 +0000 Subject: [PATCH 5/5] Update maven_install.json. This was missed in the previous commit. --- third_party/maven_install.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/third_party/maven_install.json b/third_party/maven_install.json index 690d33faf06..d123a47af25 100644 --- a/third_party/maven_install.json +++ b/third_party/maven_install.json @@ -1,7 +1,7 @@ { "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", - "__INPUT_ARTIFACTS_HASH": -2142319524, - "__RESOLVED_ARTIFACTS_HASH": 1994124852, + "__INPUT_ARTIFACTS_HASH": 364035487, + "__RESOLVED_ARTIFACTS_HASH": 801482997, "artifacts": { "androidx.activity:activity-compose:aar": { "shasums": { @@ -527,9 +527,9 @@ }, "androidx.test.espresso:espresso-accessibility:aar": { "shasums": { - "jar": "e2ee8b50081c0b578521d112808321f737f3bf1acce035fe7be0e26ef00b491f" + "jar": "9bbf7a2ee6cfbb604a7d1207bbb927a007ef941b6af08bda8aca94fea042dd47" }, - "version": "3.1.0" + "version": "3.2.0" }, "androidx.test.espresso:espresso-contrib:aar": { "shasums": {