From bae779a868e7aee089a26e71300a7cba154fe564 Mon Sep 17 00:00:00 2001 From: Marcus Hoffmann Date: Sat, 21 Nov 2020 17:36:04 +0100 Subject: [PATCH] chore: Only load google services if needed Originally done in 051ec8f913e6532349f0912cac3ca84507c542bb then accidentally (?) reverted in 8a542bf5c2f5dd2cd275111074f29b71b2b11dd7 --- android/app/build.gradle | 4 +++- scripts/build-android-debug.sh | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 9b211682..8aa8b755 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -87,4 +87,6 @@ dependencies { implementation "net.zetetic:android-database-sqlcipher:4.4.0" // needed for moor_ffi w/ sqlcipher } -apply plugin: 'com.google.gms.google-services' \ No newline at end of file +if(file("google-services.json").exists()){ + apply plugin: 'com.google.gms.google-services' +} diff --git a/scripts/build-android-debug.sh b/scripts/build-android-debug.sh index fc837b1b..a361afd6 100755 --- a/scripts/build-android-debug.sh +++ b/scripts/build-android-debug.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash flutter channel stable flutter upgrade -truncate -s $(head -n -2 android/app/build.gradle | wc -c) android/app/build.gradle -flutter build apk --debug -v \ No newline at end of file +flutter build apk --debug -v