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
from
October 7, 2026 13:52
934dda3 to
f0804dd
Compare
…helper Move the bundletool download, universal APK generation and 16 KB alignment check out of the Cordova build action into client/build, unchanged, so the Capacitor release build can use them too. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
build.action.mjs computed the build number, then ran web_build, which computed its own. Across an hour boundary the native version code and the APP_BUILD_NUMBER in environment.json disagreed. getBuildParameters now accepts --buildNumber, and the Capacitor build passes its number down. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`--buildNumber N` left N behind as a stray positional argument, which the web build then took for the platform. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ohnorobo
force-pushed
the
laplante/capacitor-android-release
branch
from
October 8, 2026 10:10
f0804dd to
1bbd6a8
Compare
This branch has not been deployed
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.
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
client/build/android_universal_apk.mjs, unchanged, so both build actions use the same code.web_build.action.mjsaccepts 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.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.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