diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index da5d00d..2a12a48 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -26,16 +26,10 @@ jobs: - name: Set up Gradle uses: gradle/actions/setup-gradle@v4 - - name: Cache Android debug keystore - uses: actions/cache@v4 - with: - path: ~/.android/debug.keystore - key: android-debug-keystore-${{ runner.os }} - - name: Make Gradle wrapper executable run: chmod +x gradlew - - name: Build debug APK + - name: Build update-compatible APK run: ./gradlew assembleDebug -PciVersionCode=${{ github.run_number }} -PciVersionName=1.0.${{ github.run_number }} - name: Prepare release assets diff --git a/app/build.gradle b/app/build.gradle index 72d0204..4341226 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,11 +4,21 @@ plugins { def ciVersionCode = providers.gradleProperty("ciVersionCode").getOrNull() def ciVersionName = providers.gradleProperty("ciVersionName").getOrNull() +def sharedDebugKeystore = file("signing/bible-daily-debug.keystore") android { namespace "com.bibliadiaria.app" compileSdk 35 + signingConfigs { + sharedDebug { + storeFile sharedDebugKeystore + storePassword "android" + keyAlias "androiddebugkey" + keyPassword "android" + } + } + defaultConfig { applicationId "com.bibliadiaria.app" minSdk 23 @@ -17,6 +27,14 @@ android { versionName ciVersionName != null ? ciVersionName : "1.0" } + buildTypes { + debug { + if (sharedDebugKeystore.exists()) { + signingConfig signingConfigs.sharedDebug + } + } + } + compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 diff --git a/app/signing/README.md b/app/signing/README.md new file mode 100644 index 0000000..1dc0325 --- /dev/null +++ b/app/signing/README.md @@ -0,0 +1,3 @@ +This debug keystore is intentionally shared by local and GitHub Actions builds so sideloaded APK updates keep the same Android signing identity. + +Do not use this key for Play Store or production release signing. diff --git a/app/signing/bible-daily-debug.keystore b/app/signing/bible-daily-debug.keystore new file mode 100644 index 0000000..dd872c6 Binary files /dev/null and b/app/signing/bible-daily-debug.keystore differ diff --git a/build/reports/problems/problems-report.html b/build/reports/problems/problems-report.html index 085cc1c..ae3aa1c 100644 --- a/build/reports/problems/problems-report.html +++ b/build/reports/problems/problems-report.html @@ -650,7 +650,7 @@ code + .copy-button {