Skip to content

Commit ce1951a

Browse files
Enable split apks for debug builds
APKs for each architecture and a universal APK that is compatible for all architectures will now be available from Github Actions page from the workflow runs labeled `Build`. The APKs will be available as zips under the Artifact section named `termux-app-*`. Architecture specific APKs can be used by users with low disk space since F-Droid releases are universal (since it doesn't support split APKs termux#1904) and their install+bootstrap installation size is ~180MB instead of ~120MB if an architecture specific APK is used. This should also reduce bandwidth usage and download time for debug builds users if they download an architecture specific zip instead of the universal one. Related termux#2153
1 parent 1c6581f commit ce1951a

File tree

2 files changed

+40
-6
lines changed

2 files changed

+40
-6
lines changed

.github/workflows/debug_build.yml

+33-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,38 @@ jobs:
1919
- name: Build
2020
run: |
2121
./gradlew assembleDebug
22-
- name: Store generated APK file
22+
- name: Store generated universal APK file
2323
uses: actions/upload-artifact@v2
2424
with:
25-
name: termux-app
26-
path: ./app/build/outputs/apk/debug
25+
name: termux-app-universal
26+
path: |
27+
./app/build/outputs/apk/debug/app-universal-debug.apk
28+
./app/build/outputs/apk/debug/output-metadata.json
29+
- name: Store generated arm64-v8a APK file
30+
uses: actions/upload-artifact@v2
31+
with:
32+
name: termux-app-arm64-v8a
33+
path: |
34+
./app/build/outputs/apk/debug/app-arm64-v8a-debug.apk
35+
./app/build/outputs/apk/debug/output-metadata.json
36+
- name: Store generated armeabi-v7a APK file
37+
uses: actions/upload-artifact@v2
38+
with:
39+
name: termux-app-armeabi-v7a
40+
path: |
41+
./app/build/outputs/apk/debug/app-armeabi-v7a-debug
42+
./app/build/outputs/apk/debug/output-metadata.json
43+
- name: Store generated x86_64 APK file
44+
uses: actions/upload-artifact@v2
45+
with:
46+
name: termux-app-x86_64
47+
path: |
48+
./app/build/outputs/apk/debug/app-x86_64-debug.apk
49+
./app/build/outputs/apk/debug/output-metadata.json
50+
- name: Store generated x86 APK file
51+
uses: actions/upload-artifact@v2
52+
with:
53+
name: termux-app-x86
54+
path: |
55+
./app/build/outputs/apk/debug/app-x86-debug.apk
56+
./app/build/outputs/apk/debug/output-metadata.json

app/build.gradle

+7-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,14 @@ android {
4444
}
4545
}
4646

47-
ndk {
48-
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
47+
splits {
48+
abi {
49+
enable gradle.startParameter.taskNames.any { it.contains("Debug") }
50+
reset ()
51+
include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
52+
universalApk true
53+
}
4954
}
50-
5155
}
5256

5357
signingConfigs {

0 commit comments

Comments
 (0)