Skip to content

Commit

Permalink
Enable split apks for debug builds
Browse files Browse the repository at this point in the history
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
  • Loading branch information
agnostic-apollo committed Jul 2, 2021
1 parent 0a27537 commit ec1eba5
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 6 deletions.
36 changes: 33 additions & 3 deletions .github/workflows/debug_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,38 @@ jobs:
- name: Build
run: |
./gradlew assembleDebug
- name: Store generated APK file
- name: Store generated universal APK file
uses: actions/upload-artifact@v2
with:
name: termux-app
path: ./app/build/outputs/apk/debug
name: termux-app-universal
path: |
./app/build/outputs/apk/debug/app-universal-debug.apk
./app/build/outputs/apk/debug/output-metadata.json
- name: Store generated arm64-v8a APK file
uses: actions/upload-artifact@v2
with:
name: termux-app-arm64-v8a
path: |
./app/build/outputs/apk/debug/app-arm64-v8a-debug.apk
./app/build/outputs/apk/debug/output-metadata.json
- name: Store generated armeabi-v7a APK file
uses: actions/upload-artifact@v2
with:
name: termux-app-armeabi-v7a
path: |
./app/build/outputs/apk/debug/app-armeabi-v7a-debug
./app/build/outputs/apk/debug/output-metadata.json
- name: Store generated x86_64 APK file
uses: actions/upload-artifact@v2
with:
name: termux-app-x86_64
path: |
./app/build/outputs/apk/debug/app-x86_64-debug.apk
./app/build/outputs/apk/debug/output-metadata.json
- name: Store generated x86 APK file
uses: actions/upload-artifact@v2
with:
name: termux-app-x86
path: |
./app/build/outputs/apk/debug/app-x86-debug.apk
./app/build/outputs/apk/debug/output-metadata.json
10 changes: 7 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ android {
}
}

ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
splits {
abi {
enable gradle.startParameter.taskNames.any { it.contains("Debug") }
reset ()
include 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
universalApk true
}
}

}

signingConfigs {
Expand Down

0 comments on commit ec1eba5

Please sign in to comment.