diff --git a/examples/build.md b/examples/build.md index 2257ecafed..b8fe9df310 100644 --- a/examples/build.md +++ b/examples/build.md @@ -42,10 +42,10 @@ Two flavors are declared on the `default` dimension: | Flavor | Use case | |--------|----------| -| `gms` | Google Play Services / FCM — applies the `com.google.gms.google-services` plugin and pulls `play-services-location`. | +| `gms` | Google Play Services / FCM — pulls `play-services-location`. OneSignal initializes its own Firebase app, so no Google Services plugin or `google-services.json` is needed. | | `huawei` | Huawei HMS — applies `com.huawei.agconnect`, excludes the GMS transitive deps from the OneSignal artifact, and pulls `com.huawei.hms:push` + `com.huawei.hms:location`. | -The plugin (`com.google.gms.google-services` vs `com.huawei.agconnect`) is selected at configuration time by inspecting `gradle.startParameter.taskRequests` so a clean `./gradlew tasks` doesn't require both Google and Huawei configuration files. +The Huawei plugin is selected at configuration time by inspecting `gradle.startParameter.taskRequests` so a clean `./gradlew tasks` doesn't require Huawei configuration. ### `build.gradle.kts` essentials @@ -226,12 +226,11 @@ The `vine_boom.wav` file from [`sdk-shared/assets`](https://github.com/OneSignal ### Service config files -The shared default `applicationId` is `com.onesignal.example`. Both service configs must agree: +The shared default `applicationId` is `com.onesignal.example`. -- `app/google-services.json` → `package_name = "com.onesignal.example"` for the `gms` flavor. - `app/agconnect-services.json` → every `package_name` entry set to `com.onesignal.example` for the `huawei` flavor. -If the package changes you must regenerate these from the Firebase / Huawei AppGallery consoles. +If the package changes you must regenerate this file from the Huawei AppGallery console. ### Huawei flavor @@ -257,7 +256,6 @@ examples/ └── app/ ├── build.gradle.kts # namespace = com.onesignal.example, gms/huawei flavors ├── proguard-rules.pro - ├── google-services.json # package_name = com.onesignal.example ├── agconnect-services.json # package_name = com.onesignal.example └── src/ ├── main/ diff --git a/examples/demo/GettingStarted.md b/examples/demo/GettingStarted.md index afd11d6c35..e99c9ffc9b 100644 --- a/examples/demo/GettingStarted.md +++ b/examples/demo/GettingStarted.md @@ -161,7 +161,6 @@ When building from `OneSignalSDK/`, the `SDK_VERSION` property is **required** a | Problem | Fix | |---------|-----| -| `google-services.json` error | Make sure the `gms` variant is selected. The file is already checked in. | | Push not received on emulator | Use a device with Google Play Services. Some emulator images lack FCM support. | | `SDK_VERSION is not defined` | You're building from `OneSignalSDK/`. Pass `-PSDK_VERSION=X.Y.Z`. | | Gradle sync fails on Huawei deps | Switch to `gmsDebug` unless you specifically need HMS testing. | diff --git a/examples/demo/app/build.gradle.kts b/examples/demo/app/build.gradle.kts index 2d233dcf5d..96e09074e4 100644 --- a/examples/demo/app/build.gradle.kts +++ b/examples/demo/app/build.gradle.kts @@ -25,12 +25,10 @@ fun demoOverride(key: String): String? { return demoLocalProperties.getProperty(key)?.trim()?.takeIf { it.isNotEmpty() } } -// Apply GMS or Huawei plugin based on build variant +// Apply the Huawei plugin only for Huawei build variants. // Check at configuration time, not when task graph is ready val taskRequests = gradle.startParameter.taskRequests.toString().lowercase() -if (taskRequests.contains("gms")) { - apply(plugin = "com.google.gms.google-services") -} else if (taskRequests.contains("huawei")) { +if (taskRequests.contains("huawei")) { apply(plugin = "com.huawei.agconnect") } diff --git a/examples/demo/app/google-services.json b/examples/demo/app/google-services.json deleted file mode 100644 index 862057606d..0000000000 --- a/examples/demo/app/google-services.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "project_info": { - "project_number": "249481192614", - "firebase_url": "https://onesignaltest-e7802.firebaseio.com", - "project_id": "onesignaltest-e7802", - "storage_bucket": "onesignaltest-e7802.appspot.com" - }, - "client": [ - { - "client_info": { - "mobilesdk_app_id": "1:249481192614:android:9d39e24e24034b14", - "android_client_info": { - "package_name": "com.onesignal.example" - } - }, - "oauth_client": [], - "api_key": [ - { - "current_key": "AIzaSyC2H_Z5NRhKVJsoG6dLwzSrH3aLNm7p3sw" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [] - } - } - } - ], - "configuration_version": "1" -} \ No newline at end of file diff --git a/examples/demo/build.gradle.kts b/examples/demo/build.gradle.kts index 159ff201ce..a12a9da2f0 100644 --- a/examples/demo/build.gradle.kts +++ b/examples/demo/build.gradle.kts @@ -12,7 +12,6 @@ buildscript { dependencies { classpath("com.android.tools.build:gradle:8.8.2") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") - classpath("com.google.gms:google-services:4.3.10") classpath("com.huawei.agconnect:agcp:1.9.1.304") } }