Skip to content

Commit e8131f4

Browse files
committed
fix(build): fix macOS release crash and reduce Android APK sizes
1 parent 61c4ca5 commit e8131f4

File tree

7 files changed

+67
-14
lines changed

7 files changed

+67
-14
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ jobs:
7575
- Workflow Run: ${{ github.run_number }}
7676
- Build Date: ${{ github.event.head_commit.timestamp }}
7777
78+
**Platform Downloads:**
79+
- **Android**: Download the APK matching your device architecture:
80+
- `arm64-v8a`: Modern 64-bit devices (2017+) - ~30MB
81+
- `armeabi-v7a`: Older 32-bit devices - ~28MB
82+
- `x86_64`: Emulators/Intel devices - ~32MB
83+
- **iOS**: Universal binary for all iOS devices
84+
- **macOS**: Universal binary (Apple Silicon + Intel) - ~103MB
85+
- **Linux**: x64 build - ~32MB
86+
- **Windows**: x64 build - ~25MB
87+
7888
⚠️ This is an automated alpha release. Expect bugs and breaking changes.
7989
For stable releases, please wait for beta/stable versions.
8090
env:
@@ -97,19 +107,24 @@ jobs:
97107
- name: Install dependencies
98108
run: flutter pub get
99109

100-
- name: Build APK
101-
run: flutter build apk --release
110+
- name: Build Split APKs (per architecture)
111+
run: flutter build apk --release --split-per-abi
102112

103-
- name: Rename APK
113+
- name: Rename APKs
104114
run: |
105-
mv build/app/outputs/flutter-apk/app-release.apk \
106-
build/app/outputs/flutter-apk/Dester-${{ needs.check-version.outputs.version }}-alpha-Android.apk
115+
cd build/app/outputs/flutter-apk
116+
mv app-armeabi-v7a-release.apk Dester-${{ needs.check-version.outputs.version }}-alpha-Android-armeabi-v7a.apk
117+
mv app-arm64-v8a-release.apk Dester-${{ needs.check-version.outputs.version }}-alpha-Android-arm64-v8a.apk
118+
mv app-x86_64-release.apk Dester-${{ needs.check-version.outputs.version }}-alpha-Android-x86_64.apk
107119
108-
- name: Upload APK to Release
120+
- name: Upload Split APKs to Release
109121
uses: softprops/action-gh-release@v1
110122
with:
111123
tag_name: v${{ needs.check-version.outputs.version }}
112-
files: build/app/outputs/flutter-apk/Dester-${{ needs.check-version.outputs.version }}-alpha-Android.apk
124+
files: |
125+
build/app/outputs/flutter-apk/Dester-${{ needs.check-version.outputs.version }}-alpha-Android-armeabi-v7a.apk
126+
build/app/outputs/flutter-apk/Dester-${{ needs.check-version.outputs.version }}-alpha-Android-arm64-v8a.apk
127+
build/app/outputs/flutter-apk/Dester-${{ needs.check-version.outputs.version }}-alpha-Android-x86_64.apk
113128
env:
114129
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115130

@@ -176,7 +191,7 @@ jobs:
176191
- name: Create ZIP archive
177192
run: |
178193
cd build/macos/Build/Products/Release
179-
zip -r Dester-${{ needs.check-version.outputs.version }}-alpha-macOS.zip dester.app
194+
zip -r Dester-${{ needs.check-version.outputs.version }}-alpha-macOS.zip Dester.app
180195
181196
- name: Upload macOS build
182197
uses: softprops/action-gh-release@v1

android/app/build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ android {
3737
signingConfig = signingConfigs.getByName("debug")
3838
}
3939
}
40+
41+
// Enable APK splits for reduced file sizes
42+
splits {
43+
abi {
44+
isEnable = true
45+
reset()
46+
include("armeabi-v7a", "arm64-v8a", "x86_64")
47+
isUniversalApk = false // Don't generate a universal APK
48+
}
49+
}
4050
}
4151

4252
flutter {

ios/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@
471471
isa = XCBuildConfiguration;
472472
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
473473
buildSettings = {
474-
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
474+
ASSETCATALOG_COMPILER_APPICON_NAME = liquid_icon;
475475
CLANG_ENABLE_MODULES = YES;
476476
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
477477
DEVELOPMENT_TEAM = 7665HPQ39S;
@@ -657,7 +657,7 @@
657657
isa = XCBuildConfiguration;
658658
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
659659
buildSettings = {
660-
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
660+
ASSETCATALOG_COMPILER_APPICON_NAME = liquid_icon;
661661
CLANG_ENABLE_MODULES = YES;
662662
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
663663
DEVELOPMENT_TEAM = 7665HPQ39S;
@@ -683,7 +683,7 @@
683683
isa = XCBuildConfiguration;
684684
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
685685
buildSettings = {
686-
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
686+
ASSETCATALOG_COMPILER_APPICON_NAME = liquid_icon;
687687
CLANG_ENABLE_MODULES = YES;
688688
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
689689
DEVELOPMENT_TEAM = 7665HPQ39S;

macos/Runner.xcodeproj/project.pbxproj

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,14 +580,15 @@
580580
ENABLE_APP_SANDBOX = YES;
581581
ENABLE_INCOMING_NETWORK_CONNECTIONS = NO;
582582
ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;
583-
ENABLE_RESOURCE_ACCESS_AUDIO_INPUT = NO;
583+
ENABLE_RESOURCE_ACCESS_AUDIO_INPUT = YES;
584584
ENABLE_RESOURCE_ACCESS_BLUETOOTH = NO;
585585
ENABLE_RESOURCE_ACCESS_CALENDARS = NO;
586586
ENABLE_RESOURCE_ACCESS_CAMERA = NO;
587587
ENABLE_RESOURCE_ACCESS_CONTACTS = NO;
588588
ENABLE_RESOURCE_ACCESS_LOCATION = NO;
589589
ENABLE_RESOURCE_ACCESS_PRINTING = NO;
590590
ENABLE_RESOURCE_ACCESS_USB = NO;
591+
ENABLE_USER_SELECTED_FILES = readonly;
591592
INFOPLIST_FILE = Runner/Info.plist;
592593
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
593594
LD_RUNPATH_SEARCH_PATHS = (
@@ -725,14 +726,15 @@
725726
ENABLE_APP_SANDBOX = YES;
726727
ENABLE_INCOMING_NETWORK_CONNECTIONS = NO;
727728
ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;
728-
ENABLE_RESOURCE_ACCESS_AUDIO_INPUT = NO;
729+
ENABLE_RESOURCE_ACCESS_AUDIO_INPUT = YES;
729730
ENABLE_RESOURCE_ACCESS_BLUETOOTH = NO;
730731
ENABLE_RESOURCE_ACCESS_CALENDARS = NO;
731732
ENABLE_RESOURCE_ACCESS_CAMERA = NO;
732733
ENABLE_RESOURCE_ACCESS_CONTACTS = NO;
733734
ENABLE_RESOURCE_ACCESS_LOCATION = NO;
734735
ENABLE_RESOURCE_ACCESS_PRINTING = NO;
735736
ENABLE_RESOURCE_ACCESS_USB = NO;
737+
ENABLE_USER_SELECTED_FILES = readonly;
736738
INFOPLIST_FILE = Runner/Info.plist;
737739
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
738740
LD_RUNPATH_SEARCH_PATHS = (
@@ -755,6 +757,18 @@
755757
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
756758
CODE_SIGN_STYLE = Automatic;
757759
COMBINE_HIDPI_IMAGES = YES;
760+
ENABLE_APP_SANDBOX = YES;
761+
ENABLE_INCOMING_NETWORK_CONNECTIONS = NO;
762+
ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;
763+
ENABLE_RESOURCE_ACCESS_AUDIO_INPUT = YES;
764+
ENABLE_RESOURCE_ACCESS_BLUETOOTH = NO;
765+
ENABLE_RESOURCE_ACCESS_CALENDARS = NO;
766+
ENABLE_RESOURCE_ACCESS_CAMERA = NO;
767+
ENABLE_RESOURCE_ACCESS_CONTACTS = NO;
768+
ENABLE_RESOURCE_ACCESS_LOCATION = NO;
769+
ENABLE_RESOURCE_ACCESS_PRINTING = NO;
770+
ENABLE_RESOURCE_ACCESS_USB = NO;
771+
ENABLE_USER_SELECTED_FILES = readonly;
758772
INFOPLIST_FILE = Runner/Info.plist;
759773
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.entertainment";
760774
LD_RUNPATH_SEARCH_PATHS = (

macos/Runner/DebugProfile.entitlements

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,9 @@
1010
<true/>
1111
<key>com.apple.security.network.server</key>
1212
<true/>
13+
<key>com.apple.security.device.audio-input</key>
14+
<true/>
15+
<key>com.apple.security.files.user-selected.read-only</key>
16+
<true/>
1317
</dict>
1418
</plist>

macos/Runner/Info.plist

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
<key>CFBundleExecutable</key>
88
<string>$(EXECUTABLE_NAME)</string>
99
<key>CFBundleIconFile</key>
10-
<string></string>
10+
<string>liquid_icon</string>
1111
<key>CFBundleIdentifier</key>
1212
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
1313
<key>CFBundleInfoDictionaryVersion</key>
1414
<string>6.0</string>
1515
<key>CFBundleName</key>
1616
<string>$(PRODUCT_NAME)</string>
17+
<key>CFBundleDisplayName</key>
18+
<string>Dester</string>
1719
<key>CFBundlePackageType</key>
1820
<string>APPL</string>
1921
<key>CFBundleShortVersionString</key>

macos/Runner/Release.entitlements

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>com.apple.security.app-sandbox</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-jit</key>
8+
<true/>
59
<key>com.apple.security.network.client</key>
610
<true/>
711
<key>com.apple.security.network.server</key>
812
<true/>
13+
<key>com.apple.security.device.audio-input</key>
14+
<true/>
15+
<key>com.apple.security.files.user-selected.read-only</key>
16+
<true/>
917
</dict>
1018
</plist>

0 commit comments

Comments
 (0)