From 1eb2017c4d1c47cb2a7c6e987e3aee501059a7af Mon Sep 17 00:00:00 2001 From: aderan Date: Mon, 23 Sep 2024 11:07:21 +0800 Subject: [PATCH] remove google-services.json and update .gitignore to prevent future commits --- .github/google-services.json.gpg | 3 ++ .github/scripts/decrypt_secret.sh | 3 ++ .gitignore | 5 +++- app/build.gradle | 11 +++++-- app/google-services.json | 48 ------------------------------- 5 files changed, 19 insertions(+), 51 deletions(-) create mode 100644 .github/google-services.json.gpg delete mode 100644 app/google-services.json diff --git a/.github/google-services.json.gpg b/.github/google-services.json.gpg new file mode 100644 index 00000000..dcebb2c3 --- /dev/null +++ b/.github/google-services.json.gpg @@ -0,0 +1,3 @@ +Œ  T½}ñ„0rìúÒÀî÷&2TWMuC¿QŠ v5>kŠ»½¢­Ñ²ì˜È¼V+_Tì—…®à£´ëÖëÎ`‘!Œ:nO:<¦-:w뙳,÷J¬=n¥¢·ÝšÞ]a ©Üê°¾Ôm­–6³~:Ý"ZšÄúë½RÔXkl8C+ŸüH­'¿:~,T_ˆ³[4€@ÉËÇã³)`Úƒý"Ï{B–+uWÔ…Ÿµ„Q#†…wŠ#àã}Ëc‘ž^õ]ª_-¼XŽ(ª,Îãf\’JxaÕ0Y×7ú*Wt£ÿã9$,g›òÛpy¡s ÃÅ!žÂÆïi’Þÿ5WÝ`ý +|1(v}gÓ1àkçØ•2Y4ß\•ñ0$qüšn=$/ÖE‹å*ŽfŠj!¢þWfš4µÕF†qÅò&Z‡ÚXøG³-‚s»K &¿U +ø˜Õýÿ=~1OƒÆéämÞ?¥'ÃL’ãn(ÌK€-ÙÈQF\¾çƒ~´ }TEÙ…^o´±¶¸Óæâkî‰L¾‡á½u~_sØÑ„Å1ai%Bÿ‹òÀ3ž˜¹0pùU<âýlÊ \ No newline at end of file diff --git a/.github/scripts/decrypt_secret.sh b/.github/scripts/decrypt_secret.sh index 9673f807..1fc26a8f 100755 --- a/.github/scripts/decrypt_secret.sh +++ b/.github/scripts/decrypt_secret.sh @@ -7,6 +7,9 @@ gpg --quiet --batch --yes --decrypt --passphrase="$KEYSTORE_SECRET_PASSPHRASE" \ # decrpyt gradle properties gpg --quiet --batch --yes --decrypt --passphrase="$GRADLE_SECRET_PASSPHRASE" \ --output $HOME/flat/ci-gradle.properties $GITHUB_WORKSPACE/.github/ci-gradle.properties.gpg +# decrpyt google-services.json +gpg --quiet --batch --yes --decrypt --passphrase="$GRADLE_SECRET_PASSPHRASE" \ +--output $GITHUB_WORKSPACE/app/google-services.json $GITHUB_WORKSPACE/.github/google-services.json.gpg mkdir -p ~/.gradle cp $HOME/flat/ci-gradle.properties ~/.gradle/gradle.properties diff --git a/.gitignore b/.gitignore index 8dc779d3..86af3945 100644 --- a/.gitignore +++ b/.gitignore @@ -80,4 +80,7 @@ lint/tmp/ # lint/reports/ # Android Profiling -*.hprof \ No newline at end of file +*.hprof + +# Firebase +.app/google-services.json \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 34546292..ee41cc2c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,10 +6,17 @@ plugins { id 'kotlin-parcelize' id "androidx.navigation.safeargs" - id 'com.google.gms.google-services' id "com.google.firebase.crashlytics" } +def googleServicesPath = "$projectDir/google-services.json" +if (file(googleServicesPath).exists()) { + apply plugin: 'com.google.gms.google-services' + println "Applying Google Services plugin." +} else { + println "Skipping Google Services plugin as google-services.json not found." +} + android { compileSdk 34 @@ -134,7 +141,7 @@ android { productFlavors { create("flat") { applicationId = "io.agora.flat" - + buildConfigField "String", "DEFAULT_CALLING_CODE", "\"+86\"" buildConfigField "String", "DEFAULT_ENV", "\"cn_prod\"" } diff --git a/app/google-services.json b/app/google-services.json deleted file mode 100644 index 48c18efe..00000000 --- a/app/google-services.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "project_info": { - "project_number": "132248813632", - "project_id": "flat-434d0", - "storage_bucket": "flat-434d0.appspot.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:132248813632:android:5ab03fdf2abcf200ed5fa5", - "android_client_info": { - "package_name": "io.agora.flat" - } - }, - "oauth_client": [], - "api_key": [ - { - "current_key": "AIzaSyCTiYmkyWAY_MQZ9POSTWiJdJ6XYQZr0Bw" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:132248813632:android:9b83d459405af101ed5fa5", - "android_client_info": { - "package_name": "io.agora.flint" - } - }, - "oauth_client": [], - "api_key": [ - { - "current_key": "AIzaSyCTiYmkyWAY_MQZ9POSTWiJdJ6XYQZr0Bw" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [] - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file