Repository navigation
fix(ci): install the pinned Android SDK CMake in the release build - #1113
Merged
Merged
Conversation
added 2 commits
October 31, 2026 20:53
The master release build failed in `Build standalone release APK` with [CXX1300] CMake '3.30.4' was not found in SDK, PATH, or by cmake.dir property. `econoflow-mobile/android/gradle.properties` pins `android.cmakeVersion=3.30.4` and Expo's root project plugin assigns it straight to `externalNativeBuild.cmake.version` on every module, so AGP requires exactly that CMake. The ubuntu-latest image only ships SDK CMake 3.31.5, and the job installed nothing, so `configureCMakeRelWithDebInfo` failed for the app and for react-native-screens. Release.yml now installs the pinned version via sdkmanager before Gradle runs, reading the version from gradle.properties so the two cannot drift, and fails early (instead of at compile time) if the pin ever disappears. cra-compliance.test.mjs gains a policy test asserting that the pin still exists and that the release workflow installs exactly that SDK CMake version; it was red before the workflow change.
The version the release build must install was only recorded in `econoflow-mobile/android/gradle.properties`, which is gitignored: `android/` is regenerated by `expo prebuild`, so the value lives there but its source of truth did not, and a policy test reading it passes locally and fails on a fresh checkout. `app.json` now passes `cmakeVersion` to `./plugins/with-detox-android`, and the plugin writes it into the generated gradle.properties (defaulting to the previous 3.30.4 when the argument is absent, so a bare plugin entry keeps working). The release workflow keeps reading the generated file after prebuild, and `scripts/cra-compliance.test.mjs` asserts the pin at its source in app.json. setup.md records that the pin now comes from app.json.
FelipePSoares
force-pushed
the
install-pinned-android-cmake
branch
from
October 31, 2026 19:57
8cbb810 to
a32b507
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The release pipeline failed on master in the
Releaseworkflow, jobandroid-build, step Build standalone release APK (run 41234254542):Root cause
The build pins the CMake version through
android.cmakeVersion(written byplugins/with-detox-android.jsinto the generatedgradle.properties). That is not a preference: Expo'sExpoRootProjectPluginassigns it to every module —android.externalNativeBuild.cmake.version = cmakeVersion— so AGP looks for exactly
cmake/3.30.4in the SDK. Theubuntu-latestrunner image only ships SDK CMake 3.31.5, and the job never ransdkmanager, soconfigureCMakeRelWithDebInfofailed for the app and forreact-native-screens.Fix
1. The release workflow installs the pinned CMake (
.github/workflows/Release.yml): a new step betweenexpo prebuildand the Gradle build —gradle.properties, which exists by then, instead of repeating it;cmake;<version>viasdkmanager;test -x …/bin/cmake) and printscmake --version.2. The pin gets a tracked source of truth (
econoflow-mobile/app.json): the version now lives inapp.jsonas thecmakeVersionargument of./plugins/with-detox-android, and the plugin writes it intogradle.properties(keeping3.30.4as its default).android/is gitignored and regenerated byexpo prebuild, so a policy test readinggradle.propertiesalone is green locally and red on a fresh checkout — this puts the value somewhere a test and a reviewer can see it.Tests
scripts/cra-compliance.test.mjs—the release workflow installs the CMake version the Android build is pinned to— asserts the pin at its source (app.json), that the workflow runssdkmanager, readsandroid.cmakeVersion, and installs"cmake;${CMAKE_VERSION}".It was red before the change, for the same reason CI failed:
.github/workflows/Release.yml never runs sdkmanager…app.json no longer runs ./plugins/with-detox-android…Verification
node scripts/cra-compliance.test.mjsnode scripts/npm-override-freshness.test.mjscd econoflow-mobile && npm testnpm run typecheck/npm run lintnpx expo config --type prebuildNo backend or frontend code touched.