From 861d92376549db69848ffbcb7b1af1ed828e82a6 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Mon, 2 Nov 2020 17:08:12 +0100 Subject: 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. --- toolchain/ECMAndroidDeployQt.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'toolchain/ECMAndroidDeployQt.cmake') 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() -- cgit v1.2.1