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.
Description
This PR fixes non-eas expo Android builds.
To create a non-eas expo build, users first run
npx expo prebuild
which generates native android and ios files. At this point the project is no longer considered a managed expo project but a bare react native project. This bare react native project has its native files already fully configured by expo prebuild (i.e. the admob app ID is already present in the AndroidManifest.xml file).In this scenario we also want the custom configuration workflow to bail out, however, our expo detection does no longer work.
Before this PR, building such a fully configured bare react native android project failed, because our build.gradle script assumed the project is a bare react native project and still requires configuration. The custom config workflow build.gradle script then tries to obtain the relevant config keys from the app.json file which fails with the error message reported in #620.Edit: while this PR indeed fixes the linked issue, I'm not fully sure the second half of my explanation above is correct. Converted this to a draft while thinking about it.
Edit2: This PR only works because of a bug. The android and ios file paths in the build.gradle file are wrong. This is only affecting the error messages shown for incorrectly configured projects (hence I never noticed this issue). Correctly configured projects are not affected.
Related issues
Checklist
and followed the process outlined there for submitting PRs.
Android
iOS
e2e
tests added or updated in__tests__e2e__
jest
tests added or updated in__tests__
Test Plan
app.config.js
file to include a valid admob id, rannpx expo prebuild --clean
and then successfully built and ran the app viayarn android