Skip to content

Commit

Permalink
Add ability to force include x86 libs
Browse files Browse the repository at this point in the history
  • Loading branch information
seadowg committed Jul 25, 2022
1 parent 4621c4f commit f6f23af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ Certain functions in ODK Collect depend on cloud services that require API keys
```
4. Create a new secret token with the "DOWNLOADS:READ" secret scope and then add it to `secrets.properties` as `MAPBOX_DOWNLOADS_TOKEN`.
*Note: Mapbox will not be available as an option in compiled versions of Collect unless you follow the steps above. Mapbox will also not be available on x86 devices as the native libraries are excluded to reduce the APK size.*
*Note: Mapbox will not be available as an option in compiled versions of Collect unless you follow the steps above. Mapbox will also not be available on x86 devices as the native libraries are excluded to reduce the APK size. If you need to use an x86 device, you can force the build to include x86 libs by include the `x86Libs` Gradle parameter. For example, to build a debug APK with x86 libs: `./gradlew assembleDebug -Px86Libs`.*
## Debugging JavaRosa
Expand Down
14 changes: 8 additions & 6 deletions collect_app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,14 @@ android {
// abiFilters to exclude any ABIs; but to keep the APK slim, we include
// the Mapbox native library only for 32-bit and 64-bit ARM devices and
// omit it for all X86 devices.
exclude 'lib/x86/libmapbox-maps.so'
exclude 'lib/x86/libmapbox-common.so'
exclude 'lib/x86/libc++_shared.so'
exclude 'lib/x86_64/libmapbox-maps.so'
exclude 'lib/x86_64/libmapbox-common.so'
exclude 'lib/x86_64/libc++_shared.so'
if (!project.hasProperty("x86Libs")) {
exclude 'lib/x86/libmapbox-maps.so'
exclude 'lib/x86/libmapbox-common.so'
exclude 'lib/x86/libc++_shared.so'
exclude 'lib/x86_64/libmapbox-maps.so'
exclude 'lib/x86_64/libmapbox-common.so'
exclude 'lib/x86_64/libc++_shared.so'
}
}

compileOptions {
Expand Down

0 comments on commit f6f23af

Please sign in to comment.