Skip to content

Commit b79f830

Browse files
ci: adjust memory settings in building
1 parent f9a0ee0 commit b79f830

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/android.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,30 @@ jobs:
2828
uses: subosito/flutter-action@v2
2929
with:
3030
channel: stable
31-
- name: set up JDK 17
31+
- name: set up JDK 21
3232
uses: actions/setup-java@v4
3333
with:
34-
java-version: '17'
34+
java-version: '21'
3535
distribution: 'adopt'
3636
cache: gradle
37+
- name: Increase Gradle memory settings
38+
run: |
39+
echo "org.gradle.jvmargs=-Xmx8192m -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" >> android/gradle.properties
40+
echo "android.enableR8=true" >> android/gradle.properties
41+
- name: Clean workspace
42+
run: flutter clean
3743
- name: Decode Keystore
3844
env:
3945
ENCODED_STRING: ${{ secrets.SIGNING_STORE_BASE64 }}
4046
run: echo $ENCODED_STRING | base64 -di > android/app/keystore.jks
4147
- name: Build apk
42-
run: flutter build apk --release --split-per-abi -P --debug
48+
run: flutter build apk --release --split-per-abi
4349
env:
4450
CI: true
4551
SIGNING_KEY_ALIAS: release
4652
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
4753
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
54+
FLUTTER_BUILD_ARGS: "--extra-gen-snapshot-options=--vm-args=-Xmx8G"
4855
- name: Upload artifact
4956
uses: actions/upload-artifact@v4
5057
with:

0 commit comments

Comments
 (0)