summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2016-07-01 13:01:05 +0200
committerIvo van Dongen <info@ivovandongen.nl>2016-07-07 10:08:45 +0200
commit2769a9db946c314c0f2f3fd2905cbfbcb69d0da9 (patch)
tree01c55138c0d986d188afa2bf5d3c613a73fb9e69
parent433378ee66ffbf64edc39eb930430b48958bfa50 (diff)
downloadqtlocation-mapboxgl-2769a9db946c314c0f2f3fd2905cbfbcb69d0da9.tar.gz
[android] #5456 - Add test for dx before using it.
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c4cc0514b3..4ba0ab0974 100644
--- a/Makefile
+++ b/Makefile
@@ -167,6 +167,7 @@ idocument:
ANDROID_ENV = platform/android/scripts/toolchain.sh
ANDROID_ABIS = arm-v5 arm-v7 arm-v8 x86 x86-64 mips
ANDROID_LOCAL_WORK_DIR = /data/local/tmp/core-tests
+ANDROID_DX := $(shell command -v dx 2> /dev/null)
define ANDROID_RULES
build/android-$1/config.gypi: platform/android/scripts/configure.sh $(CONFIG_DEPENDENCIES)
@@ -184,6 +185,9 @@ android-lib-$1: build/android-$1/Makefile
cd platform/android && ./gradlew --parallel --max-workers=$(JOBS) assemble$(BUILDTYPE)
test-android-core-$1: android-test-lib-$1
+ ifndef ANDROID_DX
+ $$(error "dx not found. Install android build tools (sdk) and make sure it's on the path")
+
# Compile main sources and extract the classes (using the test app to get all transitive dependencies in one place)
cd platform/android && ./gradlew assembleDebug
unzip -o platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/MapboxGLAndroidSDKTestApp-debug.apk classes.dex -d build/android-$1