Commit 6a2653c5 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

android: split our generic tooling into smaller programs

This way it's easier to reuse these parts of the logic
parent e4ec3809
Pipeline #2207 skipped with stage
......@@ -17,38 +17,7 @@ build-kde-dependencies $package
pushd src
git clone --depth 1 kde:$package $APP_GIT_EXTRA || true
popd
manifestFile=`find $(pwd)/src/$package -name AndroidManifest.xml`
targetname=$(python3 ci-tooling/helpers/getsetting.py --project $package --product Applications --platform AndroidQt5.12 --key target-name || true)
if [[ -z "$targetname" && -n "$manifestFile" ]]
then
targetname=`python3 $DIR/target-from-manifest.py $manifestFile | tr '\n' ';' | head -c -1`
EXTRA+=" "-DANDROID_APK_DIR=$(dirname $manifestFile | tr '\n' ';' | head -c -1 )
fi
if [[ -z "$targetname" || "$targetname" =~ ".*%%.*" ]]
then
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
build-kde-project $package Applications -DQTANDROID_EXPORTED_TARGET=$targetname $EXTRA $@
pushd build/$package
if [ -f /keys/${package}keystore-config ]; then
ARGS="`cat /keys/${package}keystore-config` $ARGS" make create-apk
elif [ -f /keys/androidkeystore-config ]; then
ARGS="`cat /keys/androidkeystore-config` $ARGS" make create-apk
else
make create-apk
fi
if [ -d /output ]
then
find *_build_apk/build/outputs/apk/ -name \*.apk -print0 | xargs -I{} -0 cp -v {} /output
fi
APK_ARGS=`get-apk-args $package`
build-kde-project $package Applications $APK_ARGS $@
create-apk $package
#!/bin/bash
set -e
package=$1
shift
pushd build/$package
if [ -f /keys/${package}keystore-config ]; then
ARGS="`cat /keys/${package}keystore-config` $ARGS" make create-apk
elif [ -f /keys/androidkeystore-config ]; then
ARGS="`cat /keys/androidkeystore-config` $ARGS" make create-apk
else
make create-apk
fi
if [ -d /output ]
then
find *_build_apk/build/outputs/apk/ -name \*.apk -print0 | xargs -I{} -0 cp -v {} /output
fi
#!/bin/bash
set -e
package=$1
shift
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
manifestFile=`find $(pwd)/src/$package -name AndroidManifest.xml`
targetname=$(python3 ci-tooling/helpers/getsetting.py --project $package --product Applications --platform AndroidQt5.12 --key target-name || true)
if [[ -z "$targetname" && -n "$manifestFile" ]]
then
targetname=`python3 $DIR/target-from-manifest.py $manifestFile | tr '\n' ';' | head -c -1`
EXTRA+=" "-DANDROID_APK_DIR=$(dirname $manifestFile | tr '\n' ';' | head -c -1 )
fi
if [[ -z "$targetname" || "$targetname" =~ ".*%%.*" ]]
then
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
echo "-DQTANDROID_EXPORTED_TARGET=$targetname $EXTRA"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment