From 3efb1b95fbfc6b4cc67db99b6c012a070415d411 Mon Sep 17 00:00:00 2001 From: cmclark00 Date: Thu, 20 Mar 2025 15:30:34 -0400 Subject: [PATCH] Add 64-bit architecture support and update build configuration --- .github/workflows/build.yml | 7 +++++-- app/build.gradle.kts | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 822d476..09fdff8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,17 +39,20 @@ jobs: - name: Build Release APK run: ./gradlew assembleRelease + - name: Debug directory structure + run: find app/build/outputs -type f -name "*.apk" | sort + - name: Rename APK for tag release if: startsWith(github.ref, 'refs/tags/') run: | mkdir -p renamed_apk - cp app/build/outputs/apk/release/app-release-unsigned.apk renamed_apk/TetriStats-${{ env.VERSION_NAME }}.apk + cp app/build/outputs/apk/release/app-release-universal.apk renamed_apk/TetriStats-${{ env.VERSION_NAME }}.apk - name: Rename APK for push release if: ${{ !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }} run: | mkdir -p renamed_apk - cp app/build/outputs/apk/release/app-release-unsigned.apk renamed_apk/TetriStats-${{ env.VERSION_NAME }}-${{ github.run_number }}.apk + cp app/build/outputs/apk/release/app-release-universal.apk renamed_apk/TetriStats-${{ env.VERSION_NAME }}-${{ github.run_number }}.apk - name: Upload APK as artifact for tag release if: startsWith(github.ref, 'refs/tags/') diff --git a/app/build.gradle.kts b/app/build.gradle.kts index cd58820..f1d83db 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -17,6 +17,11 @@ android { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + // Ensure 64-bit architecture support + ndk { + abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64") + } + ksp { arg("room.schemaLocation", "$projectDir/schemas") } @@ -29,6 +34,8 @@ android { getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) + // Make release version debuggable for now (helps with troubleshooting) + isDebuggable = true } } compileOptions { @@ -41,6 +48,16 @@ android { buildFeatures { viewBinding = true } + + // Explicitly specify supported ABIs to ensure 64-bit compatibility + splits { + abi { + isEnable = true + reset() + include("armeabi-v7a", "arm64-v8a", "x86", "x86_64") + isUniversalApk = true + } + } } dependencies {