Skip to content

Add generated Android TWA project and fix build workflow#29

Merged
dubsector merged 1 commit into
mainfrom
android-twa-project
Jul 8, 2026
Merged

Add generated Android TWA project and fix build workflow#29
dubsector merged 1 commit into
mainfrom
android-twa-project

Conversation

@dubsector

Copy link
Copy Markdown
Owner

Summary

  • Adds the actual Bubblewrap-generated Android Gradle project under android/, replacing the placeholder twa-manifest.json from Add Web Share Target support and Android AAB build workflow #27 with a real, validated one at android/twa-manifest.json
  • The project was generated via bubblewrap update (not init, which requires an interactive wizard that crashes with ERR_USE_AFTER_CLOSE on non-TTY stdin in this bubblewrap/Node combination) reading the committed manifest directly
  • Fixes a real bug found while generating: enableNotifications: false also disables/un-exports the DelegationService, which is what handles Web Share Target routing, not just push notifications — left it enabled
  • Rewrites android-build.yml: it previously ran bubblewrap init on every trigger, which needs a --manifest URL and generates a fresh project from scratch rather than using the committed one. Now it runs bubblewrap build against the committed project, gets its Android SDK from android-actions/setup-android, and passes the keystore via --signingKeyPath/--signingKeyAlias flags instead of mutating the manifest file
  • Verified the generated AndroidManifest.xml contains a correct SEND/SEND_MULTIPLE intent-filter for our declared video MIME types, and the METADATA_SHARE_TARGET meta-data pointing at the share_target JSON

Test plan

  • Confirmed android/twa-manifest.json schema matches Bubblewrap's actual TwaManifestJson type (verified against source)
  • Ran bubblewrap update locally, confirmed successful non-interactive project generation
  • Verified the generated AndroidManifest.xml's share-target intent-filter and DelegationService config
  • Confirmed no keystore file, personal absolute paths, or literal secrets are present anywhere in the diff
  • Trigger the Build Android AAB workflow and confirm it produces a signed .aab in CI (untested — local Windows Gradle invocation hit environment-specific issues unrelated to the Linux CI environment this workflow actually runs in)

The project is generated via 'bubblewrap update' (not 'init', which
requires an interactive wizard that crashes on non-TTY stdin in this
bubblewrap/Node combination) reading android/twa-manifest.json, which
replaces the old placeholder at the repo root.

Along the way: enableNotifications was set to false since we don't
use push notifications, but that flag also gates whether the
DelegationService - which handles share-target routing, not just
notifications - is enabled/exported at all. Left it on.

android-build.yml previously called 'bubblewrap init' every run,
which needs a --manifest URL and generates a fresh project from
scratch rather than using the committed one. Now it just runs
'bubblewrap build' against the committed project, with the Android
SDK provided by android-actions/setup-android and the keystore
passed via --signingKeyPath/--signingKeyAlias instead of mutating
the manifest file.
@dubsector
dubsector merged commit 0f33e55 into main Jul 8, 2026
4 checks passed
@dubsector
dubsector deleted the android-twa-project branch July 8, 2026 00:52
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