Repository navigation
Conversation
ohnorobo
added this pull request to stack #2870
September 30, 2026 13:31
ohnorobo
force-pushed
the
laplante/capacitor-android-release
branch
2 times, most recently
from
October 6, 2026 12:39
fc8f8cc to
7a99ec7
Compare
ohnorobo
marked this pull request as ready for review
October 7, 2026 12:44
|
ohnorobo
force-pushed
the
laplante/capacitor-android-release
branch
3 times, most recently
from
October 12, 2026 12:14
1bbd6a8 to
c7b2f25
Compare
Build the bundle with webpack in production mode, require a version and a Sentry DSN, and write the DSN to environment.json, like the Cordova web build does. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`npm run action client/capacitor/build android -- --buildMode=release` now builds the signed release AAB and the universal APK archive (Outline.zip), taking the same environment variables as the Cordova release build. The version and the signing keystore reach Gradle as project properties. The keystore password is read from the environment, so that it is never on a command line, and the decoded keystore lives in a temporary directory instead of the source tree. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…pacitor app Match the release configuration of the Cordova app: pin the NDK so that AGP can strip the native libraries, package them uncompressed, and shrink the code and resources with R8. This takes the universal APK from 60 MB to 43 MB, the size of the Cordova one. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The helper already extracted universal.apk to check its 16 KB alignment, then threw it away and shipped only the bundletool archive, which the release scripts had to unpack again. Keep the APK in the output directory so the release scripts copy artifacts instead of knowing about bundletool's packaging. Outline.zip stays for the Cordova release path. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ohnorobo
removed this pull request from stack #2870
October 12, 2026 12:34
ohnorobo
force-pushed
the
laplante/capacitor-android-release
branch
from
October 12, 2026 12:35
c7b2f25 to
07f2ef8
Compare
ohnorobo
changed the base branch from
master
to
laplante/capacitor-build-refactor
October 12, 2026 12:35
ohnorobo
added this pull request to stack #2890
October 12, 2026 12:36
Contributor
Author
|
I decided this was too big, so I broke #2889 out of this change into a new PR. |
angelodlfrtr
approved these changes
Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a production release path for the Capacitor Android app, step 2 of the Capacitor migration plan. Until now the Capacitor build was debug-only. Stacked on #2889, which holds the build-tooling groundwork: the shared APK packaging helper and parsing the build parameters once.
takes the same environment variables as the Cordova release build (
SENTRY_DSN,ANDROID_KEY_STORE_CONTENTS,ANDROID_KEY_STORE_PASSWORD,JAVA_HOME) and leaves the signedapp-release.aabanduniversal.apkinclient/capacitor/android/app/build/outputs/bundle/release/.iOS and macOS release builds are not part of this PR. Nothing in
outline-releasechanges yet, so releases keep using Cordova.Commits
web_bundle.mjs) accepts release mode: webpack in production mode, a version and a Sentry DSN are required, and the DSN is written toenvironment.json. These are the same checks the Cordova web build does.app/build.gradletakes the version and the signing keystore as Gradle project properties, andbuild.action.mjsrunsbundleReleaseand then the shared helper from refactor(client): share the Android APK packaging and parse Capacitor build parameters once #2889.universal.apkto check its alignment; it now keeps it next to the AAB, so the release scripts copy artifacts instead of unpacking the bundletool archive.Outline.zipstays for the Cordova release path.Differences from the Cordova release build
Verified
Locally, with a throwaway keystore:
environment.json, and pass the 16 KB alignment check.libgojni.sofrom 12.7 MB to 8.9 MB per ABI.--buildNumber=424242produced an APK whoseversionCodeand bundledenvironment.jsonboth read 424242.On an API 35 emulator, with release builds of both apps signed with the same test key:
tun0comes up, and the server sees the TCP and UDP connectivity checks) and disconnects cleanly.Full release build (1.21.6)
Built as a real release through the outline-release scripts (OutlineFoundation/outline-release#17,
build client android) from #2869's head4dde5a4, which includes this PR. 1.21.6 is a dummy version not intended for publishing, and the publish step has not been tested.s3://outline-release-candidates/client/android/1.21.6/1/, the native debug symbols went to Sentry, and the build is taggedclient_android/v1.21.6-rc.1.🤖 Generated with Claude Code