diff --git a/Jenkinsfile b/Jenkinsfile index 1ecd8faa..89114cdf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 + '"' diff --git a/tools/linux/build_apk.sh b/tools/linux/build_apk.sh index 402c7458..bec2e1c5 100755 --- a/tools/linux/build_apk.sh +++ b/tools/linux/build_apk.sh @@ -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} "."