From 54d27acd70d5bfbbd7487dd232a12c3c222f124b Mon Sep 17 00:00:00 2001 From: Matthew Robertson Date: Tue, 14 May 2024 11:11:37 -0400 Subject: [PATCH 1/2] Make gmpAppId variant aware --- .../com/google/gms/googleservices/GoogleServicesPlugin.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-services-plugin/src/main/kotlin/com/google/gms/googleservices/GoogleServicesPlugin.kt b/google-services-plugin/src/main/kotlin/com/google/gms/googleservices/GoogleServicesPlugin.kt index 4d5d35e..5b98fc2 100644 --- a/google-services-plugin/src/main/kotlin/com/google/gms/googleservices/GoogleServicesPlugin.kt +++ b/google-services-plugin/src/main/kotlin/com/google/gms/googleservices/GoogleServicesPlugin.kt @@ -92,7 +92,7 @@ class GoogleServicesPlugin : Plugin { variant.productFlavors.map { it.second }, project.projectDir)) it.applicationId.set(variant.applicationId) - it.gmpAppId.set(project.buildDir.resolve("gmpAppId.txt")) + it.gmpAppId.set(project.buildDir.resolve("crashlytics/${variant.name}/gmpAppId.txt")) } // TODO: add an AGP version check to this block From 04554a1b3c01933b37cea58b1780a05b6b1b3a8c Mon Sep 17 00:00:00 2001 From: Matthew Robertson Date: Tue, 14 May 2024 12:58:31 -0400 Subject: [PATCH 2/2] Remove crashlytics from path --- .../com/google/gms/googleservices/GoogleServicesPlugin.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-services-plugin/src/main/kotlin/com/google/gms/googleservices/GoogleServicesPlugin.kt b/google-services-plugin/src/main/kotlin/com/google/gms/googleservices/GoogleServicesPlugin.kt index 5b98fc2..c802609 100644 --- a/google-services-plugin/src/main/kotlin/com/google/gms/googleservices/GoogleServicesPlugin.kt +++ b/google-services-plugin/src/main/kotlin/com/google/gms/googleservices/GoogleServicesPlugin.kt @@ -92,7 +92,7 @@ class GoogleServicesPlugin : Plugin { variant.productFlavors.map { it.second }, project.projectDir)) it.applicationId.set(variant.applicationId) - it.gmpAppId.set(project.buildDir.resolve("crashlytics/${variant.name}/gmpAppId.txt")) + it.gmpAppId.set(project.buildDir.resolve("gmpAppId/${variant.name}.txt")) } // TODO: add an AGP version check to this block