aboutsummaryrefslogtreecommitdiff
path: root/toolchain/ECMAndroidDeployQt.cmake
diff options
context:
space:
mode:
authorVolker Krause <vkrause@kde.org>2020-11-02 17:08:12 +0100
committerVolker Krause <vkrause@kde.org>2020-12-01 16:01:57 +0000
commit861d92376549db69848ffbcb7b1af1ed828e82a6 (patch)
tree1c98e232998985203b266d630171aa8abdfcd1af /toolchain/ECMAndroidDeployQt.cmake
parent12e0189931fc47378b0330e0b910d3fdf9132442 (diff)
downloadextra-cmake-modules-861d92376549db69848ffbcb7b1af1ed828e82a6.tar.gz
extra-cmake-modules-861d92376549db69848ffbcb7b1af1ed828e82a6.tar.bz2
Add fastlane metadata generation for Android builds
This is currently done on the signing machines as part of the F-Droid nightly pipeline, but should rather happen as part of the build process in the future. Compared to the binary factory script this has a few extensions already: - Besides recovering information from APKs we can now consume appdata files directly, or scan the entire source dir. - Screenshots from appdata files are downloaded. - The 'x-test' language is ignored. - Donation and translation information are added. - Add links to the source code repository, if we can determine that. The result is put into a single archive per APK, so we can easily transfer that to the signing machine via Jenkins alongside the APK.
Diffstat (limited to 'toolchain/ECMAndroidDeployQt.cmake')
-rw-r--r--toolchain/ECMAndroidDeployQt.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/toolchain/ECMAndroidDeployQt.cmake b/toolchain/ECMAndroidDeployQt.cmake
index 74f4c550..544f5a8d 100644
--- a/toolchain/ECMAndroidDeployQt.cmake
+++ b/toolchain/ECMAndroidDeployQt.cmake
@@ -1,5 +1,6 @@
cmake_minimum_required (VERSION 3.7 FATAL_ERROR)
find_package(Qt5Core REQUIRED)
+find_package(Python3 COMPONENTS Interpreter REQUIRED)
function(ecm_androiddeployqt QTANDROID_EXPORTED_TARGET ECM_ADDITIONAL_FIND_ROOT_PATH)
set(EXPORT_DIR "${CMAKE_BINARY_DIR}/${QTANDROID_EXPORTED_TARGET}_build_apk/")
@@ -64,6 +65,12 @@ function(ecm_androiddeployqt QTANDROID_EXPORTED_TARGET ECM_ADDITIONAL_FIND_ROOT_
if (NOT TARGET create-apk)
add_custom_target(create-apk)
+ if (NOT DEFINED ANDROID_FASTLANE_METADATA_OUTPUT_DIR)
+ set(ANDROID_FASTLANE_METADATA_OUTPUT_DIR ${CMAKE_BINARY_DIR}/fastlane)
+ endif()
+ add_custom_target(create-fastlane
+ COMMAND Python3::Interpreter ${CMAKE_CURRENT_LIST_DIR}/generate-fastlane-metadata.py --output ${ANDROID_FASTLANE_METADATA_OUTPUT_DIR} --source ${CMAKE_SOURCE_DIR}
+ )
endif()
if (NOT DEFINED ANDROID_APK_OUTPUT_DIR)
@@ -88,4 +95,5 @@ function(ecm_androiddeployqt QTANDROID_EXPORTED_TARGET ECM_ADDITIONAL_FIND_ROOT_
COMMAND adb install -r "${ANDROID_APK_OUTPUT_DIR}/${QTANDROID_EXPORTED_TARGET}-${CMAKE_ANDROID_ARCH_ABI}.apk"
)
add_dependencies(create-apk ${CREATEAPK_TARGET_NAME})
+ add_dependencies(${CREATEAPK_TARGET_NAME} create-fastlane)
endfunction()