Bug 1918780 - Migrate Protobuf to the AC dependencies plugin. r=android-reviewers,mcarare

Differential Revision: https://phabricator.services.mozilla.com/D222171
This commit is contained in:
Ryan VanderMeulen
2024-09-17 14:23:52 +00:00
parent 14fd0fe5ae
commit 72eda52215
5 changed files with 9 additions and 11 deletions

View File

@@ -20,7 +20,7 @@ buildscript {
ksp_plugin = Versions.ksp_plugin
// Used in mobile/android/fenix/app/build.gradle
protobuf_plugin = FenixVersions.protobuf_plugin
protobuf_plugin = Versions.protobuf_plugin
}
dependencies {

View File

@@ -89,6 +89,8 @@ object Versions {
const val work = "2.9.1"
}
// Gradle can't deal with this being nested below.
const val protobuf_plugin = "0.9.4"
object Google {
const val accompanist = "0.36.0"
const val firebase_messaging = "24.0.1"
@@ -98,6 +100,7 @@ object Versions {
const val play_services_ads_id = "16.0.0"
const val play_services_base = "18.5.0"
const val play_services_fido = "21.1.0"
const val protobuf = "3.21.10" // Keep Protobuf in sync with the version used by AppServices.
}
object Testing {
@@ -265,4 +268,6 @@ object ComponentsDependencies {
const val play_services_ads_id = "com.google.android.gms:play-services-ads-identifier:${Versions.Google.play_services_ads_id}"
const val play_services_base = "com.google.android.gms:play-services-base:${Versions.Google.play_services_base}"
const val play_services_fido = "com.google.android.gms:play-services-fido:${Versions.Google.play_services_fido}"
const val protobuf_compiler = "com.google.protobuf:protoc:${Versions.Google.protobuf}"
const val protobuf_javalite = "com.google.protobuf:protobuf-javalite:${Versions.Google.protobuf}"
}

View File

@@ -697,7 +697,7 @@ dependencies {
implementation ComponentsDependencies.androidx_viewpager2
implementation ComponentsDependencies.androidx_work_runtime
implementation FenixDependencies.protobuf_javalite
implementation ComponentsDependencies.protobuf_javalite
implementation ComponentsDependencies.google_material
implementation FenixDependencies.adjust
@@ -761,7 +761,7 @@ dependencies {
protobuf {
protoc {
artifact = FenixDependencies.protobuf_compiler
artifact = ComponentsDependencies.protobuf_compiler
}
// Generates the java Protobuf-lite code for the Protobufs in this project. See

View File

@@ -38,7 +38,7 @@ buildscript {
ext {
detekt_plugin = Versions.detekt
ksp_plugin = Versions.ksp_plugin
protobuf_plugin = FenixVersions.protobuf_plugin
protobuf_plugin = Versions.protobuf_plugin
python_envs_plugin = Versions.python_envs_plugin
}
}

View File

@@ -20,17 +20,10 @@ object FenixVersions {
const val installreferrer = "2.2"
const val mockk = "1.13.12"
// keep in sync with the versions used in AS.
const val protobuf = "3.21.10"
const val protobuf_plugin = "0.9.4"
}
@Suppress("unused")
object FenixDependencies {
const val protobuf_javalite = "com.google.protobuf:protobuf-javalite:${FenixVersions.protobuf}"
const val protobuf_compiler = "com.google.protobuf:protoc:${FenixVersions.protobuf}"
const val adjust = "com.adjust.sdk:adjust-android:${FenixVersions.adjust}"
const val installreferrer = "com.android.installreferrer:installreferrer:${FenixVersions.installreferrer}"