From 22f3f612d7501222ccbf71cd6a8ae70603f91382 Mon Sep 17 00:00:00 2001 From: Erik Huizinga Date: Fri, 18 Jun 2021 12:26:30 +0200 Subject: [PATCH 1/2] Apply Google Services Gradle plugin more robustly Fixes #3527 --- vector/build.gradle | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vector/build.gradle b/vector/build.gradle index 21f62647c0..10d593994e 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -246,6 +246,8 @@ android { productFlavors { gplay { + apply plugin: 'com.google.gms.google-services' + dimension "store" isDefault = true versionName "${versionMajor}.${versionMinor}.${versionPatch}${getGplayVersionSuffix()}" @@ -506,7 +508,3 @@ dependencies { exclude group: 'org.jetbrains.kotlin' } } - -if (getGradle().getStartParameter().getTaskRequests().toString().contains("Gplay")) { - apply plugin: 'com.google.gms.google-services' -} From cc5260b31138476bc49fca67936e312106297b06 Mon Sep 17 00:00:00 2001 From: Erik Huizinga Date: Fri, 18 Jun 2021 17:23:10 +0200 Subject: [PATCH 2/2] Disable non-Gplay flavor *GoogleServices* tasks --- vector/build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vector/build.gradle b/vector/build.gradle index 10d593994e..62afed1b0a 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -247,6 +247,9 @@ android { productFlavors { gplay { apply plugin: 'com.google.gms.google-services' + afterEvaluate { + tasks.matching { it.name.contains("GoogleServices") && !it.name.contains("Gplay") }*.enabled = false + } dimension "store" isDefault = true