diff --git a/build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt index a5e001bd26..98c213dd1b 100644 --- a/build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt @@ -32,21 +32,23 @@ class AndroidApplicationFirebaseConventionPlugin : Plugin { apply("com.google.firebase.crashlytics") } + configurations.forEach { + /* + Exclusion of protobuf / protolite dependencies is necessary as the + datastore-proto brings in protobuf dependencies. These are the source of truth + for Now in Android. + That's why the duplicate classes from below dependencies are excluded. + */ + it.exclude(group = "com.google.protobuf", module = "protobuf-javalite") + it.exclude(group = "com.google.firebase", module = "protolite-well-known-types") + } + dependencies { val bom = libs.findLibrary("firebase-bom").get() add("implementation", platform(bom)) - "implementation"(libs.findLibrary("firebase.analytics").get()) - "implementation"(libs.findLibrary("firebase.performance").get()) { - /* - Exclusion of protobuf / protolite dependencies is necessary as the - datastore-proto brings in protobuf dependencies. These are the source of truth - for Now in Android. - That's why the duplicate classes from below dependencies are excluded. - */ - exclude(group = "com.google.protobuf", module = "protobuf-javalite") - exclude(group = "com.google.firebase", module = "protolite-well-known-types") - } - "implementation"(libs.findLibrary("firebase.crashlytics").get()) + add("implementation", libs.findLibrary("firebase.analytics").get()) + add("implementation", libs.findLibrary("firebase.performance").get()) + add("implementation", libs.findLibrary("firebase.crashlytics").get()) } extensions.configure {