diff --git a/system-images/android/sdk/build-generic b/system-images/android/sdk/build-generic index e99f1ba..5999f2a 100755 --- a/system-images/android/sdk/build-generic +++ b/system-images/android/sdk/build-generic @@ -1,72 +1,73 @@ #!/bin/bash set -e # trap 'err_report echo "error: ${BASH_SOURCE}":"${LINENO}"' exit 1 package=$1 shift DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" export PATH=$DIR:$PATH +export PERSIST=1 # we get the repositories for the dependencies git clone kde:sysadmin/ci-tooling || true pushd ci-tooling git clone kde:sysadmin/repo-metadata || true git clone kde:kde-build-metadata || true popd # we figure out the dependencies all_packages=$(python3 ci-tooling/helpers/list-dependencies.py $package $EXTRA_PKGS --platform AndroidQt5.10) echo "Dependencies to build: $all_packages" blacklist="`cat $DIR/skip` $SKIP $package" for a in $extrapackages $all_packages $EXTRA_PKGS do skip=0 for x in $blacklist do if [[ $a =~ ^$x$ ]]; then skip=1 break fi done if [ $skip == 1 ]; then echo "Skipping $a $skip" continue fi arguments=$(python3 ci-tooling/helpers/getsetting.py --project $a --product Frameworks --platform AndroidQt5.10 --key cmake-options) build-cmake $a kde:$a $arguments -DBUILD_TESTING=OFF -GNinja done # we now do the actual application separately # first we download the project and look for the manifest file pushd src git clone kde:$package $APP_GIT_EXTRA || true popd manifestFile=`find $(pwd)/src/$package -name AndroidManifest.xml` EXTRA= if [ -n "$manifestFile" ] then targetname=`python3 $DIR/target-from-manifest.py $manifestFile` EXTRA=-DANDROID_APK_DIR=$(dirname $manifestFile) else appdataFile=$(find $(pwd)/src/$package -name "*.appdata.xml") if [[ -z "$appdataFile" ]]; then echo "error: No AndroidManifest.xml or *.appdata.xml file :(" exit 1 fi targetname=`python3 $DIR/target-from-appdata.py $appdataFile | tr '\n' ';' | head -c -1` fi arguments=$(python3 ci-tooling/helpers/getsetting.py --project $package --product Applications --platform AndroidQt5.10 --key cmake-options) -PERSIST=1 build-cmake $package kde:$package -DANDROID_SDK_BUILD_TOOLS_REVISION=21.1.2 -DQTANDROID_EXPORTED_TARGET=$targetname $EXTRA $arguments $@ +build-cmake $package kde:$package -DANDROID_SDK_BUILD_TOOLS_REVISION=21.1.2 -DQTANDROID_EXPORTED_TARGET=$targetname $EXTRA $arguments $@ pushd build/$package make create-apk if [ -d /output ] then cp *_build_apk/build/outputs/apk/*.apk /output fi