Android: remove support for local/debug deployment
This removes the pre-dexed JAR files activated by the absence of the bundled_jar_file CONFIG option, as versions of Android >= 5 no longer support this deployment mechanism. Now, the "bundled" JARs simply become normal JARs containing class files, and are neither activated by a bundled_jar_file CONFIG entry nor do they have a -bundled suffix in the file's base name. Task-number: QTBUG-62995 Change-Id: I3fa6819259be365b7a697f7db1d1d01a94032395 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
This commit is contained in:
parent
0fcb6c26c1
commit
cab060631c
@ -7,10 +7,8 @@ android {
|
||||
CONFIG += android_app
|
||||
}
|
||||
|
||||
isEmpty(CLASS_DIR) {
|
||||
bundled_jar_file: CLASS_DIR = .classes.bundled
|
||||
else: CLASS_DIR = .classes
|
||||
}
|
||||
isEmpty(CLASS_DIR): \
|
||||
CLASS_DIR = .classes
|
||||
|
||||
CONFIG -= qt
|
||||
|
||||
@ -39,26 +37,7 @@ QMAKE_LIBS =
|
||||
QMAKE_LIBS_OPENGL_ES2 =
|
||||
QMAKE_LIBDIR =
|
||||
QMAKE_EXTENSION_SHLIB = jar
|
||||
|
||||
# Override linker with dex (for distributable Android archives) or jar (for other java builds)
|
||||
android:!bundled_jar_file {
|
||||
contains(QMAKE_HOST.os, Windows) {
|
||||
# The location where dx.bat expects itself to be found is used as the landmark instead
|
||||
# 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 = $$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 = $$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
|
||||
} else {
|
||||
QMAKE_LINK_SHLIB_CMD = jar cf $(TARGET) -C $$CLASS_DIR .
|
||||
}
|
||||
QMAKE_LINK_SHLIB_CMD = jar cf $(TARGET) -C $$CLASS_DIR .
|
||||
|
||||
# Force link step to always happen, since we are always updating the
|
||||
# .class files
|
||||
|
@ -1,3 +0,0 @@
|
||||
TARGET = QtAndroid-bundled
|
||||
CONFIG += bundled_jar_file
|
||||
include(jar.pri)
|
@ -1,2 +0,0 @@
|
||||
TARGET = QtAndroid
|
||||
include(jar.pri)
|
@ -1,26 +0,0 @@
|
||||
CONFIG += java
|
||||
DESTDIR = $$[QT_INSTALL_PREFIX/get]/jar
|
||||
API_VERSION = android-16
|
||||
|
||||
PATHPREFIX = $$PWD/src/org/qtproject/qt5/android/
|
||||
|
||||
JAVACLASSPATH += $$PWD/src/
|
||||
JAVASOURCES += \
|
||||
$$PATHPREFIX/accessibility/QtAccessibilityDelegate.java \
|
||||
$$PATHPREFIX/accessibility/QtNativeAccessibility.java \
|
||||
$$PATHPREFIX/QtActivityDelegate.java \
|
||||
$$PATHPREFIX/QtEditText.java \
|
||||
$$PATHPREFIX/QtInputConnection.java \
|
||||
$$PATHPREFIX/QtLayout.java \
|
||||
$$PATHPREFIX/QtMessageDialogHelper.java \
|
||||
$$PATHPREFIX/QtNative.java \
|
||||
$$PATHPREFIX/QtNativeLibrariesDir.java \
|
||||
$$PATHPREFIX/QtSurface.java \
|
||||
$$PATHPREFIX/ExtractStyle.java \
|
||||
$$PATHPREFIX/EditMenu.java \
|
||||
$$PATHPREFIX/EditPopupMenu.java \
|
||||
$$PATHPREFIX/CursorHandle.java
|
||||
|
||||
# install
|
||||
target.path = $$[QT_INSTALL_PREFIX]/jar
|
||||
INSTALLS += target
|
@ -1,2 +1,28 @@
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS += bundledjar.pro distributedjar.pro
|
||||
TARGET = QtAndroid
|
||||
|
||||
CONFIG += java
|
||||
DESTDIR = $$[QT_INSTALL_PREFIX/get]/jar
|
||||
API_VERSION = android-16
|
||||
|
||||
PATHPREFIX = $$PWD/src/org/qtproject/qt5/android/
|
||||
|
||||
JAVACLASSPATH += $$PWD/src/
|
||||
JAVASOURCES += \
|
||||
$$PATHPREFIX/accessibility/QtAccessibilityDelegate.java \
|
||||
$$PATHPREFIX/accessibility/QtNativeAccessibility.java \
|
||||
$$PATHPREFIX/QtActivityDelegate.java \
|
||||
$$PATHPREFIX/QtEditText.java \
|
||||
$$PATHPREFIX/QtInputConnection.java \
|
||||
$$PATHPREFIX/QtLayout.java \
|
||||
$$PATHPREFIX/QtMessageDialogHelper.java \
|
||||
$$PATHPREFIX/QtNative.java \
|
||||
$$PATHPREFIX/QtNativeLibrariesDir.java \
|
||||
$$PATHPREFIX/QtSurface.java \
|
||||
$$PATHPREFIX/ExtractStyle.java \
|
||||
$$PATHPREFIX/EditMenu.java \
|
||||
$$PATHPREFIX/EditPopupMenu.java \
|
||||
$$PATHPREFIX/CursorHandle.java
|
||||
|
||||
# install
|
||||
target.path = $$[QT_INSTALL_PREFIX]/jar
|
||||
INSTALLS += target
|
||||
|
@ -16,12 +16,10 @@ CONFIG += optimize_full
|
||||
|
||||
QMAKE_DOCS = $$PWD/doc/qtcore.qdocconf
|
||||
|
||||
ANDROID_JAR_DEPENDENCIES = \
|
||||
jar/QtAndroid.jar
|
||||
ANDROID_LIB_DEPENDENCIES = \
|
||||
plugins/platforms/android/libqtforandroid.so
|
||||
ANDROID_BUNDLED_JAR_DEPENDENCIES = \
|
||||
jar/QtAndroid-bundled.jar
|
||||
jar/QtAndroid.jar
|
||||
ANDROID_PERMISSIONS = \
|
||||
android.permission.INTERNET \
|
||||
android.permission.WRITE_EXTERNAL_STORAGE
|
||||
|
@ -24,8 +24,6 @@ QMAKE_LIBS += $$QMAKE_LIBS_NETWORK
|
||||
|
||||
qtConfig(bearermanagement) {
|
||||
ANDROID_BUNDLED_JAR_DEPENDENCIES = \
|
||||
jar/QtAndroidBearer-bundled.jar
|
||||
ANDROID_JAR_DEPENDENCIES = \
|
||||
jar/QtAndroidBearer.jar
|
||||
ANDROID_LIB_DEPENDENCIES = \
|
||||
plugins/bearer/libqandroidbearer.so
|
||||
|
@ -1,3 +0,0 @@
|
||||
TARGET = QtAndroidBearer-bundled
|
||||
CONFIG += bundled_jar_file
|
||||
include(jar.pri)
|
@ -1,2 +0,0 @@
|
||||
TARGET = QtAndroidBearer
|
||||
include(jar.pri)
|
@ -1,11 +0,0 @@
|
||||
load(qt_build_paths)
|
||||
CONFIG += java
|
||||
DESTDIR = $$MODULE_BASE_OUTDIR/jar
|
||||
|
||||
JAVACLASSPATH += $$PWD/src
|
||||
|
||||
JAVASOURCES += $$PWD/src/org/qtproject/qt5/android/bearer/QtNetworkReceiver.java
|
||||
|
||||
# install
|
||||
target.path = $$[QT_INSTALL_PREFIX]/jar
|
||||
INSTALLS += target
|
@ -1,2 +1,13 @@
|
||||
TEMPLATE=subdirs
|
||||
SUBDIRS += distributedjar.pro bundledjar.pro
|
||||
TARGET = QtAndroidBearer
|
||||
|
||||
load(qt_build_paths)
|
||||
CONFIG += java
|
||||
DESTDIR = $$MODULE_BASE_OUTDIR/jar
|
||||
|
||||
JAVACLASSPATH += $$PWD/src
|
||||
|
||||
JAVASOURCES += $$PWD/src/org/qtproject/qt5/android/bearer/QtNetworkReceiver.java
|
||||
|
||||
# install
|
||||
target.path = $$[QT_INSTALL_PREFIX]/jar
|
||||
INSTALLS += target
|
||||
|
Loading…
Reference in New Issue
Block a user