From 2c94742442264d76f0963b7ac92d8cf393e99550 Mon Sep 17 00:00:00 2001 From: Paul <41385034+paulcoding810@users.noreply.github.com> Date: Thu, 5 Dec 2024 13:12:53 +0700 Subject: [PATCH] Enable split ABI (#12) --- .github/workflows/dev.yml | 5 ++++- .github/workflows/release.yml | 15 ++++++++++++--- app/build.gradle.kts | 9 +++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 75de768..3c2eb34 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -43,8 +43,11 @@ jobs: - name: Build app run: ./gradlew assembleDebug + - name: Rename apk + run: mv app/build/outputs/apk/debug/app-universal-debug.apk hviewer-debug.apk + - name: Upload APK artifact uses: actions/upload-artifact@v4 with: name: app - path: app/build/outputs/apk/debug/*.apk \ No newline at end of file + path: hviewer-debug.apk \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 091c167..96bfd5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,9 +42,13 @@ jobs: keyPassword: ${{ secrets.KEY_PASSWORD }} buildToolsVersion: ${{ env.ANDROID_BUILD_TOOLS_VERSION }} - - name: Rename signed APK + - name: Rename apks run: | - mv "${{ steps.sign_app.outputs.signedFile }}" "app-release.apk" + mv app/build/outputs/apk/release/app-arm64-v8a-release-unsigned-signed.apk hviewer-${{ github.ref_name }}-arm64-v8a-release.apk + mv app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned-signed.apk hviewer-${{ github.ref_name }}-armeabi-v7a-release.apk + mv app/build/outputs/apk/release/app-universal-release-unsigned-signed.apk hviewer-${{ github.ref_name }}-universal-release.apk + mv app/build/outputs/apk/release/app-x86-release-unsigned-signed.apk hviewer-${{ github.ref_name }}-x86-release.apk + mv app/build/outputs/apk/release/app-x86_64-release-unsigned-signed.apk hviewer-${{ github.ref_name }}-x86_64-release.apk # - name: Create changelog # id: changelog @@ -60,6 +64,11 @@ jobs: uses: softprops/action-gh-release@v2 with: body: ChangeLog - files: "app-release.apk" + files: | + hviewer-${{ github.ref_name }}-arm64-v8a-release.apk + hviewer-${{ github.ref_name }}-armeabi-v7a-release.apk + hviewer-${{ github.ref_name }}-universal-release.apk + hviewer-${{ github.ref_name }}-x86-release.apk + hviewer-${{ github.ref_name }}-x86_64-release.apk fail_on_unmatched_files: true make_latest: true diff --git a/app/build.gradle.kts b/app/build.gradle.kts index bd6e6d9..8013164 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -25,6 +25,15 @@ android { versionName = "1.3.0" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + + splits { + abi { + isEnable = true + reset() + include("arm64-v8a", "armeabi-v7a", "x86", "x86_64") + isUniversalApk = true + } + } } buildTypes {