mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-20 22:41:38 +02:00
perf(android): reduce release APK size
Keep Dart debug data outside libapp.so and archive matching symbols and R8 mappings in CI. Pack native relocations, preserve JNI exports, and recompress PNG assets losslessly. ARM64 APK shrinks from 80,306,680 to 76,080,247 bytes (5.26%). Verified with 1,877 Flutter tests, 19 native device tests, Discord SDK integration, and release startup on a 16 KiB Android emulator.
This commit is contained in:
1 parent
4be1073203
commit
b8c50b1527
11 files changed
+102
-4
No files matched your search
@@ -313,3 +313,21 @@ jobs:
|
||||
"$ANDROID_HOME/build-tools/37.0.0/apksigner" verify --verbose \
|
||||
"build/app/outputs/flutter-apk/app-${abi}-release.apk"
|
||||
done
|
||||
|
||||
- name: Record Android symbol provenance
|
||||
run: |
|
||||
test -s build/symbols/android/app.android-arm64.symbols
|
||||
test -s build/symbols/android/app.android-arm.symbols
|
||||
test -s build/app/outputs/mapping/release/mapping.txt
|
||||
git rev-parse HEAD > build/symbols/android/commit.txt
|
||||
sha256sum build/app/outputs/flutter-apk/*release.apk > build/symbols/android/apk-sha256.txt
|
||||
|
||||
- name: Retain Android debug symbols
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||
with:
|
||||
name: android-symbols-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
if-no-files-found: error
|
||||
retention-days: 90
|
||||
path: |
|
||||
build/symbols/android/
|
||||
build/app/outputs/mapping/release/mapping.txt
|
||||
@@ -227,6 +227,24 @@ jobs:
|
||||
"$apk_dir/SpotiFLAC-${VERSION}-${abi}.apk"
|
||||
done
|
||||
|
||||
- name: Record Android symbol provenance
|
||||
run: |
|
||||
test -s build/symbols/android/app.android-arm64.symbols
|
||||
test -s build/symbols/android/app.android-arm.symbols
|
||||
test -s build/app/outputs/mapping/release/mapping.txt
|
||||
git rev-parse HEAD > build/symbols/android/commit.txt
|
||||
sha256sum build/app/outputs/flutter-apk/SpotiFLAC-*.apk > build/symbols/android/apk-sha256.txt
|
||||
|
||||
- name: Retain Android debug symbols
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||
with:
|
||||
name: android-symbols-${{ needs.get-version.outputs.version }}-${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
if-no-files-found: error
|
||||
retention-days: 90
|
||||
path: |
|
||||
build/symbols/android/
|
||||
build/app/outputs/mapping/release/mapping.txt
|
||||
|
||||
- name: Upload APK artifact
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||
with:
|
||||
|
||||
Reference in new issue
Block a user