summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-08-09 15:39:19 +0300
committerIvo van Dongen <ivovandongen@users.noreply.github.com>2017-08-09 16:18:25 +0300
commitcf0dc1c9e796e43565bfa953d734481f3d18d059 (patch)
tree10418cca4b4bba78b0235b29ec8076349b53e9b6
parentf4f4d13b70cfc26e44c7cbc679acbe9609ae2936 (diff)
downloadqtlocation-mapboxgl-cf0dc1c9e796e43565bfa953d734481f3d18d059.tar.gz
[android] Allow overriding abi from IDE
- 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=...
-rw-r--r--platform/android/MapboxGLAndroidSDK/build.gradle7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle
index 5e7025c4c8..025097e756 100644
--- a/platform/android/MapboxGLAndroidSDK/build.gradle
+++ b/platform/android/MapboxGLAndroidSDK/build.gradle
@@ -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")
}