1
0
forked from firka/firka

Jenkins: move bundle compression to build_apk.sh

This commit is contained in:
2025-09-15 12:25:49 +02:00
parent dd4ccf2736
commit e5fac2609f
2 changed files with 13 additions and 26 deletions

26
Jenkinsfile vendored
View File

@@ -50,32 +50,6 @@ pipeline {
}
}
stage('Modify firka_bundle.dart') {
when {
branch 'main'
}
steps {
script {
sh '''#!/bin/sh
set -e
BUNDLE_FILE="firka/lib/helpers/firka_bundle.dart"
if [ -f "$BUNDLE_FILE" ]; then
echo "Modifying $BUNDLE_FILE"
sed -i 's/final bool _compressedBundle = false;/final bool _compressedBundle = Platform.isAndroid;/' "$BUNDLE_FILE"
echo "Modified _compressedBundle setting"
grep "_compressedBundle" "$BUNDLE_FILE" || echo "Warning: _compressedBundle line not found after modification"
else
echo "$BUNDLE_FILE not found"
exit 1
fi
'''
}
}
}
stage('Build firka') {
steps {
sh 'bash -c "./tools/linux/build_apk.sh ' + env.BRANCH_NAME + '"'

View File

@@ -31,6 +31,19 @@ build_abi() {
rsync -a --exclude='build/' --exclude='.dart_tool/' --exclude='.git/' . "${temp_dir}/"
cd "${temp_dir}"
BUNDLE_FILE="lib/helpers/firka_bundle.dart"
if [ -f "$BUNDLE_FILE" ]; then
echo "Modifying $BUNDLE_FILE"
sed -i 's/final bool _compressedBundle = false;/final bool _compressedBundle = Platform.isAndroid;/' "$BUNDLE_FILE"
echo "Modified _compressedBundle setting"
grep "_compressedBundle" "$BUNDLE_FILE" || echo "Warning: _compressedBundle line not found after modification"
else
echo "$BUNDLE_FILE not found"
exit 1
fi
# Update version for this ABI
update_version_for_abi ${build_offset} "."