chore(scaffold): fix variant-specific test + redundant manifest label
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 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,6 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/app_name"
|
|
||||||
android:theme="@style/Theme.RunicGateway">
|
android:theme="@style/Theme.RunicGateway">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ import org.junit.Test
|
|||||||
/**
|
/**
|
||||||
* Placeholder JVM unit test so the `test` CI gate has something to run in M0.
|
* 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+).
|
* 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 {
|
class ScaffoldSanityTest {
|
||||||
@Test
|
@Test
|
||||||
@@ -18,8 +21,7 @@ class ScaffoldSanityTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun buildConfigIsDebuggableInTest() {
|
fun versionNameIsSet() {
|
||||||
// Unit tests run against the debug variant.
|
assertTrue(BuildConfig.VERSION_NAME.isNotBlank())
|
||||||
assertTrue(BuildConfig.DEBUG)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user