Verified Commit ae9172e7 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳 Committed by Linus Jahn

android: Strip binaries

parent 335dd370
Pipeline #16809 passed with stages
in 91 minutes and 1 second
#!/usr/bin/env bash
function strip_directory_arm() {
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip $(find $1 -name "*armeabi-v7a*".so)
function strip_directory_arm64() {
/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip $(find $1 -name "*arm64*".so)
# KDE Frameworks Version, either master or a version number
KAIDAN_SOURCES=$(dirname "$(readlink -f "${0}")")/..
......@@ -14,6 +22,16 @@ git submodule update --init
sudo apt update
sudo apt -y install inkscape optipng
# We don't want debug symbols, but gradle doesn't strip those anymore seemingly.
# Therefore patch the KDE scripts not to build them into the binary at all.
sudo sed -i 's/-DCMAKE_BUILD_TYPE=debug/-DCMAKE_BUILD_TYPE=Release/g' -i /opt/helpers/build-cmake
# HACK 2
# Strip Qt before building
strip_directory_arm "/opt/Qt/lib/"
strip_directory_arm64 "/opt/Qt/lib/"
# Build dependencies
GIT_EXTRA="--branch ${KF5_VERSION}" /opt/helpers/build-kde-dependencies --withProject kirigami knotifications
/opt/helpers/build-cmake qxmpp -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF
......@@ -21,12 +39,17 @@ GIT_EXTRA="--branch ${KF5_VERSION}" /opt/helpers/build-kde-dependencies --withPr
# Trick the script to not clone kaidan once again
if ! [ -f "${KAIDAN_SOURCES}/kaidan/" ]; then
ln -s ${KAIDAN_SOURCES} ${PWD}/src/kaidan
ln -s ${KAIDAN_SOURCES} ${PWD}/src/kaidan
# Build Kaidan
# HACK 3
# Strip build directory before deploying
strip_directory_arm ./build-arm
strip_directory_arm64 ./build-arm64
# pack apk
/opt/helpers/create-apk ${CI_PROJECT_NAME}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment