Skip to content

fix: locate apk in agp 9 output dir - #203

Open
guzino wants to merge 1 commit into
synonymdev:mainfrom
guzino:fix/agp-9-apk-discovery
Open

fix: locate apk in agp 9 output dir#203
guzino wants to merge 1 commit into
synonymdev:mainfrom
guzino:fix/agp-9-apk-discovery

Conversation

@guzino

@guzino guzino commented Aug 3, 2026

Copy link
Copy Markdown

Refs synonymdev/bitkit-android#1128
Refs synonymdev/bitkit-android#1127

This PR points the Android build helper at the APK directory produced by the AGP 9 build.

Description

AGP 9 removes the legacy variant APIs that renamed APKs inside AGP's own output directories, so synonymdev/bitkit-android#1127 leaves those outputs under their default app-* names and writes the established bitkit-* names as copies under app/build/outputs/bitkit/<variant>. The helper's lookup in app/build/outputs/apk/<flavor>/debug/ returns no file against that build and exits before staging anything.

  • Replaces APK_FLAVOR_DIR with APK_VARIANT_DIR, using the Gradle variant names devDebug and mainnetDebug.
  • Reads the universal APK from app/build/outputs/bitkit/$APK_VARIANT_DIR.
  • Keeps the bitkit-*-universal.apk glob and the staged aut/bitkit_e2e.apk and aut/bitkit_e2e_mainnet.apk filenames unchanged, so no downstream E2E configuration moves.

QA Notes

Manual Tests

  • 1. ./scripts/build-android-apk.sh against chore: upgrade to agp 9 and configure parallelism bitkit-android#1127 → stages aut/bitkit_e2e.apk from bitkit-dev-debug-187-universal.apk.
  • 2. BACKEND=regtest ./scripts/build-android-apk.sh → stages aut/bitkit_e2e.apk from the same universal APK.
  • 3. BACKEND=mainnet ./scripts/build-android-apk.sh → stages aut/bitkit_e2e_mainnet.apk. I could not run this: the checked-in google-services.json has no to.bitkit client, so the mainnet build stops before the lookup. The mainnet branch changes the same single path.
  • 4. regression: full E2E run against the AGP 9 branch → suites resolve the staged APK as before.

Automated Checks

  • bash -n passes and no APK_FLAVOR_DIR or outputs/apk reference remains in the script.
  • Confirmed the previous lookup returns no file against the AGP 9 build, which is the failure this fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant