Skip to content

Commit 4c50baf

Browse files
committed
feat: Enhance APK output naming and enable ABI splits for optimized builds
1 parent 111d4a5 commit 4c50baf

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979

8080
- name: Rename APK Outputs
8181
run: |
82+
VERSION="${{ steps.version.outputs.apk_version }}"
8283
shopt -s nullglob
8384
apks=(app/build/outputs/apk/release/*.apk)
8485
if [ ${#apks[@]} -eq 0 ]; then
@@ -87,7 +88,9 @@ jobs:
8788
fi
8889
for apk in "${apks[@]}"; do
8990
filename=$(basename "$apk")
90-
new_filename="dailylife-${filename#app-}"
91+
stripped="${filename#app-}"
92+
arch="${stripped%%-*}"
93+
new_filename="dailylife-v${VERSION}-${arch}.apk"
9194
mv "$apk" "$new_filename"
9295
done
9396

app/build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ android {
3535
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3636
}
3737

38+
splits {
39+
abi {
40+
isEnable = true
41+
reset()
42+
include("armeabi-v7a", "arm64-v8a", "x86_64")
43+
isUniversalApk = true
44+
}
45+
}
46+
3847
buildTypes {
3948
release {
4049
isMinifyEnabled = true

0 commit comments

Comments
 (0)