From 5af0e2b67d6486b15bb3fafa23682dc708304300 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Thu, 20 Aug 2026 14:12:46 +0200 Subject: [PATCH 1/8] chore: configure firevase app distribution and manual worflow dispatch --- .github/workflows/distribute-dev-firebase.yml | 79 +++++++++++++++++++ app/build.gradle.kts | 33 ++++++++ default.json | 2 +- gradle/libs.versions.toml | 2 + .../android/tests/support/UiAutomatorSetup.kt | 2 +- 5 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/distribute-dev-firebase.yml diff --git a/.github/workflows/distribute-dev-firebase.yml b/.github/workflows/distribute-dev-firebase.yml new file mode 100644 index 00000000000..c83d6727863 --- /dev/null +++ b/.github/workflows/distribute-dev-firebase.yml @@ -0,0 +1,79 @@ +name: "Distribute Dev Build" + +on: + workflow_dispatch: + inputs: + pull-request: + description: "PR number whose existing DevDebug artifact should be uploaded; leave empty to build the selected branch" + required: false + type: string + release-notes: + description: "Help testers know what to test in this build, i.e. refactor navigation, meetings M1, etc." + required: true + type: string + +permissions: + actions: read + contents: read + pull-requests: read + +concurrency: + group: firebase-app-distribution-dev-${{ inputs.pull-request || github.ref }} + cancel-in-progress: false + +jobs: + distribute: + name: Distribute DevDebug + runs-on: ubuntu-latest + steps: + - name: Checkout selected branch + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + with: + persist-credentials: false + submodules: recursive + fetch-depth: 1 + + - name: Set up JDK 21 + uses: actions/setup-java@0f481fcb613427c0f801b606911222b5b6f3083a # v5.5.0 + with: + java-version: "21" + distribution: temurin + cache: gradle + + - name: Resolve DevDebug APK + id: apk + env: + GH_TOKEN: ${{ github.token }} + PULL_REQUEST: ${{ inputs.pull-request }} + run: | + if [[ -n "${PULL_REQUEST}" ]]; then + [[ "${PULL_REQUEST}" =~ ^[0-9]+$ ]] || { echo "pull-request must be a number"; exit 1; } + + head_sha="$(gh pr view "${PULL_REQUEST}" --repo "${GITHUB_REPOSITORY}" --json headRefOid --jq .headRefOid)" + source_run_id="$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/build-develop-pr.yml/runs?event=pull_request&head_sha=${head_sha}&status=success&per_page=1" --jq '.workflow_runs[0].id // empty')" + [[ -n "${source_run_id}" ]] || { echo "No successful Develop PR build found for PR #${PULL_REQUEST}"; exit 1; } + + gh run download "${source_run_id}" --repo "${GITHUB_REPOSITORY}" --name Dev-Debug-artifacts --dir downloaded-artifacts + apk_path="$(find downloaded-artifacts -type f -name '*.apk' -print -quit)" + else + ./gradlew :app:assembleDevDebug + apk_path="$(find app/build/outputs/apk/dev/debug -type f -name '*.apk' -print -quit)" + fi + + [[ -n "${apk_path}" && -f "${apk_path}" ]] || { echo "DevDebug APK was not found"; exit 1; } + echo "path=${apk_path}" >> "${GITHUB_OUTPUT}" + + - name: Upload to Firebase App Distribution + env: + FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON: ${{ secrets.FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON }} + FIREBASE_APP_DISTRIBUTION_GROUPS: ${{ vars.FIREBASE_APP_DISTRIBUTION_GROUPS }} + APK_PATH: ${{ steps.apk.outputs.path }} + RELEASE_NOTES: ${{ inputs.release-notes }} + run: | + : "${FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON:?Configure the FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON repository secret}" + + upload_args=(":app:appDistributionUploadDevDebug" "--artifactPath=${APK_PATH}") + if [[ -n "${RELEASE_NOTES}" ]]; then + upload_args+=("--releaseNotes=${RELEASE_NOTES}") + fi + ./gradlew "${upload_args[@]}" diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9003f9d39ef..66b397907db 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,6 +1,7 @@ import customization.ConfigurationFileImporter import customization.Customization.isCustomizationEnabled import customization.NormalizedFlavorSettings +import com.google.firebase.appdistribution.gradle.firebaseAppDistribution /* * Wire @@ -43,6 +44,7 @@ plugins { id(libs.plugins.wire.versionizer.get().pluginId) alias(libs.plugins.screenshot) id(libs.plugins.wire.android.navigation.get().pluginId) + alias(libs.plugins.firebase.appdistribution) apply false } repositories { @@ -64,6 +66,19 @@ private fun getFlavorsSettings(): NormalizedFlavorSettings = error(">> Error reading current flavors, exception: ${e.localizedMessage}") } +val firebaseAppDistributionCredentialsJson = System.getenv("FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON") + ?.takeIf(String::isNotBlank) +val firebaseAppDistributionCredentialsFile = firebaseAppDistributionCredentialsJson?.let { credentialsJson -> + layout.buildDirectory.file("firebase-app-distribution/service-account.json").get().asFile.apply { + parentFile.mkdirs() + writeText(credentialsJson) + } +} + +if (firebaseAppDistributionCredentialsFile != null) { + pluginManager.apply(libs.plugins.firebase.appdistribution.get().pluginId) +} + android { defaultConfig { ndk { @@ -166,6 +181,24 @@ android { } } + firebaseAppDistributionCredentialsFile?.let { credentialsFile -> + val devFirebaseAppId = getFlavorsSettings().flavorMap + .getValue("dev") + .getValue("firebase_app_id") as? String + ?: error("Missing firebase_app_id for the dev flavor") + + productFlavors.named("dev") { + firebaseAppDistribution { + appId = devFirebaseAppId + artifactType = "APK" + serviceCredentialsFile = credentialsFile.absolutePath + System.getenv("FIREBASE_APP_DISTRIBUTION_GROUPS") + ?.takeIf(String::isNotBlank) + ?.let { groups = it } + } + } + } + lint { checkReleaseBuilds = false } diff --git a/default.json b/default.json index 93ca43be74a..c82d7228cb6 100644 --- a/default.json +++ b/default.json @@ -14,7 +14,7 @@ "link_preview_enabled": true }, "dev": { - "application_id": "com.waz.zclient.dev", + "application_id": "com.wire.android.dev", "developer_features_enabled": true, "logging_enabled": true, "application_is_private_build": true, diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bd2d97b8d25..1c10492ecff 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -22,6 +22,7 @@ gms-location = "21.3.0" android-gradlePlugin = "9.0.1" desugaring = "2.1.5" firebaseBOM = "34.13.0" +firebaseAppDistribution = "5.3.0" fragment = "1.5.6" resaca = "5.0.2" metro = "1.2.1" @@ -137,6 +138,7 @@ compose-stability-analyzer = { id = "com.github.skydoves.compose.stability.analy cyclonedx = { id = "org.cyclonedx.bom", version.ref = "cyclonedx" } jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "jetbrains-compose" } androidx-baselineprofile = { id = "androidx.baselineprofile", version.ref = "benchmark-baselineprofile-plugin" } +firebase-appdistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebaseAppDistribution" } # Home-made convention plugins defined in build-logic wire-android-application = { id = "com.wire.android.application" } diff --git a/tests/testsSupport/src/androidTest/kotlin/com/wire/android/tests/support/UiAutomatorSetup.kt b/tests/testsSupport/src/androidTest/kotlin/com/wire/android/tests/support/UiAutomatorSetup.kt index 411d207c4f2..f180f10ab59 100644 --- a/tests/testsSupport/src/androidTest/kotlin/com/wire/android/tests/support/UiAutomatorSetup.kt +++ b/tests/testsSupport/src/androidTest/kotlin/com/wire/android/tests/support/UiAutomatorSetup.kt @@ -38,7 +38,7 @@ const val TIMEOUT_IN_MILLISECONDS = 20_000L object UiAutomatorSetup { - const val APP_DEV: String = "com.waz.zclient.dev.debug" + const val APP_DEV: String = "com.wire.android.dev.debug" const val APP_STAGING: String = "com.waz.zclient.dev" const val APP_BETA: String = "com.wire.android.internal" const val APP_PROD: String = "com.wire" From 58245a73da36d94dcd6392b54dfae5a9f60efeca Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Thu, 20 Aug 2026 14:18:31 +0200 Subject: [PATCH 2/8] chore: add adr for this distrib changes --- ...irebase-app-distribution-for-dev-builds.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/adr/0014-firebase-app-distribution-for-dev-builds.md diff --git a/docs/adr/0014-firebase-app-distribution-for-dev-builds.md b/docs/adr/0014-firebase-app-distribution-for-dev-builds.md new file mode 100644 index 00000000000..418e2ff5a7d --- /dev/null +++ b/docs/adr/0014-firebase-app-distribution-for-dev-builds.md @@ -0,0 +1,35 @@ +# 14. Firebase App Distribution for Dev builds + +Date: 2026-08-20 + +## Status + +Accepted + +## Context + +Firebase App Distribution validates an APK's package name against the selected Firebase Android app. +The DevDebug APK used `com.waz.zclient.dev.debug`, while the existing Firebase app used for Dev +Firebase Cloud Messaging (FCM) is registered as `com.wire.android.dev.debug` for staging. + +The existing Dev Firebase App ID and sender ID are runtime FCM configuration. Changing them solely +to upload an APK would risk changing push-notification behavior in staging. + +## Decision + +Dev's base application ID is `com.wire.android.dev`, so DevDebug builds use +`com.wire.android.dev.debug` and match the existing Firebase Android app. + +The Firebase App Distribution Gradle plugin is enabled only when CI provides its service-account +JSON, and is configured for the Dev flavor only. + +Distribution is performed by a manual GitHub Actions workflow. It can reuse the DevDebug artifact +from a successful Develop PR build, or build DevDebug from the manually selected branch. + +## Consequences + +- App Distribution and runtime FCM use the same Firebase Android app without an additional App ID + variable. +- Existing `com.waz.zclient.dev.debug` installations do not update in place; Dev builds are ephemeral anyway. +- DevRelease and other non-Debug Dev variants use `com.wire.android.dev` and are not distribution + targets unless a matching Firebase app is registered. From 517721d50d3e12539b5929430030c16e49b16a01 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Thu, 20 Aug 2026 14:30:30 +0200 Subject: [PATCH 3/8] chore: add adr for this distrib changes --- ...irebase-app-distribution-for-dev-builds.md | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 docs/adr/0014-firebase-app-distribution-for-dev-builds.md diff --git a/docs/adr/0014-firebase-app-distribution-for-dev-builds.md b/docs/adr/0014-firebase-app-distribution-for-dev-builds.md deleted file mode 100644 index 418e2ff5a7d..00000000000 --- a/docs/adr/0014-firebase-app-distribution-for-dev-builds.md +++ /dev/null @@ -1,35 +0,0 @@ -# 14. Firebase App Distribution for Dev builds - -Date: 2026-08-20 - -## Status - -Accepted - -## Context - -Firebase App Distribution validates an APK's package name against the selected Firebase Android app. -The DevDebug APK used `com.waz.zclient.dev.debug`, while the existing Firebase app used for Dev -Firebase Cloud Messaging (FCM) is registered as `com.wire.android.dev.debug` for staging. - -The existing Dev Firebase App ID and sender ID are runtime FCM configuration. Changing them solely -to upload an APK would risk changing push-notification behavior in staging. - -## Decision - -Dev's base application ID is `com.wire.android.dev`, so DevDebug builds use -`com.wire.android.dev.debug` and match the existing Firebase Android app. - -The Firebase App Distribution Gradle plugin is enabled only when CI provides its service-account -JSON, and is configured for the Dev flavor only. - -Distribution is performed by a manual GitHub Actions workflow. It can reuse the DevDebug artifact -from a successful Develop PR build, or build DevDebug from the manually selected branch. - -## Consequences - -- App Distribution and runtime FCM use the same Firebase Android app without an additional App ID - variable. -- Existing `com.waz.zclient.dev.debug` installations do not update in place; Dev builds are ephemeral anyway. -- DevRelease and other non-Debug Dev variants use `com.wire.android.dev` and are not distribution - targets unless a matching Firebase app is registered. From 8a5fcf44d6720c182e0e01bfb686ed43dfca1387 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Thu, 20 Aug 2026 14:30:47 +0200 Subject: [PATCH 4/8] chore: add adr for this distrib changes --- ...irebase-app-distribution-for-dev-builds.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 docs/adr/0014-firebase-app-distribution-for-dev-builds.md diff --git a/docs/adr/0014-firebase-app-distribution-for-dev-builds.md b/docs/adr/0014-firebase-app-distribution-for-dev-builds.md new file mode 100644 index 00000000000..b4ccf85c55b --- /dev/null +++ b/docs/adr/0014-firebase-app-distribution-for-dev-builds.md @@ -0,0 +1,34 @@ +# 14. Firebase App Distribution for Dev builds + +Date: 2026-08-20 + +## Status + +Accepted + +## Context + +We need to distribute DevDebug APKs to testers without adding App Distribution uploads to the +shared build workflow. Firebase App Distribution requires the APK package name to match the +selected Firebase Android app. + +## Decision + +Use the Firebase App Distribution Gradle plugin for the Dev flavor only. It is enabled only when +CI provides `FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON`; local builds do not create upload +tasks. + +Use a manual `Distribute Dev Build` workflow for uploads. The workflow accepts a PR number to reuse +the existing DevDebug artifact from its successful Develop PR build. Without a PR number, it builds +DevDebug from the branch selected when the workflow is dispatched. + +Dev's base application ID is `com.wire.android.dev`, so DevDebug uses +`com.wire.android.dev.debug`, matching the Firebase Android app used for distribution. + +## Consequences + +- App Distribution is opt-in and does not alter the shared build workflow. +- The Dev package-ID change does not change `firebase_app_id`, `firebase_push_sender_id`, or the + Firebase project used for push notifications. +- Existing `com.waz.zclient.dev.debug` installations do not update in place and should be treated + as ephemeral Dev installations. From 9b457427e7bb63fdd401e220e7725a3fad9f09ac Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Thu, 20 Aug 2026 15:19:41 +0200 Subject: [PATCH 5/8] chore: workflow number param --- .github/workflows/distribute-dev-firebase.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/distribute-dev-firebase.yml b/.github/workflows/distribute-dev-firebase.yml index c83d6727863..dd608766f6c 100644 --- a/.github/workflows/distribute-dev-firebase.yml +++ b/.github/workflows/distribute-dev-firebase.yml @@ -4,9 +4,9 @@ on: workflow_dispatch: inputs: pull-request: - description: "PR number whose existing DevDebug artifact should be uploaded; leave empty to build the selected branch" + description: "PR number whose existing DevDebug artifact should be uploaded, i.e. 123; leave empty to build the selected branch" required: false - type: string + type: number release-notes: description: "Help testers know what to test in this build, i.e. refactor navigation, meetings M1, etc." required: true From 3d3ba492efa1df2f2911e9e556b75e5bff8cd575 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Thu, 20 Aug 2026 15:38:46 +0200 Subject: [PATCH 6/8] chore: address pr rewview --- .github/workflows/build-unified.yml | 4 +- .github/workflows/distribute-dev-firebase.yml | 54 ++++++++++++++++--- app/build.gradle.kts | 33 ------------ ...irebase-app-distribution-for-dev-builds.md | 6 +-- gradle/libs.versions.toml | 2 - 5 files changed, 52 insertions(+), 47 deletions(-) diff --git a/.github/workflows/build-unified.yml b/.github/workflows/build-unified.yml index c83a73190df..72c6c732ae1 100644 --- a/.github/workflows/build-unified.yml +++ b/.github/workflows/build-unified.yml @@ -54,7 +54,9 @@ jobs: id: zizmor uses: zizmorcore/zizmor-action@5f14fd08f7cf1cb1609c1e344975f152c7ee938d # v0.5.6 with: - inputs: .github/workflows/build-unified.yml + inputs: | + .github/workflows/build-unified.yml + .github/workflows/distribute-dev-firebase.yml version: 1.25.2 persona: pedantic min-severity: informational diff --git a/.github/workflows/distribute-dev-firebase.yml b/.github/workflows/distribute-dev-firebase.yml index dd608766f6c..2435d4ac13b 100644 --- a/.github/workflows/distribute-dev-firebase.yml +++ b/.github/workflows/distribute-dev-firebase.yml @@ -24,7 +24,8 @@ concurrency: jobs: distribute: name: Distribute DevDebug - runs-on: ubuntu-latest + runs-on: warp-ubuntu-2404-x64-8x + timeout-minutes: 45 steps: - name: Checkout selected branch uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 @@ -38,14 +39,45 @@ jobs: with: java-version: "21" distribution: temurin - cache: gradle + + - name: Restore Gradle cache + uses: WarpBuilds/cache@40f3443ae7b70e568d6e2070ea897f3df94d7553 # v1 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Validate Gradle wrapper + uses: gradle/actions/wrapper-validation@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0 + + - name: Set up Node.js + uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.0.1 + with: + node-version: 24 - name: Resolve DevDebug APK id: apk env: GH_TOKEN: ${{ github.token }} PULL_REQUEST: ${{ inputs.pull-request }} + DATADOG_APP_ID: ${{ secrets.DATADOG_APP_ID }} + DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }} + DOMAIN_REMOVAL_KEYS_FOR_REPAIR: ${{ secrets.DOMAIN_REMOVAL_KEYS_FOR_REPAIR }} run: | + find_dev_debug_apk() { + local search_root="$1" + local -a apks + mapfile -t apks < <(find "${search_root}" -type f -path '*/apk/dev/debug/*.apk' -print) + (( ${#apks[@]} == 1 )) || { + echo "Expected exactly one DevDebug APK in ${search_root}, found ${#apks[@]}" + return 1 + } + printf '%s\n' "${apks[0]}" + } + if [[ -n "${PULL_REQUEST}" ]]; then [[ "${PULL_REQUEST}" =~ ^[0-9]+$ ]] || { echo "pull-request must be a number"; exit 1; } @@ -54,10 +86,10 @@ jobs: [[ -n "${source_run_id}" ]] || { echo "No successful Develop PR build found for PR #${PULL_REQUEST}"; exit 1; } gh run download "${source_run_id}" --repo "${GITHUB_REPOSITORY}" --name Dev-Debug-artifacts --dir downloaded-artifacts - apk_path="$(find downloaded-artifacts -type f -name '*.apk' -print -quit)" + apk_path="$(find_dev_debug_apk downloaded-artifacts)" else ./gradlew :app:assembleDevDebug - apk_path="$(find app/build/outputs/apk/dev/debug -type f -name '*.apk' -print -quit)" + apk_path="$(find_dev_debug_apk app/build/outputs)" fi [[ -n "${apk_path}" && -f "${apk_path}" ]] || { echo "DevDebug APK was not found"; exit 1; } @@ -72,8 +104,14 @@ jobs: run: | : "${FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON:?Configure the FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON repository secret}" - upload_args=(":app:appDistributionUploadDevDebug" "--artifactPath=${APK_PATH}") - if [[ -n "${RELEASE_NOTES}" ]]; then - upload_args+=("--releaseNotes=${RELEASE_NOTES}") + credentials_file="$(mktemp "${RUNNER_TEMP}/firebase-app-distribution.XXXXXX.json")" + trap 'rm -f "${credentials_file}"' EXIT + printf '%s' "${FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON}" > "${credentials_file}" + chmod 600 "${credentials_file}" + + firebase_app_id="$(jq -er '.flavors.dev.firebase_app_id | strings | select(length > 0)' default.json)" + upload_args=(appdistribution:distribute "${APK_PATH}" "--app=${firebase_app_id}" "--release-notes=${RELEASE_NOTES}" "--non-interactive") + if [[ -n "${FIREBASE_APP_DISTRIBUTION_GROUPS}" ]]; then + upload_args+=("--groups=${FIREBASE_APP_DISTRIBUTION_GROUPS}") fi - ./gradlew "${upload_args[@]}" + npx --yes firebase-tools@15.27.0 "${upload_args[@]}" diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 66b397907db..9003f9d39ef 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,7 +1,6 @@ import customization.ConfigurationFileImporter import customization.Customization.isCustomizationEnabled import customization.NormalizedFlavorSettings -import com.google.firebase.appdistribution.gradle.firebaseAppDistribution /* * Wire @@ -44,7 +43,6 @@ plugins { id(libs.plugins.wire.versionizer.get().pluginId) alias(libs.plugins.screenshot) id(libs.plugins.wire.android.navigation.get().pluginId) - alias(libs.plugins.firebase.appdistribution) apply false } repositories { @@ -66,19 +64,6 @@ private fun getFlavorsSettings(): NormalizedFlavorSettings = error(">> Error reading current flavors, exception: ${e.localizedMessage}") } -val firebaseAppDistributionCredentialsJson = System.getenv("FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON") - ?.takeIf(String::isNotBlank) -val firebaseAppDistributionCredentialsFile = firebaseAppDistributionCredentialsJson?.let { credentialsJson -> - layout.buildDirectory.file("firebase-app-distribution/service-account.json").get().asFile.apply { - parentFile.mkdirs() - writeText(credentialsJson) - } -} - -if (firebaseAppDistributionCredentialsFile != null) { - pluginManager.apply(libs.plugins.firebase.appdistribution.get().pluginId) -} - android { defaultConfig { ndk { @@ -181,24 +166,6 @@ android { } } - firebaseAppDistributionCredentialsFile?.let { credentialsFile -> - val devFirebaseAppId = getFlavorsSettings().flavorMap - .getValue("dev") - .getValue("firebase_app_id") as? String - ?: error("Missing firebase_app_id for the dev flavor") - - productFlavors.named("dev") { - firebaseAppDistribution { - appId = devFirebaseAppId - artifactType = "APK" - serviceCredentialsFile = credentialsFile.absolutePath - System.getenv("FIREBASE_APP_DISTRIBUTION_GROUPS") - ?.takeIf(String::isNotBlank) - ?.let { groups = it } - } - } - } - lint { checkReleaseBuilds = false } diff --git a/docs/adr/0014-firebase-app-distribution-for-dev-builds.md b/docs/adr/0014-firebase-app-distribution-for-dev-builds.md index b4ccf85c55b..faeead17048 100644 --- a/docs/adr/0014-firebase-app-distribution-for-dev-builds.md +++ b/docs/adr/0014-firebase-app-distribution-for-dev-builds.md @@ -14,9 +14,9 @@ selected Firebase Android app. ## Decision -Use the Firebase App Distribution Gradle plugin for the Dev flavor only. It is enabled only when -CI provides `FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON`; local builds do not create upload -tasks. +Use the Firebase CLI from the distribution workflow. CI writes +`FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON` to a temporary credentials file and passes it as +Application Default Credentials. Local builds do not include App Distribution tooling or tasks. Use a manual `Distribute Dev Build` workflow for uploads. The workflow accepts a PR number to reuse the existing DevDebug artifact from its successful Develop PR build. Without a PR number, it builds diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1c10492ecff..bd2d97b8d25 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -22,7 +22,6 @@ gms-location = "21.3.0" android-gradlePlugin = "9.0.1" desugaring = "2.1.5" firebaseBOM = "34.13.0" -firebaseAppDistribution = "5.3.0" fragment = "1.5.6" resaca = "5.0.2" metro = "1.2.1" @@ -138,7 +137,6 @@ compose-stability-analyzer = { id = "com.github.skydoves.compose.stability.analy cyclonedx = { id = "org.cyclonedx.bom", version.ref = "cyclonedx" } jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "jetbrains-compose" } androidx-baselineprofile = { id = "androidx.baselineprofile", version.ref = "benchmark-baselineprofile-plugin" } -firebase-appdistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebaseAppDistribution" } # Home-made convention plugins defined in build-logic wire-android-application = { id = "com.wire.android.application" } From 9e6ce53ac67a454558682bd919aebf1167fadecf Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Thu, 20 Aug 2026 15:43:51 +0200 Subject: [PATCH 7/8] chore: address pr rewview --- .github/workflows/distribute-dev-firebase.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/distribute-dev-firebase.yml b/.github/workflows/distribute-dev-firebase.yml index 2435d4ac13b..954b644fcb8 100644 --- a/.github/workflows/distribute-dev-firebase.yml +++ b/.github/workflows/distribute-dev-firebase.yml @@ -54,7 +54,7 @@ jobs: uses: gradle/actions/wrapper-validation@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0 - name: Set up Node.js - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.0.1 + uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 with: node-version: 24 From b8837542fe3eb74d8270818dbb9c6f8850d1e5f0 Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Thu, 20 Aug 2026 15:45:56 +0200 Subject: [PATCH 8/8] chore: address pr rewview --- .github/workflows/distribute-dev-firebase.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/distribute-dev-firebase.yml b/.github/workflows/distribute-dev-firebase.yml index 954b644fcb8..03354d9b3ad 100644 --- a/.github/workflows/distribute-dev-firebase.yml +++ b/.github/workflows/distribute-dev-firebase.yml @@ -13,9 +13,9 @@ on: type: string permissions: - actions: read - contents: read - pull-requests: read + actions: read # required to find and download DevDebug artifacts from PR build runs + contents: read # required to check out the selected branch + pull-requests: read # required to resolve the PR head commit concurrency: group: firebase-app-distribution-dev-${{ inputs.pull-request || github.ref }}