diff --git a/app/build.gradle b/app/build.gradle index d01f0761785..0102bc36646 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -93,7 +93,7 @@ android { } composeOptions { - kotlinCompilerExtensionVersion = Versions.google_compose_compiler + kotlinCompilerExtensionVersion = FocusVersions.google_compose_compiler } flavorDimensions "product" diff --git a/build.gradle b/build.gradle index 283b3e20621..3cb39b743db 100644 --- a/build.gradle +++ b/build.gradle @@ -67,7 +67,7 @@ configurations { } dependencies { - ktlint("com.pinterest:ktlint:${Versions.ktlint_version}") { + ktlint("com.pinterest:ktlint:${FocusVersions.ktlint_version}") { attributes { attribute(Bundling.BUNDLING_ATTRIBUTE, getObjects().named(Bundling, Bundling.EXTERNAL)) } diff --git a/buildSrc/src/main/java/FocusDependencies.kt b/buildSrc/src/main/java/FocusDependencies.kt index 0186d2fdee8..0d49c86f72f 100644 --- a/buildSrc/src/main/java/FocusDependencies.kt +++ b/buildSrc/src/main/java/FocusDependencies.kt @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -object Versions { +object FocusVersions { object Adjust { const val adjust = "4.33.0" const val install_referrer = "2.2" @@ -70,75 +70,75 @@ object Versions { // Workaround for a Gradle parsing bug that prevents using nested objects directly in Gradle files. // These might be removable if we switch to kts files instead. // https://github.com/gradle/gradle/issues/9251 - const val google_compose_compiler = Versions.Google.compose_compiler - const val ktlint_version = Versions.Testing.ktlint + const val google_compose_compiler = FocusVersions.Google.compose_compiler + const val ktlint_version = FocusVersions.Testing.ktlint } object FocusDependencies { - const val androidx_annotation = "androidx.annotation:annotation:${Versions.AndroidX.annotation}" - const val androidx_arch_core_testing = "androidx.arch.core:core-testing:${Versions.AndroidX.arch}" - const val androidx_appcompat = "androidx.appcompat:appcompat:${Versions.AndroidX.appcompat}" - const val androidx_browser = "androidx.browser:browser:${Versions.AndroidX.browser}" - const val androidx_cardview = "androidx.cardview:cardview:${Versions.AndroidX.cardview}" - const val androidx_compose_ui = "androidx.compose.ui:ui:${Versions.AndroidX.compose}" - const val androidx_compose_ui_test = "androidx.compose.ui:ui-test-junit4:${Versions.AndroidX.compose}" - const val androidx_compose_ui_test_manifest = "androidx.compose.ui:ui-test-manifest:${Versions.AndroidX.compose}" - const val androidx_compose_ui_tooling = "androidx.compose.ui:ui-tooling:${Versions.AndroidX.compose}" - const val androidx_compose_foundation = "androidx.compose.foundation:foundation:${Versions.AndroidX.compose}" - const val androidx_compose_material = "androidx.compose.material:material:${Versions.AndroidX.compose}" - const val androidx_compose_runtime_livedata = "androidx.compose.runtime:runtime-livedata:${Versions.AndroidX.compose}" + const val androidx_annotation = "androidx.annotation:annotation:${FocusVersions.AndroidX.annotation}" + const val androidx_arch_core_testing = "androidx.arch.core:core-testing:${FocusVersions.AndroidX.arch}" + const val androidx_appcompat = "androidx.appcompat:appcompat:${FocusVersions.AndroidX.appcompat}" + const val androidx_browser = "androidx.browser:browser:${FocusVersions.AndroidX.browser}" + const val androidx_cardview = "androidx.cardview:cardview:${FocusVersions.AndroidX.cardview}" + const val androidx_compose_ui = "androidx.compose.ui:ui:${FocusVersions.AndroidX.compose}" + const val androidx_compose_ui_test = "androidx.compose.ui:ui-test-junit4:${FocusVersions.AndroidX.compose}" + const val androidx_compose_ui_test_manifest = "androidx.compose.ui:ui-test-manifest:${FocusVersions.AndroidX.compose}" + const val androidx_compose_ui_tooling = "androidx.compose.ui:ui-tooling:${FocusVersions.AndroidX.compose}" + const val androidx_compose_foundation = "androidx.compose.foundation:foundation:${FocusVersions.AndroidX.compose}" + const val androidx_compose_material = "androidx.compose.material:material:${FocusVersions.AndroidX.compose}" + const val androidx_compose_runtime_livedata = "androidx.compose.runtime:runtime-livedata:${FocusVersions.AndroidX.compose}" const val androidx_constraint_layout_compose = - "androidx.constraintlayout:constraintlayout-compose:${Versions.AndroidX.constraint_layout_compose}" - const val androidx_constraint_layout = "androidx.constraintlayout:constraintlayout:${Versions.AndroidX.constraint_layout}" - const val androidx_core_ktx = "androidx.core:core-ktx:${Versions.AndroidX.core}" - const val androidx_fragment = "androidx.fragment:fragment:${Versions.AndroidX.fragment}" + "androidx.constraintlayout:constraintlayout-compose:${FocusVersions.AndroidX.constraint_layout_compose}" + const val androidx_constraint_layout = "androidx.constraintlayout:constraintlayout:${FocusVersions.AndroidX.constraint_layout}" + const val androidx_core_ktx = "androidx.core:core-ktx:${FocusVersions.AndroidX.core}" + const val androidx_fragment = "androidx.fragment:fragment:${FocusVersions.AndroidX.fragment}" - const val androidx_palette = "androidx.palette:palette-ktx:${Versions.AndroidX.palette}" - const val androidx_preference = "androidx.preference:preference-ktx:${Versions.AndroidX.preference}" - const val androidx_recyclerview = "androidx.recyclerview:recyclerview:${Versions.AndroidX.recyclerview}" - const val androidx_lifecycle_process = "androidx.lifecycle:lifecycle-process:${Versions.AndroidX.lifecycle}" - const val androidx_lifecycle_viewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:${Versions.AndroidX.lifecycle}" - const val androidx_splashscreen = "androidx.core:core-splashscreen:${Versions.AndroidX.splashscreen}" - const val androidx_savedstate = "androidx.savedstate:savedstate-ktx:${Versions.AndroidX.savedstate}" - const val androidx_transition = "androidx.transition:transition:${Versions.AndroidX.transition}" - const val androidx_work_ktx = "androidx.work:work-runtime-ktx:${Versions.AndroidX.work}" - const val androidx_work_testing = "androidx.work:work-testing:${Versions.AndroidX.work}" + const val androidx_palette = "androidx.palette:palette-ktx:${FocusVersions.AndroidX.palette}" + const val androidx_preference = "androidx.preference:preference-ktx:${FocusVersions.AndroidX.preference}" + const val androidx_recyclerview = "androidx.recyclerview:recyclerview:${FocusVersions.AndroidX.recyclerview}" + const val androidx_lifecycle_process = "androidx.lifecycle:lifecycle-process:${FocusVersions.AndroidX.lifecycle}" + const val androidx_lifecycle_viewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:${FocusVersions.AndroidX.lifecycle}" + const val androidx_splashscreen = "androidx.core:core-splashscreen:${FocusVersions.AndroidX.splashscreen}" + const val androidx_savedstate = "androidx.savedstate:savedstate-ktx:${FocusVersions.AndroidX.savedstate}" + const val androidx_transition = "androidx.transition:transition:${FocusVersions.AndroidX.transition}" + const val androidx_work_ktx = "androidx.work:work-runtime-ktx:${FocusVersions.AndroidX.work}" + const val androidx_work_testing = "androidx.work:work-testing:${FocusVersions.AndroidX.work}" - const val google_material = "com.google.android.material:material:${Versions.Google.material}" - const val google_accompanist_insets_ui = "com.google.accompanist:accompanist-insets-ui:${Versions.Google.accompanist}" - const val google_play = "com.google.android.play:core:${Versions.Google.play}" - const val kotlin_gradle_plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.Gradle.kotlin_plugin}" - const val android_gradle_plugin = "com.android.tools.build:gradle:${Versions.Gradle.android_plugin}" - const val jna = "net.java.dev.jna:jna:${Versions.ThirdParty.jna}@jar" - const val leakcanary = "com.squareup.leakcanary:leakcanary-android-core:${Versions.ThirdParty.leakcanary}" - const val sentry = "io.sentry:sentry-android:${Versions.ThirdParty.sentry}" + const val google_material = "com.google.android.material:material:${FocusVersions.Google.material}" + const val google_accompanist_insets_ui = "com.google.accompanist:accompanist-insets-ui:${FocusVersions.Google.accompanist}" + const val google_play = "com.google.android.play:core:${FocusVersions.Google.play}" + const val kotlin_gradle_plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${FocusVersions.Gradle.kotlin_plugin}" + const val android_gradle_plugin = "com.android.tools.build:gradle:${FocusVersions.Gradle.android_plugin}" + const val jna = "net.java.dev.jna:jna:${FocusVersions.ThirdParty.jna}@jar" + const val leakcanary = "com.squareup.leakcanary:leakcanary-android-core:${FocusVersions.ThirdParty.leakcanary}" + const val sentry = "io.sentry:sentry-android:${FocusVersions.ThirdParty.sentry}" - const val kotlin_coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.Kotlin.coroutines}" - const val kotlin_coroutines_android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Versions.Kotlin.coroutines}" + const val kotlin_coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${FocusVersions.Kotlin.coroutines}" + const val kotlin_coroutines_android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:${FocusVersions.Kotlin.coroutines}" - const val adjust = "com.adjust.sdk:adjust-android:${Versions.Adjust.adjust}" - const val install_referrer = "com.android.installreferrer:installreferrer:${Versions.Adjust.install_referrer}" + const val adjust = "com.adjust.sdk:adjust-android:${FocusVersions.Adjust.adjust}" + const val install_referrer = "com.android.installreferrer:installreferrer:${FocusVersions.Adjust.install_referrer}" - const val androidx_junit_ktx = "androidx.test.ext:junit-ktx:${Versions.Testing.androidx_ext_junit}" - const val androidx_orchestrator = "androidx.test:orchestrator:${Versions.Testing.androidx_orchestrator}" - const val androidx_test_core = "androidx.test:core:${Versions.Testing.androidx_core}" - const val androidx_test_core_ktx = "androidx.test:core-ktx:${Versions.Testing.androidx_core}" - const val androidx_test_rules = "androidx.test:rules:${Versions.Testing.androidx_core}" - const val androidx_test_runner = "androidx.test:runner:${Versions.Testing.androidx_core}" - const val androidx_uiautomator = "androidx.test.uiautomator:uiautomator:${Versions.Testing.androidx_uiautomator}" - const val espresso_contrib = "androidx.test.espresso:espresso-contrib:${Versions.Testing.androidx_espresso}" - const val espresso_core = "androidx.test.espresso:espresso-core:${Versions.Testing.androidx_espresso}" - const val espresso_idling_resource = "androidx.test.espresso:espresso-idling-resource:${Versions.Testing.androidx_espresso}" - const val espresso_intents = "androidx.test.espresso:espresso-intents:${Versions.Testing.androidx_espresso}" - const val espresso_web = "androidx.test.espresso:espresso-web:${Versions.Testing.androidx_espresso}" - const val falcon = "com.jraska:falcon:${Versions.Testing.falcon}" - const val fastlane = "tools.fastlane:screengrab:${Versions.Testing.fastlane}" - const val testing_robolectric = "org.robolectric:robolectric:${Versions.Testing.robolectric}" - const val testing_mockito = "org.mockito:mockito-core:${Versions.Testing.mockito}" - const val testing_mockwebserver = "com.squareup.okhttp3:mockwebserver:${Versions.Testing.mockwebserver}" - const val testing_coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-test:${Versions.Kotlin.coroutines}" + const val androidx_junit_ktx = "androidx.test.ext:junit-ktx:${FocusVersions.Testing.androidx_ext_junit}" + const val androidx_orchestrator = "androidx.test:orchestrator:${FocusVersions.Testing.androidx_orchestrator}" + const val androidx_test_core = "androidx.test:core:${FocusVersions.Testing.androidx_core}" + const val androidx_test_core_ktx = "androidx.test:core-ktx:${FocusVersions.Testing.androidx_core}" + const val androidx_test_rules = "androidx.test:rules:${FocusVersions.Testing.androidx_core}" + const val androidx_test_runner = "androidx.test:runner:${FocusVersions.Testing.androidx_core}" + const val androidx_uiautomator = "androidx.test.uiautomator:uiautomator:${FocusVersions.Testing.androidx_uiautomator}" + const val espresso_contrib = "androidx.test.espresso:espresso-contrib:${FocusVersions.Testing.androidx_espresso}" + const val espresso_core = "androidx.test.espresso:espresso-core:${FocusVersions.Testing.androidx_espresso}" + const val espresso_idling_resource = "androidx.test.espresso:espresso-idling-resource:${FocusVersions.Testing.androidx_espresso}" + const val espresso_intents = "androidx.test.espresso:espresso-intents:${FocusVersions.Testing.androidx_espresso}" + const val espresso_web = "androidx.test.espresso:espresso-web:${FocusVersions.Testing.androidx_espresso}" + const val falcon = "com.jraska:falcon:${FocusVersions.Testing.falcon}" + const val fastlane = "tools.fastlane:screengrab:${FocusVersions.Testing.fastlane}" + const val testing_robolectric = "org.robolectric:robolectric:${FocusVersions.Testing.robolectric}" + const val testing_mockito = "org.mockito:mockito-core:${FocusVersions.Testing.mockito}" + const val testing_mockwebserver = "com.squareup.okhttp3:mockwebserver:${FocusVersions.Testing.mockwebserver}" + const val testing_coroutines = "org.jetbrains.kotlinx:kotlinx-coroutines-test:${FocusVersions.Kotlin.coroutines}" - const val testing_junit_api = "org.junit.jupiter:junit-jupiter-api:${Versions.Testing.junit}" - const val testing_junit_engine = "org.junit.jupiter:junit-jupiter-engine:${Versions.Testing.junit}" - const val testing_junit_params = "org.junit.jupiter:junit-jupiter-params:${Versions.Testing.junit}" + const val testing_junit_api = "org.junit.jupiter:junit-jupiter-api:${FocusVersions.Testing.junit}" + const val testing_junit_engine = "org.junit.jupiter:junit-jupiter-engine:${FocusVersions.Testing.junit}" + const val testing_junit_params = "org.junit.jupiter:junit-jupiter-params:${FocusVersions.Testing.junit}" } diff --git a/taskcluster/ci/toolchain/android.yml b/taskcluster/ci/toolchain/android.yml index d0802165720..0fd35d6644e 100644 --- a/taskcluster/ci/toolchain/android.yml +++ b/taskcluster/ci/toolchain/android.yml @@ -43,7 +43,7 @@ linux64-android-gradle-dependencies: resources: - taskcluster/scripts/toolchain/android-gradle-dependencies.sh - taskcluster/scripts/toolchain/android-gradle-dependencies/** - - buildSrc/src/main/java/Dependencies.kt + - buildSrc/src/main/java/FocusDependencies.kt - buildSrc/src/main/java/AndroidComponents.kt toolchain-artifact: public/build/android-gradle-dependencies.tar.xz toolchain-alias: android-gradle-dependencies