Skip to content

Commit

Permalink
android: remove parameter BUILDTOOLS_REVISION
Browse files Browse the repository at this point in the history
  • Loading branch information
janbar committed Sep 4, 2024
1 parent 298f4a0 commit 116cae1
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_android_arm64_ndk22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:
-DANDROID_SDK_MINVER=24
-DANDROID_SDK_TARGET=26
-DANDROID_NATIVE_API_LEVEL=24
-DANDROID_SDK_BUILD_TOOLS_REVISION=29.0.2
-DQT_ANDROID_PLATFORM_LEVEL=29
-DQT_ANDROID_SDK_BUILDTOOLS_REVISION=29.0.2
-DQT_ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}
-DQT_ANDROID_NDK_ROOT=${ANDROID_HOME}/ndk/22.1.7171670
-DQt5_DIR=${Qt5_DIR}/lib/cmake/Qt5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_android_x64_ndk22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ jobs:
-DANDROID_SDK_MINVER=24
-DANDROID_SDK_TARGET=26
-DANDROID_NATIVE_API_LEVEL=24
-DANDROID_SDK_BUILD_TOOLS_REVISION=29.0.2
-DQT_ANDROID_PLATFORM_LEVEL=29
-DQT_ANDROID_SDK_BUILDTOOLS_REVISION=29.0.2
-DQT_ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}
-DQT_ANDROID_NDK_ROOT=${ANDROID_HOME}/ndk/22.1.7171670
-DQt5_DIR=${Qt5_DIR}/lib/cmake/Qt5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_android_x86_ndk22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:
-DANDROID_SDK_MINVER=24
-DANDROID_SDK_TARGET=26
-DANDROID_NATIVE_API_LEVEL=24
-DANDROID_SDK_BUILD_TOOLS_REVISION=29.0.2
-DQT_ANDROID_PLATFORM_LEVEL=29
-DQT_ANDROID_SDK_BUILDTOOLS_REVISION=29.0.2
-DQT_ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}
-DQT_ANDROID_NDK_ROOT=${ANDROID_HOME}/ndk/22.1.7171670
-DQt5_DIR=${Qt5_DIR}/lib/cmake/Qt5
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ if(ANDROID)
VERSION_CODE ${APP_VERSION_CODE}
PACKAGE_NAME ${APP_ID}
PACKAGE_SOURCES ${PROJECT_SOURCE_DIR}/android/package-sources
BUILDTOOLS_REVISION ${QT_ANDROID_SDK_BUILDTOOLS_REVISION}
DEPENDS ssl crypto ${SHARED_LIBOMP}
ASSETS ${PROJECT_SOURCE_DIR}/resources
KEYSTORE ${KEYSTORE_FILE} ${KEYSTORE_ALIAS}
Expand Down
27 changes: 15 additions & 12 deletions android/AddQtAndroidApk.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ cmake_minimum_required(VERSION 3.8.2)
# macro add_qt_android_apk
#
# Requires:
# env ANDROID_SDK The SDK root path
# env ANDROID_NDK The NDK root path
# env JAVA_HOME Path Java JRE supported by SDK
# env ANDROID_SDK The SDK root path
# env ANDROID_NDK The NDK root path
# env JAVA_HOME Path Java JRE supported by SDK
#
# ANDROID_ABI "arm64-v8a"
# ANDROID_SDK_MINVER "24"
# ANDROID_SDK_TARGET "26"
# ANDROID_NATIVE_API_LEVEL Qt5.15 >=23
# QT_ANDROID_PLATFORM_LEVEL SDK platform (i.e 29)
# ANDROID_ABI "arm64-v8a"
# ANDROID_SDK_MINVER "24"
# ANDROID_SDK_TARGET "26"
# ANDROID_NATIVE_API_LEVEL Qt5.15 >=23
# ANDROID_SDK_BUILD_TOOLS_REVISION "29.0.2"
# QT_ANDROID_PLATFORM_LEVEL SDK platform (i.e 29)

# store the current source directory for future use
set(QT_ANDROID_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR})
Expand Down Expand Up @@ -88,7 +89,6 @@ include(CMakeParseArguments)
# VERSION_CODE 12
# PACKAGE_NAME "org.mycompany.myapp"
# PACKAGE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/package-sources
# BUILDTOOLS_REVISION "23.0.3"
# KEYSTORE ${CMAKE_CURRENT_LIST_DIR}/mykey.keystore myalias
# KEYSTORE_PASSWORD xxxx
# DEPENDS a_linked_target "path/to/a_linked_library.so" ...
Expand Down Expand Up @@ -127,7 +127,7 @@ include(CMakeParseArguments)
macro(add_qt_android_apk TARGET SOURCE_TARGET)

# parse the macro arguments
cmake_parse_arguments(ARG "INSTALL" "NAME;VERSION_CODE;PACKAGE_NAME;PACKAGE_SOURCES;KEYSTORE_PASSWORD;BUILDTOOLS_REVISION" "DEPENDS;PLUGINS;ASSETS;KEYSTORE" ${ARGN})
cmake_parse_arguments(ARG "INSTALL" "NAME;VERSION_CODE;PACKAGE_NAME;PACKAGE_SOURCES;KEYSTORE_PASSWORD" "DEPENDS;PLUGINS;ASSETS;KEYSTORE" ${ARGN})

# target name
set(QT_ANDROID_APP_TARGET "$<TARGET_NAME:${SOURCE_TARGET}>")
Expand All @@ -150,8 +150,11 @@ macro(add_qt_android_apk TARGET SOURCE_TARGET)
endif()

# set the Android SDK build-tools revision
if(ARG_BUILDTOOLS_REVISION)
set(QT_ANDROID_SDK_BUILDTOOLS_REVISION ${ARG_BUILDTOOLS_REVISION})
if(ANDROID_SDK_BUILD_TOOLS_REVISION)
set(QT_ANDROID_SDK_BUILDTOOLS_REVISION ${ANDROID_SDK_BUILD_TOOLS_REVISION})
else()
set(ANDROID_SDK_BUILD_TOOLS_REVISION $ENV{ANDROID_SDK_BUILD_TOOLS_REVISION})
set(QT_ANDROID_SDK_BUILDTOOLS_REVISION ${ANDROID_SDK_BUILD_TOOLS_REVISION})
endif()

# get version code from arguments, or generate a fixed one if not provided
Expand Down
2 changes: 1 addition & 1 deletion android/AndroidManifest.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package="@APP_ID@"
android:installLocation="auto">
<application android:label="@APP_NAME@" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:icon="@mipmap/ic_launcher">
<activity android:label="@APP_NAME@" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:screenOrientation="unspecified" android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation">
<activity android:label="@APP_NAME@" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:screenOrientation="unspecified" android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
2 changes: 1 addition & 1 deletion android/linux-build-arm64-qt515.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cmake .. -B $BUILD_DIR -DCMAKE_SYSTEM_NAME=Android \
-DANDROID_SDK_MINVER=24 \
-DANDROID_SDK_TARGET=26 \
-DANDROID_NATIVE_API_LEVEL=24 \
-DQT_ANDROID_SDK_BUILDTOOLS_REVISION="29.0.2" \
-DANDROID_SDK_BUILD_TOOLS_REVISION="29.0.2" \
-DQT_ANDROID_PLATFORM_LEVEL=29 \
-DQT_ANDROID_SDK_ROOT=$ANDROID_SDK \
-DQT_ANDROID_NDK_ROOT=$ANDROID_NDK \
Expand Down
2 changes: 1 addition & 1 deletion android/linux-build-armv7-qt515.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cmake .. -B $BUILD_DIR -DCMAKE_SYSTEM_NAME=Android \
-DANDROID_SDK_MINVER=24 \
-DANDROID_SDK_TARGET=26 \
-DANDROID_NATIVE_API_LEVEL=24 \
-DQT_ANDROID_SDK_BUILDTOOLS_REVISION="29.0.2" \
-DANDROID_SDK_BUILD_TOOLS_REVISION="29.0.2" \
-DQT_ANDROID_PLATFORM_LEVEL=29 \
-DQT_ANDROID_SDK_ROOT=$ANDROID_SDK \
-DQT_ANDROID_NDK_ROOT=$ANDROID_NDK \
Expand Down
2 changes: 1 addition & 1 deletion android/linux-build-x64-qt515.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cmake .. -B $BUILD_DIR -DCMAKE_SYSTEM_NAME=Android \
-DANDROID_SDK_MINVER=24 \
-DANDROID_SDK_TARGET=26 \
-DANDROID_NATIVE_API_LEVEL=24 \
-DQT_ANDROID_SDK_BUILDTOOLS_REVISION="29.0.2" \
-DANDROID_SDK_BUILD_TOOLS_REVISION="29.0.2" \
-DQT_ANDROID_PLATFORM_LEVEL=29 \
-DQT_ANDROID_SDK_ROOT=$ANDROID_SDK \
-DQT_ANDROID_NDK_ROOT=$ANDROID_NDK \
Expand Down
2 changes: 1 addition & 1 deletion android/linux-build-x86-qt515.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cmake .. -B $BUILD_DIR -DCMAKE_SYSTEM_NAME=Android \
-DANDROID_SDK_MINVER=24 \
-DANDROID_SDK_TARGET=26 \
-DANDROID_NATIVE_API_LEVEL=24 \
-DQT_ANDROID_SDK_BUILDTOOLS_REVISION="29.0.2" \
-DANDROID_SDK_BUILD_TOOLS_REVISION="29.0.2" \
-DQT_ANDROID_PLATFORM_LEVEL=29 \
-DQT_ANDROID_SDK_ROOT=$ANDROID_SDK \
-DQT_ANDROID_NDK_ROOT=$ANDROID_NDK \
Expand Down

0 comments on commit 116cae1

Please sign in to comment.