summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2013-09-18 11:49:56 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 23:45:06 +0200
commit5a7da37be5054020b8a964162d83b37e86ee2175 (patch)
tree721b39591edf9924918761dd44437af720adbd74 /mkspecs
parente4f1d83b6ac0e1462160907cf44bb6532652ef76 (diff)
Android: Let ANDROID_API_VERSION env var take precedence
If you specify ANDROID_API_VERSION to override the default API versions used for building the jar files, this should take precedence even when the .pro files specify a different default API version (like QtAccessibility does when it sets the default to android-16.) Otherwise it's impossible to override these defaults. Change-Id: Idef98aaf3b51490bd7ced8c53770ee2f5680b1db Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/java.prf10
1 files changed, 5 insertions, 5 deletions
diff --git a/mkspecs/features/java.prf b/mkspecs/features/java.prf
index 7815b5ef38..265ab11fea 100644
--- a/mkspecs/features/java.prf
+++ b/mkspecs/features/java.prf
@@ -2,17 +2,17 @@ TEMPLATE = lib
android {
isEmpty(SDK_ROOT): SDK_ROOT = $$(ANDROID_SDK_ROOT)
isEmpty(SDK_ROOT): SDK_ROOT = $$DEFAULT_ANDROID_SDK_ROOT
- isEmpty(API_VERSION) {
- API_VERSION = $$(ANDROID_API_VERSION)
- isEmpty(API_VERSION): API_VERSION = android-10
- }
+
+ API_VERSION_TO_USE = $$(ANDROID_API_VERSION)
+ isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = $$API_VERSION
+ isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-10
isEmpty(BUILD_TOOLS_REVISION) {
BUILD_TOOLS_REVISION = $$(ANDROID_BUILD_TOOLS_REVISION)
isEmpty(BUILD_TOOLS_REVISION): BUILD_TOOLS_REVISION = 17.0.0
}
- ANDROID_JAR_FILE = $$SDK_ROOT/platforms/$$API_VERSION/android.jar
+ ANDROID_JAR_FILE = $$SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar
!exists($$ANDROID_JAR_FILE) {
error("The Path $$ANDROID_JAR_FILE does not exist. Make sure the ANDROID_SDK_ROOT and ANDROID_API_VERSION environment variables are correctly set.")
}