From fdb18d8f18c31d7c67924a8fa539f04afd399fc3 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Sun, 28 Jun 2026 01:57:44 +0000 Subject: [PATCH] fix(android): address fdroid review feedback Co-authored-by: Anton Lazarev <22821309+antonok-edm@users.noreply.github.com> --- docs/android.md | 6 +++--- docs/release.md | 2 +- packages/app/app.config.js | 21 ++++++++------------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/docs/android.md b/docs/android.md index 99a0f2ee62..232d8af292 100644 --- a/docs/android.md +++ b/docs/android.md @@ -18,10 +18,10 @@ EAS profiles: `development`, `production`, and `production-apk` in `packages/app `packages/app/app.config.js` derives Android `versionCode` from the package version with: ```text -1_000_000 + major * 1_000_000 + minor * 1_000 + patch +major * 1_000_000 + minor * 1_000 + patch ``` -Prerelease metadata is ignored, so `0.1.102-beta.1` and `0.1.102` both produce `1001102`. The same value is used as the iOS `buildNumber` because `packages/app/eas.json` uses EAS's local app version source. The `1_000_000` floor keeps the local formula above prior EAS remote counters during the transition. Do not re-enable EAS remote version counters or Android `autoIncrement`; F-Droid and other source-based builders need the native build number to be visible in the repo. +Prerelease metadata is ignored, so `0.1.102-beta.1` and `0.1.102` both produce `1102`. The same value is used as the iOS `buildNumber` because `packages/app/eas.json` uses EAS's local app version source. Do not re-enable EAS remote version counters or Android `autoIncrement`; F-Droid and other source-based builders need the native build number to be visible in the repo. The formula reserves three digits each for minor and patch. If either reaches `1000`, change the formula before cutting that release. @@ -61,7 +61,7 @@ cd android ./gradlew assembleRelease ``` -That env var is intentionally narrow. It enables `expo.autolinking.android.buildFromSource: [".*"]` so Expo modules are built from source instead of linked from precompiled AARs, and it applies `expo-gradle-jvmargs` with `-Xmx4096m` and `-XX:MaxMetaspaceSize=1024m` for the larger source build. Normal local and EAS builds leave those settings off. +That env var is intentionally narrow. It enables `expo.autolinking.android.buildFromSource: [".*"]` so Expo modules are built from source instead of linked from precompiled AARs. Paseo always applies `expo-gradle-jvmargs` with `-Xmx4096m` and `-XX:MaxMetaspaceSize=1024m` so local Expo prebuilds have enough Gradle heap whether they use precompiled AARs or source-built Expo modules. ### React version lockstep diff --git a/docs/release.md b/docs/release.md index bd572bb6a3..90dd263e3d 100644 --- a/docs/release.md +++ b/docs/release.md @@ -188,7 +188,7 @@ iOS and Android store builds are not in `.github/workflows`. They are triggered - **iOS (TestFlight + App Store)** — EAS builds with profile `production`, uploads to TestFlight, and a Fastlane lane submits the build for App Store review. - **Android APK (GitHub Release asset)** — separate, via `.github/workflows/android-apk-release.yml`. This is the only Android-related workflow that lives in this repo. -EAS uses the local app version source. `packages/app/app.config.js` derives Android `versionCode` and iOS `buildNumber` from the package version as `1_000_000 + major * 1_000_000 + minor * 1_000 + patch`, ignoring prerelease metadata. Rebuilding the same tag produces the same native build number; if a store has already accepted a binary and you need a different binary, cut a new patch instead of relying on EAS remote auto-increment. +EAS uses the local app version source. `packages/app/app.config.js` derives Android `versionCode` and iOS `buildNumber` from the package version as `major * 1_000_000 + minor * 1_000 + patch`, ignoring prerelease metadata. Rebuilding the same tag produces the same native build number; if a store has already accepted a binary and you need a different binary, cut a new patch instead of relying on EAS remote auto-increment. There is no `release-mobile.yml` in this repo. Earlier versions of these docs referenced one — that workflow was removed and the EAS GitHub app handles tag triggering directly. diff --git a/packages/app/app.config.js b/packages/app/app.config.js index 7409ee2883..cf798d5416 100644 --- a/packages/app/app.config.js +++ b/packages/app/app.config.js @@ -3,7 +3,6 @@ const path = require("node:path"); const pkg = require("./package.json"); const appVariant = process.env.APP_VARIANT ?? "production"; const isFdroidBuild = process.env.PASEO_FDROID_BUILD === "1"; -const nativeBuildVersionFloor = 1_000_000; function getNativeBuildVersionCode(version) { const match = /^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(version); @@ -20,7 +19,7 @@ function getNativeBuildVersionCode(version) { throw new Error(`Cannot derive collision-free Android versionCode from version: ${version}`); } - const versionCode = nativeBuildVersionFloor + major * 1_000_000 + minor * 1_000 + patch; + const versionCode = major * 1_000_000 + minor * 1_000 + patch; if (!Number.isSafeInteger(versionCode) || versionCode <= 0 || versionCode > 2_100_000_000) { throw new Error(`Derived Android versionCode is out of range: ${versionCode}`); @@ -164,6 +163,13 @@ export default { }, ], "expo-audio", + [ + "expo-gradle-jvmargs", + { + xmx: "4096m", + maxMetaspace: "1024m", + }, + ], [ "expo-build-properties", { @@ -175,17 +181,6 @@ export default { }, }, ], - ...(isFdroidBuild - ? [ - [ - "expo-gradle-jvmargs", - { - xmx: "4096m", - maxMetaspace: "1024m", - }, - ], - ] - : []), ], experiments: { typedRoutes: true,