diff options
Diffstat (limited to 'mkspecs/features/java.prf')
-rw-r--r-- | mkspecs/features/java.prf | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/mkspecs/features/java.prf b/mkspecs/features/java.prf index 790724cec9..1c55b8974e 100644 --- a/mkspecs/features/java.prf +++ b/mkspecs/features/java.prf @@ -1,24 +1,10 @@ TEMPLATE = lib android { - isEmpty(SDK_ROOT): SDK_ROOT = $$(ANDROID_SDK_ROOT) - isEmpty(SDK_ROOT): SDK_ROOT = $$DEFAULT_ANDROID_SDK_ROOT - 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_REVISIONS = $$files($$SDK_ROOT/build-tools/*) - for (REVISION, BUILD_TOOLS_REVISIONS) { - BASENAME = $$basename(REVISION) - greaterThan(BASENAME, $$BUILD_TOOLS_REVISION): BUILD_TOOLS_REVISION = $$BASENAME - } - } - } - - ANDROID_JAR_FILE = $$SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar + ANDROID_JAR_FILE = $$ANDROID_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.") } @@ -69,12 +55,12 @@ android:!bundled_jar_file { # of the base sdk folder. # Doing it this way makes this logic more similar to the other platforms and # also means that our dx.bat is more like Google's dx.bat - DEX_BAT = $$SDK_ROOT/platform-tools/dx.bat - !exists($$DEX_BAT): DEX_BAT = $$SDK_ROOT/build-tools/$$BUILD_TOOLS_REVISION/dx.bat + DEX_BAT = $$ANDROID_SDK_ROOT/platform-tools/dx.bat + !exists($$DEX_BAT): DEX_BAT = $$ANDROID_SDK_ROOT/build-tools/$$ANDROID_SDK_BUILD_TOOLS_REVISION/dx.bat DEX_CMD = $$PWD/data/android/dx $$DEX_BAT } else { - DEX_CMD = $$SDK_ROOT/platform-tools/dx - !exists($$DEX_CMD): DEX_CMD = $$SDK_ROOT/build-tools/$$BUILD_TOOLS_REVISION/dx + DEX_CMD = $$ANDROID_SDK_ROOT/platform-tools/dx + !exists($$DEX_CMD): DEX_CMD = $$ANDROID_SDK_ROOT/build-tools/$$ANDROID_SDK_BUILD_TOOLS_REVISION/dx !exists($$DEX_CMD): error("The path $$DEX_CMD does not exist. Please set the environment variable ANDROID_BUILD_TOOLS_REVISION to the revision of the build tools installed in your Android SDK.") } QMAKE_LINK_SHLIB_CMD = $$DEX_CMD --dex --output $(TARGET) $$CLASS_DIR |