build(android): add google services and update NDK version
Configure Firebase/Google Services support for Android and update the CI build pipeline to use a newer NDK version. - Add `google-services.json` and configure `googleServicesFile` in `app.json` - Add `com.google.gms:google-services:4.4.4` classpath to build workflow - Update Android NDK version from `27.0.12077973` to `27.1.12297006` in CI cache and installation steps
This commit is contained in:
@@ -213,16 +213,16 @@ jobs:
|
|||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
id: cache-ndk
|
id: cache-ndk
|
||||||
with:
|
with:
|
||||||
path: /opt/android/ndk/27.0.12077973
|
path: /opt/android/ndk/27.1.12297006
|
||||||
key: ndk-27.0.12077973-v1
|
key: ndk-27.1.12297006-v1
|
||||||
|
|
||||||
- name: Install Android NDK
|
- name: Install Android NDK
|
||||||
if: steps.cache-ndk.outputs.cache-hit != 'true'
|
if: steps.cache-ndk.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
echo "Existing NDK versions:"
|
echo "Existing NDK versions:"
|
||||||
ls /opt/android/ndk/ 2>/dev/null || echo "No NDK dir"
|
ls /opt/android/ndk/ 2>/dev/null || echo "No NDK dir"
|
||||||
echo "Installing NDK 27.0.12077973..."
|
echo "Installing NDK 27.1.12297006..."
|
||||||
yes | sdkmanager --install "ndk;27.0.12077973"
|
yes | sdkmanager --install "ndk;27.1.12297006"
|
||||||
echo "NDK after install:"
|
echo "NDK after install:"
|
||||||
ls /opt/android/ndk/
|
ls /opt/android/ndk/
|
||||||
|
|
||||||
@@ -345,6 +345,7 @@ jobs:
|
|||||||
classpath('com.huawei.agconnect:agcp:1.9.1.301') {
|
classpath('com.huawei.agconnect:agcp:1.9.1.301') {
|
||||||
exclude group: 'com.huawei.agconnect', module: 'agconnect-apms-plugin'
|
exclude group: 'com.huawei.agconnect', module: 'agconnect-apms-plugin'
|
||||||
}
|
}
|
||||||
|
classpath('com.google.gms:google-services:4.4.4')
|
||||||
classpath('com.android.tools.build:gradle:8.12.0')
|
classpath('com.android.tools.build:gradle:8.12.0')
|
||||||
classpath('com.facebook.react:react-native-gradle-plugin')
|
classpath('com.facebook.react:react-native-gradle-plugin')
|
||||||
classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')
|
classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')
|
||||||
|
|||||||
1
app.json
1
app.json
@@ -27,6 +27,7 @@
|
|||||||
"bundleIdentifier": "cn.qczlit.weiyou"
|
"bundleIdentifier": "cn.qczlit.weiyou"
|
||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
|
"googleServicesFile": "./google-services.json",
|
||||||
"adaptiveIcon": {
|
"adaptiveIcon": {
|
||||||
"backgroundColor": "#0570F9",
|
"backgroundColor": "#0570F9",
|
||||||
"foregroundImage": "./assets/android-icon-foreground.png",
|
"foregroundImage": "./assets/android-icon-foreground.png",
|
||||||
|
|||||||
23
google-services.json
Normal file
23
google-services.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "000000000000",
|
||||||
|
"project_id": "withyou-dummy",
|
||||||
|
"storage_bucket": "withyou-dummy.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:000000000000:android:0000000000000000",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "cn.qczlit.withyou"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyDummyKeyForFirebaseInitOnly"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user