From a015ec76e2a1159c740428f528ee76c3ab921231 Mon Sep 17 00:00:00 2001 From: Pedro Silva <9375141+pedrox-hs@users.noreply.github.com> Date: Tue, 3 Oct 2023 18:55:12 -0300 Subject: [PATCH] skip google-services process when it does not exists --- android/app/build.gradle | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/android/app/build.gradle b/android/app/build.gradle index a1984f01..452b6c8f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -110,6 +110,17 @@ flutter { source '../..' } +project.gradle.taskGraph.whenReady { graph -> + project.tasks.findAll().forEach { task -> + if (task.name.contains("processDebugGoogleServices")) { + def googleServicesJsonFiles = fileTree(dir: ".", include: "**/google-services.json") + if (googleServicesJsonFiles.isEmpty()) { + task.enabled = false + } + } + } +} + dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"