feat: allow to enable abi splitting via env var for local builds #511
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.
EAS_BUILD_ENABLE_ABI_SPLITTING
enables abi splitting for all abisEAS_BUILD_ABI_LIST
lets you select which abis to build (e.g. "armeabi-v7a,arm64-v8a"Why
In the early phases of development (especially in hobby projects), you end up sending around your apks quite a bit.
The more features you add, the bigger your apks become and it is quite cumbersome to send them around easily.
Abi splitting helps in that regard by only including the abi that is needed.
It was also requested here: https://expo.canny.io/feature-requests/p/build-only-one-abi-during-development-android-only
How
I edited the gradle file to include an abi split section when some env vars are set.
For later it would be obviously better to have that setting anchored in the eas.json schema. But for now, env vars were the simple simultion. If somone tells me, where the settings are read, we could translate it to an env there (?)
Test Plan
Simply pass the corresponding env vars in your eas.json:
And then do a local build. When only using a single abi, the resulting apk should be places as usual into your output dir. When specifying multple abis, a tar.gz package with all abis is created instead