refactor(native): flatten "official" naming across Android, iOS, CI#7325
refactor(native): flatten "official" naming across Android, iOS, CI#7325diegolmello wants to merge 1 commit into
Conversation
With Experimental removed, the "official" qualifier no longer disambiguates.
Drop it from build configs, fastlane lanes, workflow/artifact names, and
asset paths so variants collapse back to RN canonical defaults.
Android: drop the `app` flavor dimension and `productFlavors { official }`
block; merge `src/official/` resources into `src/main/` (bootsplash, launcher
icons, sharedUserId manifest). AAB/APK paths return to
`outputs/bundle/release/app-release.aab` and `outputs/apk/release/app-release.apk`.
iOS: rename `Official.xcassets` → `Assets.xcassets`; fastlane `build_official`
+ `build_official_simulator` lanes collapse to `build` + `build_simulator`.
CI: `build-official-{android,ios}.yml` → `build-{android,ios}.yml`;
artifact pairs `android-aab-official`/`Android Official APK` → `android-aab`/
`Android APK`; `ios-build-official-*` → `ios-build-*`. `build_name: 'android-official'`
input → `'android'`. Maestro `run-maestro.sh` adb-installs `app-release.apk`.
Secret names (`KEYSTORE_OFFICIAL_*`, `BUGSNAG_KEY_OFFICIAL`,
`GOOGLE_SERVICES_IOS_OFFICIAL`) and GH environment names
(`official_{android,ios}_build`, `upload_official_{android,ios}`) kept
permanently per ADR 0007.
Refs NATIVE-1129
WalkthroughThis PR removes the "official" build variant from the Rocket.Chat mobile application across Android and iOS, consolidating all builds to standard release variants. Changes include removing Gradle product flavors, renaming Fastlane lanes, updating GitHub Actions workflows, changing iOS asset catalogs, and updating npm scripts and documentation to reflect the new build structure. ChangesOfficial Build Variant Removal and Consolidation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Android Build Available Rocket.Chat 4.72.0.108885 Internal App Sharing: https://play.google.com/apps/test/RQQ8k09hlnQ/ahAO29uNR3wkUnHetxj8nXAs8rCtSfxwNJ6sISAEA7py7hcCdkZXhby4_dIFSZ2_UulijJ5-3SFrAnhedFHDIMylbW |
diegolmello
left a comment
There was a problem hiding this comment.
Code review — flatten "official" naming (PR4 of 4)
Verdict: ship
Clean mechanical rename. Single commit, scoped tightly to PR4's stated goal; no PR3 bleed-through. Every call-site updated in lockstep (Fastlane lanes, workflows, composite actions, artifact upload/download pairs, Maestro APK install, package.json scripts, pbxproj UUIDs, asset catalog rename). The intentional-keep list (KEYSTORE_OFFICIAL_*, BUGSNAG_KEY_OFFICIAL, GOOGLE_SERVICES_IOS_OFFICIAL, official_*/upload_official_* GH environments) is respected exactly — and tracked for follow-up per ADR 0007.
Verifications performed
- Acceptance grep:
rg -i 'official'overandroid/,package.json, build workflows, composite actions,run-maestro.sh,.maestro/README.md,README.mdreturns only keep-list entries. - Repo-wide residue:
git grepforIS_OFFICIAL,isOfficial,officialRelease,app-official-release,Official.xcassets,src/official,productFlavor,--mode=officialDebug,bundle exec fastlane … build_official,android-aab-official,ios-build-official*,Android Official APK,Build Android Official,build_name: 'android-official'→ zero hits outside the keep-list. - Android resource merge:
src/official/res/values/{colors,strings}.xmlmoved tosrc/main/. At PR3 base, those files did NOT exist insrc/main/(only insrc/official/), so no symbol collision on merge.app_name,share_extension_name,primary_dark,splashBackground,notification_textare uniquely defined. - Android launcher icon:
src/main/ic_launcher-web.pngcorrectly replaced (40966 → 19371 bytes — the official artwork was promoted, not the original non-flavor one kept). - Android manifest:
sharedUserId="chat.rocket.android"correctly hoisted fromsrc/official/AndroidManifest.xmltosrc/main/AndroidManifest.xml. Emptysrc/experimental/is gone (was removed in PR3). build.gradle:flavorDimensions "app"+productFlavors { official }removed cleanly; no remaining flavor-qualified task names (bundleOfficialRelease,assembleOfficialRelease) anywhere in CI.- package.json scripts:
--mode=officialDebugdropped fromandroidandandroid-whitelabel. No other script depends on the dropped flavor. - APK / AAB paths:
bundle/release/app-release.aabpropagates throughandroid/fastlane/Fastfile(×3 lanes),build-android/action.yml(Bugsnag upload + artifact upload),upload-android/action.yml,upload-internal-android/action.yml. E2E now producesapk/release/app-release.apkandrun-maestro.shadb-installs the matching name. - iOS
Official.xcassets→Assets.xcassetsrename (27 files): All four pbxproj sites (PBXBuildFile×3,PBXFileReference×1,PBXGroupchild, twoPBXResourcesBuildPhaseentries) updated; UUIDs preserved. On-disk path isios/Assets.xcassets(groupRocketChatRNhas nopath, so<group>resolves toios/). The Widget/Watch target keeps bothAssets.xcassetsreferences (its ownios/RocketChat Watch App/Assets.xcassets+ the renamed top-level one) — same arrangement as pre-PR (where it wasOfficial.xcassets+ Watch'sAssets.xcassets). Asset-set names don't collide (top-level has AppIcon/LaunchScreenIcon/splashBackgroundColor; Watch has channel-/teams-/discussions/message), so the mergedAssets.caris identical to pre-PR. - Artifact rename lockstep:
android-aab-official → android-aab(upload inbuild-android/action.yml; download in bothupload-android/action.ymlandupload-internal-android/action.yml).ios-build-official* → ios-build*(upload inbuild-ios/action.yml; download inupload-ios/action.yml).Android Official APK → Android APK(upload ine2e-build-android.yml; download inmaestro-android.yml).build_name: 'android-official' → 'android'and'ios-official' → 'ios'— passed as inputs, not compared against the old literal anywhere. - Fastlane lane callers:
build_official → buildandbuild_official_simulator → build_simulatorare only invoked from.github/actions/build-ios/action.ymland.github/workflows/e2e-build-ios.yml— both updated.official_open_testing → open_testingis only invoked from.github/actions/upload-android/action.yml— updated. No README/docs left over. - Docs:
.maestro/README.mdupdates the gradle command and (correctly) drops the dangling "iOS Production Build (Simulator)" block that referenced the now-deletedbuild_experimental_simulatorlane.README.mdremoves "Experimental versions" reference.ios/fastlane/README.mdregenerated (cosmetic + lane renames).
Findings
None of severity ≥ minor. The diff is a textbook stacked-rename: 103 +/109 - across 74 files, all 1:1 substitutions with consistent before/after.
Notes for follow-up (not blockers; already tracked in PR body)
- GH environment names (
official_android_build,upload_official_android,official_ios_build,upload_official_ios) remain — explicitly tracked under "TBD" in the PR body, requires repo-admin to rename in Settings → Environments. - ADR 0007 documents the permanent retention of
*_OFFICIALsecret names (no GH rename API).
LGTM.
Proposed changes
With the Experimental variant no longer in the codebase, the
officialqualifier no longer disambiguates anything. This PR flattens it across Android, iOS, and CI so variants collapse back to React Native canonical defaults.TBD: Follow-up: drop
official_prefix from GitHub environment namesMechanical CI cleanup. Needs repo-admin access to rename envs in GitHub Settings → Environments (GH's env rename preserves approval rules + bound secrets, so no secret re-entry needed). Secrets stay under their existing
*_OFFICIALnames.official_android_build→android_buildupload_official_android→upload_androidofficial_ios_build→ios_buildupload_official_ios→upload_iosenvironment:refs in.github/workflows/build-android.yml(lines 16, 61)environment:refs in.github/workflows/build-ios.yml(lines 16, 62)experimental_android_build,experimental_ios_build,upload_experimental_android,upload_experimental_ios,build_experimental_android,build_official_androidSafe rollout: rename envs first (workflow
environment:refs become invalid until the YAML PR lands, but no PR is blocked because the rename is instant); land the YAML PR within the same maintenance window.Android
flavorDimensions "app"andproductFlavors { official }fromandroid/app/build.gradle— variants collapse todebug/release.android/app/src/official/resources intosrc/main/(bootsplash images, launcher icons,colors.xml/strings.xml,sharedUserIdmanifest attr). Also delete the emptysrc/experimental/directory.package.jsonscripts: drop--mode=officialDebug.android/fastlane/Fastfile: laneofficial_open_testing→open_testing; AAB pathbundle/officialRelease/app-official-release.aab→bundle/release/app-release.aab.build-official-android.yml→build-android.yml; job namesBuild Android Official→Build Android; artifactandroid-aab-official→android-aab(upload+download in lockstep);Android Official APK→Android APK;build_name: 'android-official'input →'android'.run-maestro.shadb-installsapp-release.apk;.maestro/README.mdupdates the release-build command.iOS
ios/Official.xcassets→ios/Assets.xcassets(27 files viagit mv, UUIDs preserved inproject.pbxproj).ios/fastlane/Fastfile:build_official+build_official_simulatorlanes collapse tobuild+build_simulator(lane bodies byte-identical apart from the name).build-official-ios.yml→build-ios.yml; artifactsios-build-official/-dSYM/-info-plist→ios-build/-dSYM/-info-plist.What is intentionally kept
Secret names retain the
OFFICIALsuffix — GitHub has no secret-rename API, so dropping the suffix would require delete-and-recreate with custody of every original value (keystore base64, bugsnag keys, signing passwords).KEYSTORE_OFFICIAL_*,BUGSNAG_KEY_OFFICIAL,GOOGLE_SERVICES_IOS_OFFICIALGitHub environment names (
official_android_build,official_ios_build,upload_official_android,upload_official_ios) are kept in this PR; a follow-up rename is tracked under Further comments.Issue(s)
Depends on chore: delete Experimental code paths and assets #7322
chore: stop publishing Experimental app #7321
chore: begin Experimental app sunset #7320
How to test or reproduce
Local
yarn androidbuilds and launches on emulator with no--mode=officialDebug; APK signature matcheschat.rocket.reactnative(uninstall any stale install signed by a different debug keystore first).yarn iosbuilds and launcheschat.rocket.ioson simulator.CI
build-android.ymlandbuild-ios.ymljobs pass on the PR (after environment approvals).Android APKartifact atoutputs/apk/release/app-release.apk;maestro-android.ymldownloads it under the new name.Screenshots
N/A — CI/build-infra refactor with no UI surface.
Types of changes
Checklist
Further comments