-
Notifications
You must be signed in to change notification settings - Fork 0
Debug UI
Featured ships a Compose-based debug screen that lets developers and QA override flag values at runtime without recompiling. Include it in debug builds only.
// build.gradle.kts
debugImplementation("dev.androidbroadcast.featured:featured-debug-ui")Never include this in implementation or releaseImplementation — it is intended exclusively for debug builds.
FeatureFlagsDebugScreen requires an explicit List<ConfigParam<*>> that enumerates every flag you want visible in the debug screen.
Recommended — aggregator plugin (multi-module projects):
Apply the dev.androidbroadcast.featured.application plugin in your app module and declare each feature module as an aggregation dependency:
// :app/build.gradle.kts
plugins {
id("dev.androidbroadcast.featured")
id("dev.androidbroadcast.featured.application")
}
dependencies {
featuredAggregation(project(":feature-checkout"))
featuredAggregation(project(":feature-profile"))
// Modules with enum flags also need a regular implementation dep:
implementation(project(":feature-checkout"))
}
// Wire the generated source set:
kotlin.sourceSets.commonMain.kotlin.srcDir(
layout.buildDirectory.dir("generated/featured/commonMain"),
)The plugin generates object GeneratedFeaturedRegistry { val all: List<ConfigParam<*>> } at build time, aggregating flags from all declared modules.
Alternative — inline list (small / single-module projects):
val registry = listOf(MyFlags.flagA, MyFlags.flagB, MyFlags.flagC)Navigate to FeatureFlagsDebugScreen from your in-app debug menu (a drawer, a shake gesture, a long-press shortcut, or a dedicated debug activity):
import dev.androidbroadcast.featured.debugui.FeatureFlagsDebugScreen
@Composable
fun DebugMenuScreen(configValues: ConfigValues) {
FeatureFlagsDebugScreen(
configValues = configValues,
registry = GeneratedFeaturedRegistry.all,
)
}The screen lists all registry flags with their current values and sources. Tapping a flag opens an inline editor to set an override. The override is written through configValues.override(…) and persists until configValues.resetOverride(…) or configValues.clearOverrides() is called.
All 5 registered flags grouped by category (ui, Other, promotions, checkout). Boolean flags show a toggle with their source badge (LOCAL or DEFAULT).

main_button_red toggled to OFF. The toggle turns grey, the LOCAL badge stays, and a Reset link appears below to restore the default.
