From 2050cd0b4b14ac585e5358c6b67117d59b3d3e66 Mon Sep 17 00:00:00 2001 From: Andre K Date: Mon, 14 Oct 2024 08:13:35 -0300 Subject: [PATCH] chore: simplify mock `google-services.json` workflow (#1313) --- .github/PULL_REQUEST_TEMPLATE.md | 2 ++ .github/workflows/android.yml | 13 -------- README.md | 8 ----- app/google-services-example.json | 40 ----------------------- app/google-services.json | 55 +++++++++++++++++++++++++++++++- 5 files changed, 56 insertions(+), 62 deletions(-) delete mode 100644 app/google-services-example.json mode change 120000 => 100644 app/google-services.json diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f25903e74..90af25ee9 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,8 +2,10 @@ (Please delete all these tips and replace with your text) +- Before starting on some new big chunk of code, it it is optional but highly recommended to open an issue first to say "Hey, I think this idea X should be implemented and I'm starting work on it. My general plan is Y, any feedback is appreciated." This will allow other devs to potentially save you time by not accidentally duplicating work etc... - Mention "#(issue)" in the description, when applicable - Please do not check in files that don't have real changes - Please do not reformat lines that you didn't have to change the code on - If your other co-developers have comments on your PR please tweak as needed - Do not use any external image service, just paste or drag and drop the image here and it will be uploaded automatically +- Please also enable "Allow edits by maintainers". diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 8d233ac28..f6ffce499 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -32,11 +32,6 @@ jobs: - name: Validate Gradle wrapper uses: gradle/actions/wrapper-validation@v4 - - name: Mock files for CI - run: | - rm ./app/google-services.json - cp ./app/google-services-example.json ./app/google-services.json - - name: Set up JDK 17 uses: actions/setup-java@v4 with: @@ -81,14 +76,6 @@ jobs: with: submodules: 'recursive' - - name: Validate Gradle wrapper - uses: gradle/actions/wrapper-validation@v4 - - - name: Mock files for CI - run: | - rm ./app/google-services.json - cp ./app/google-services-example.json ./app/google-services.json - - name: Set up JDK 17 uses: actions/setup-java@v4 with: diff --git a/README.md b/README.md index 0da3357ea..48d6aca44 100644 --- a/README.md +++ b/README.md @@ -41,14 +41,6 @@ If you would like to develop this application we'd love your help! These build i - Use Android Studio to build/debug - Use "git submodule update --init --recursive" to pull in the various submodules we depend on -- There are a few config files which you'll need to copy from templates included in the project. Run - the following commands to do so: - -```bash -rm ./app/google-services.json -cp ./app/google-services-example.json ./app/google-services.json -``` - - Now you should be able to select "Run / Run" in the IDE and it will happily start running on your phone or the emulator. Note: The emulators don't support bluetooth, so some features can not be used in that environment. diff --git a/app/google-services-example.json b/app/google-services-example.json deleted file mode 100644 index c1161dacc..000000000 --- a/app/google-services-example.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "project_info": { - "project_number": "1111", - "firebase_url": "https://xxx.firebaseio.com", - "project_id": "xxx", - "storage_bucket": "xxx.appspot.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:xxx:android:1111", - "android_client_info": { - "package_name": "com.geeksville.mesh" - } - }, - "oauth_client": [ - { - "client_id": "111-xxx.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "xxx-c" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "111-xxx.apps.googleusercontent.com", - "client_type": 3 - } - ] - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file diff --git a/app/google-services.json b/app/google-services.json deleted file mode 120000 index 0caed9a6f..000000000 --- a/app/google-services.json +++ /dev/null @@ -1 +0,0 @@ -../../google-services.json \ No newline at end of file diff --git a/app/google-services.json b/app/google-services.json new file mode 100644 index 000000000..d44e7ae87 --- /dev/null +++ b/app/google-services.json @@ -0,0 +1,54 @@ +{ + "project_info": { + "project_number": "1111", + "firebase_url": "https://xxx.firebaseio.com", + "project_id": "xxx", + "storage_bucket": "xxx.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:xxx:android:1111", + "android_client_info": { + "package_name": "com.geeksville.mesh" + } + }, + "oauth_client": [ + { + "client_id": "111-xxx.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.geeksville.mesh" + } + }, + { + "client_id": "111-xxx.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.geeksville.mesh" + } + }, + { + "client_id": "111-xxx.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "APlaceholderAPIKeyWith-ThirtyNineCharsX" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "111-xxx.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file