Split out of #318, where it arrived as a drive-by alongside the launcher-icon fix.
What
buildTypes {
getByName("debug") {
applicationIdSuffix = ".debug"
}
// ...
}
Why it is worth having
A debug build currently shares com.markleaf.notes with the production app, so
installing one over the other fails with INSTALL_FAILED_UPDATE_INCOMPATIBLE
(different signing keys) on any device that already has the Play/GitHub build.
The workaround today is uninstalling the real app, which throws away its data.
With the suffix the two coexist and verification stops being destructive.
Why it could not land in #318 as-is
.github/scripts/launch-smoke.sh hardcodes the package name in two places:
- the package-manager poll:
adb shell pm path com.markleaf.notes
- the launch itself:
adb shell am start -W -n com.markleaf.notes/.MainActivity
The job installs app/build/outputs/apk/debug/app-debug.apk, so with the suffix
the installed package is com.markleaf.notes.debug and the poll never matches.
launch-smoke would fail on every run and exit with
Package manager never listed com.markleaf.notes after a successful install.
That job is deliberately non-required because it is flaky, but a non-required
check that always fails is worse than no check: it stops carrying any signal.
Scope
Checked while reviewing #318: no unit test, Roborazzi test or scripts/verify-*.ps1
asserts the literal application id, and SettingsScreen reads it through
BuildConfig.APPLICATION_ID, so the visible "application id" row follows the
suffix by itself. launch-smoke.sh is the only hardcoded consumer.
Split out of #318, where it arrived as a drive-by alongside the launcher-icon fix.
What
buildTypes { getByName("debug") { applicationIdSuffix = ".debug" } // ... }Why it is worth having
A debug build currently shares
com.markleaf.noteswith the production app, soinstalling one over the other fails with
INSTALL_FAILED_UPDATE_INCOMPATIBLE(different signing keys) on any device that already has the Play/GitHub build.
The workaround today is uninstalling the real app, which throws away its data.
With the suffix the two coexist and verification stops being destructive.
Why it could not land in #318 as-is
.github/scripts/launch-smoke.shhardcodes the package name in two places:adb shell pm path com.markleaf.notesadb shell am start -W -n com.markleaf.notes/.MainActivityThe job installs
app/build/outputs/apk/debug/app-debug.apk, so with the suffixthe installed package is
com.markleaf.notes.debugand the poll never matches.launch-smokewould fail on every run and exit withPackage manager never listed com.markleaf.notes after a successful install.That job is deliberately non-required because it is flaky, but a non-required
check that always fails is worse than no check: it stops carrying any signal.
Scope
applicationIdSuffix = ".debug"to thedebugbuild type. (isDebuggable = trueis the default and is not needed.).github/scripts/launch-smoke.shso the poll, theam startcomponent and the error message all follow the suffix.${applicationId}.fileprovider, so it should follow automatically, but worth checking a share/export once on device.connectedDebugAndroidTeststill targets the right package.Checked while reviewing #318: no unit test, Roborazzi test or
scripts/verify-*.ps1asserts the literal application id, and
SettingsScreenreads it throughBuildConfig.APPLICATION_ID, so the visible "application id" row follows thesuffix by itself.
launch-smoke.shis the only hardcoded consumer.