Android: fix JVM target mismatch + opt-in side-by-side debug install#72
Merged
Merged
Conversation
quorum-crypto and quorum-translation only set JVM target under AGP < 8.
With AGP 8+ both fall through to defaults, where Java compiles to 17 and
Kotlin to 21, which Gradle rejects ("Inconsistent JVM-target
compatibility").
Set source/target compatibility and kotlinOptions.jvmTarget to 17
unconditionally, matching the rest of the Android build.
Add a Gradle property flag that, when set, gives debug builds a `.debug` applicationId suffix and `-debug` versionName suffix. Lets developers install dev builds alongside production/sideloaded release APKs on the same device without uninstalling and losing local app data. Default behavior (no flag) is unchanged: `expo run:android` produces the same APK with the same package name as before. The feature is purely opt-in via `expo run:android -- -PsideBySide=true` or `./gradlew :app:assembleDebug -PsideBySide=true`.
Override app_name to "Quorum Debug" via the existing debug source set, so debug installs are visually distinguishable from production installs on the same device. Especially useful with -PsideBySide=true where the prod and debug apps coexist on one device. Release builds are unaffected: src/debug/ is only merged for the debug variant.
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.
Two related changes that together unblock local Android development on a phone that already has the production Quorum installed.
1. Fix: pin local module JVM target to 17 (
d051669)quorum-cryptoandquorum-translationonly set their JVM target when AGP version < 8. With current AGP (8+), Java compiles to 17 but Kotlin defaults to 21, which Gradle rejects:The
expo run:androidbuild fails for this reason on a fresh checkout today. Setting both to 17 unconditionally matches the rest of the Android build and restores building.2. Feature: opt-in
-PsideBySide=trueflag (40f68c9)When set, debug builds get a
.debugapplicationId suffix and-debugversionName suffix. This lets a developer install the dev build alongside the production app (Play Store / sideloaded release APK) on the same device without uninstalling and losing local app data.Default behavior is unchanged. Verified empirically: running
./gradlew :app:assembleDebugwithout the flag produces an APK withapplicationId: com.quilibrium.quorummobile(same as before this PR).Invocation:
Note:
expo run:androiddoes not forward unknown args to Gradle, so the flag has to be passed via direct Gradle invocation.3. Feature: label all debug builds as "Quorum Debug" in the launcher (
80b7c1a)Override
app_nameto "Quorum Debug" via the existingsrc/debug/source set so debug installs are visually distinguishable from the production app on the same home screen. Release builds are unaffected.