diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index c991d1ad..cc5fd4a2 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -38,6 +38,11 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew + - name: Decode google-services.json + env: + DEBUG_GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.DEBUG_GOOGLE_SERVICES_JSON_BASE64 }} + run: | + echo $DEBUG_GOOGLE_SERVICES_JSON_BASE64 | base64 --decode > app/google-services.json - name: Apply Spotless run: ./gradlew spotlessApply @@ -122,6 +127,11 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew + - name: Decode google-services.json + env: + DEBUG_GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.DEBUG_GOOGLE_SERVICES_JSON_BASE64 }} + run: | + echo $DEBUG_GOOGLE_SERVICES_JSON_BASE64 | base64 --decode > app/google-services.json - name: Build run: ./gradlew assembleDebug assembleDebugAndroidTest diff --git a/README.md b/README.md index e1ed07cf..cfac5c60 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,7 @@ The app combines a variety of different Google technologies, such as: 1. Clone the repository. 2. Create a [Firebase project](https://firebase.google.com/products/firebase-ai-logic) and generate a `google-services.json` file. - Replace the current placeholder [`app/google-services.json`](app/google-services.json) file with your own JSON file created - above. Be sure to enable [Vertex AI API](https://console.cloud.google.com/apis/library/aiplatform.googleapis.com). + Place the file in the app folder: `app/google-services.json`. Be sure to enable [Vertex AI API](https://console.cloud.google.com/apis/library/aiplatform.googleapis.com). Ensure to also enable [AppCheck](https://console.firebase.google.com/project/_/appcheck) on your Firebase project to prevent API abuse. 3. This project makes use of remote config on Firebase too, you can import the [Firebase Remote config](https://firebase.google.com/docs/remote-config) settings from diff --git a/app/.gitignore b/app/.gitignore index 42afabfd..65d12b95 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -1 +1,2 @@ -/build \ No newline at end of file +/build +google-services.json \ No newline at end of file diff --git a/app/google-services.json b/app/google-services.json deleted file mode 100644 index 479980dc..00000000 --- a/app/google-services.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "project_info": { - "project_number": "abc", - "project_id": "YourProjectId", - "storage_bucket": "abc" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "APlaceholderAPIKeyWith-ThirtyNineCharsX", - "android_client_info": { - "package_name": "com.android.developers.androidify" - } - }, - "oauth_client": [], - "api_key": [ - { - "current_key": "APlaceholderAPIKeyWith-ThirtyNineCharsX" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [] - } - } - } - ], - "configuration_version": "1" -}