Setup example app 2 for App2App testing - #238
Merged
Merged
Conversation
Add an "app2" product flavor alongside "app1" (same javasample
sources, matching the iOS SDK's Debug-App2/Release-App2 build
configurations added for its example app). Same source tree, but
app2 gets its own applicationId suffix (.app2), custom URL scheme
(com.authgear.exampleapp.android.app2), and App Links host
(authgear-demo-android-app2.pandawork.com), wired via per-flavor
buildConfigField/manifestPlaceholders instead of a second source set.
MainApplication's redirect/wechat/app2app URIs are now built from
BuildConfig.AUTHGEAR_REDIRECT_URI_SCHEME/AUTHGEAR_DEMO_HOST at
runtime instead of being hardcoded, so the same source picks up
whichever flavor it was compiled as - mirroring how the iOS example
app reads AuthgearRedirectURIScheme/AuthgearDemoHost from its
per-target Info.plist.
app_name moves from strings.xml to a per-flavor resValue so each
flavor shows its own name ("Authgear Test" / "Authgear Test 2").
App2 needs its own upload key for signing (Android's Play Store
upload-key model is per-app, unlike Apple's shared distribution
certificate), so a separate "app2Release" signingConfig is added
alongside the existing one, gated on new STORE_FILE_APP2/
STORE_PASSWORD_APP2/KEY_ALIAS_APP2/KEY_PASSWORD_APP2 properties -
the existing STORE_FILE/etc. properties for app1 are unchanged.
Verified both `:javasample:assembleApp1Release` and
`:javasample:assembleApp2Release` build successfully, with the
expected distinct applicationId/scheme/host per variant in the
merged manifest.
Still needed outside this repo: a new Play Console app listing for
com.authgear.sdk.exampleapp.android.app2, its own upload keystore,
and DNS/assetlinks.json hosting for
authgear-demo-android-app2.pandawork.com.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add build_aab_app2/upload_aab_app2 fastlane lanes and matching Makefile targets, mirroring build_aab/upload_aab but pointed at the :javasample:bundleApp2Release task and the app2 Play Store listing (com.authgear.sdk.exampleapp.android.app2). The existing build_aab lane's task name is updated from bundleRelease to bundleApp1Release, since introducing the app1/app2 flavor dimension renames that task regardless (Gradle always folds the flavor name into variant task names once any flavor exists on a dimension) - app1's actual signing properties (STORE_FILE/STORE_PASSWORD/KEY_ALIAS/KEY_PASSWORD) and Play package name are unchanged. CI gets a new app2 job with no dependency on the existing app job (both only depend on test), so they build and upload in parallel. Uses new ANDROID_APP2_KEYSTORE_BASE64/ANDROID_APP2_KEYSTORE_PASSWORD/ ANDROID_APP2_KEY_ALIAS/ANDROID_APP2_KEY_PASSWORD secrets for its own upload key; reuses GOOGLE_SERVICE_ACCOUNT_KEY_JSON_BASE64 since both apps live under the same Play Console developer account. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
"Authgear Test" / "Authgear Test 2" -> "Authgear Demo Android" / "Authgear Demo Android 2", matching the iOS example app's "Authgear Demo iOS" / "Authgear Demo iOS 2" naming. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Google Play now requires new app submissions to target API level 36 immediately (existing published apps get a longer rolling deadline, but App2's first-ever release doesn't get that grace period) - hit this as a hard blocker while preparing App2's first manual upload. compileSdk/targetSdk 35 -> 36, buildToolsVersion 35.0.1 -> 36.0.0. AGP 8.5.1 didn't support compileSdk 36 at all, so bumped it to 8.13.2 (latest stable); AGP 8.13.2 in turn requires Gradle >= 8.13, so the wrapper is bumped from 8.7 to 8.13 too (the exact minimum AGP's own error message reported). Also dropped a stale comment referencing a BUILD_TOOLS_VERSION CI variable that no longer exists anywhere in the repo (grepped .github/ to confirm before removing). This affects both app1 and app2 (compileSdk/targetSdk aren't per-flavor here), not just the new variant - App1 will need this requirement eventually anyway per Play's rolling deadline. Verified `:javasample:assembleApp1Release`, `:javasample:assembleApp2Release`, and `:javasample:bundleApp2Release` all build successfully against the new SDK/AGP/Gradle versions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
tung2744
approved these changes
Sep 4, 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.
ref DEV-3732
The CI has been tested, and App 2 was uploaded successfully with this commit: 1ed77cb