Skip to content

Commit 1f4a68d

Browse files
committed
ci: prebuild the example Android project before the Gradle test
The example is an Expo CNG app — its android/ project is generated, not committed (example/my-app/.gitignore), so the Gradle step failed in CI with "working directory .../example/my-app/android: No such file or directory". Add an `npx expo prebuild --platform android --no-install` step so the android/ project (and the autolinked :react-native-nitro-healthkit subproject) exists before ./gradlew runs. Verified locally that prebuild generates android/gradlew and expo-modules-autolinking resolves the module with packageImportPath `import com.margelo.nitro.healthkit.NitroHealthkitPackage;`.
1 parent b1c92eb commit 1f4a68d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ jobs:
7171
working-directory: example/my-app
7272
run: npm ci
7373

74+
# The example is an Expo CNG app — its android/ project is generated, not
75+
# committed (see example/my-app/.gitignore). Generate it so the library is
76+
# autolinked as the `:react-native-nitro-healthkit` Gradle subproject.
77+
- name: Prebuild example Android project
78+
working-directory: example/my-app
79+
run: npx expo prebuild --platform android --no-install
80+
env:
81+
EXPO_NO_TELEMETRY: "1"
82+
7483
- name: Gradle :react-native-nitro-healthkit:test
7584
working-directory: example/my-app/android
7685
run: ./gradlew :react-native-nitro-healthkit:test --no-daemon

0 commit comments

Comments
 (0)