From 38c16adffecf860b4d8dc81c9c7895d44c08c544 Mon Sep 17 00:00:00 2001 From: tom5079 Date: Thu, 2 Jan 2020 10:18:39 +0900 Subject: [PATCH] Fixed to be able to build without google-services.json --- .gitignore | 2 +- .idea/misc.xml | 2 +- app/build.gradle | 13 ++++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 9a319865..299424af 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,4 @@ /gh-pages #Private files -/app/google-services.json \ No newline at end of file +google-services.json \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 7bfef59d..39b64357 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + diff --git a/app/build.gradle b/app/build.gradle index 61163ead..6dd01b2a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,9 +3,12 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlinx-serialization' -apply plugin: 'com.google.gms.google-services' -apply plugin: 'io.fabric' -apply plugin: 'com.google.firebase.firebase-perf' + +if (file("google-services.json").exists()) { + apply plugin: 'com.google.gms.google-services' + apply plugin: 'io.fabric' + apply plugin: 'com.google.firebase.firebase-perf' +} android { compileSdkVersion 29 @@ -14,7 +17,7 @@ android { minSdkVersion 16 targetSdkVersion 29 versionCode 31 - versionName "4.2-beta2-hotfix2" + versionName "4.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" multiDexEnabled true vectorDrawables.useSupportLibrary = true @@ -25,7 +28,7 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } buildTypes.each { - it.buildConfigField('boolean', 'PRERELEASE', 'true') + it.buildConfigField('boolean', 'PRERELEASE', 'false') it.buildConfigField('boolean', 'CENSOR', 'false') } }