Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] Allow overriding abi from IDE
Browse files Browse the repository at this point in the history
- This allows to build a different architecture then the default for a device, for example armeabi-v7a instead of arm64-v8a (which allows for better stack traces usually)
- Set in compiler > command-line options: -Pmapbox.abis=...
  • Loading branch information
ivovandongen committed Aug 9, 2017
1 parent f4f4d13 commit cf0dc1c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions platform/android/MapboxGLAndroidSDK/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@ android {
// to invoke the Java tests. When we explicitly specify an ABI of 'none', no native dependencies are
// added. When another ABI is specified explicitly, we're just going to build that ABI. In all other
// cases, all ABIs are built.
// When invoking from the command line, set `-Pmapbox.abis=...` to only build the desired architectures.
//
// When invoking from the command line or to override the device default, set `-Pmapbox.abis=...` to
// only build the desired architectures.
//
// When building from Android Studio, gradle.properties sets `android.buildOnlyTargetAbi=true` so that
// only the architecture for the device you're running on gets built.
def abi = 'all'
if (!project.hasProperty('android.injected.invoked.from.ide')) {
if (!project.hasProperty('android.injected.invoked.from.ide') || project.hasProperty("mapbox.abis")) {
// Errors when the user invokes Gradle from the command line and didn't set mapbox.abis
abi = project.getProperty("mapbox.abis")
}
Expand Down

0 comments on commit cf0dc1c

Please sign in to comment.