From 6ebaff8fb5aba36ae55e113fa8969cb2fd68974e Mon Sep 17 00:00:00 2001 From: wtclaude Date: Sun, 19 Jul 2026 13:07:03 -0500 Subject: [PATCH] chore(scaffold): fix variant-specific test + redundant manifest label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Validated the scaffold with a real local build (Android SDK via Android Studio: platform 35 + build-tools 35.0.0); `./gradlew lint test assembleDebug` now passes end-to-end and produces a debug APK. Two fixes it surfaced: - ScaffoldSanityTest asserted BuildConfig.DEBUG, which fails under testReleaseUnitTest (the `test` task runs both variants). Replace with a variant-agnostic VERSION_NAME check. - Remove the redundant android:label on MainActivity (inherits the application label) — clears the RedundantLabel lint warning. Co-Authored-By: Claude --- app/src/main/AndroidManifest.xml | 1 - .../test/java/com/runicgateway/app/ScaffoldSanityTest.kt | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 209e0ea..c107df1 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -20,7 +20,6 @@ diff --git a/app/src/test/java/com/runicgateway/app/ScaffoldSanityTest.kt b/app/src/test/java/com/runicgateway/app/ScaffoldSanityTest.kt index 0210009..9a49730 100644 --- a/app/src/test/java/com/runicgateway/app/ScaffoldSanityTest.kt +++ b/app/src/test/java/com/runicgateway/app/ScaffoldSanityTest.kt @@ -10,6 +10,9 @@ import org.junit.Test /** * Placeholder JVM unit test so the `test` CI gate has something to run in M0. * Real repository / view-model tests arrive with the functional pass (M1+). + * + * Assertions must be variant-agnostic: the `test` task runs both the debug and + * release unit-test variants, so nothing here may depend on `BuildConfig.DEBUG`. */ class ScaffoldSanityTest { @Test @@ -18,8 +21,7 @@ class ScaffoldSanityTest { } @Test - fun buildConfigIsDebuggableInTest() { - // Unit tests run against the debug variant. - assertTrue(BuildConfig.DEBUG) + fun versionNameIsSet() { + assertTrue(BuildConfig.VERSION_NAME.isNotBlank()) } }