Skip to content

Installation

kirich1409 edited this page May 18, 2026 · 1 revision

Installation

Android / KMP — Gradle

Repositories

// settings.gradle.kts
dependencyResolutionManagement {
    repositories {
        mavenCentral()
        google()
    }
}

Plugin and BOM

// build.gradle.kts
plugins {
    id("dev.androidbroadcast.featured") version "<version>"
}

dependencies {
    implementation(platform("dev.androidbroadcast.featured:featured-bom:<version>"))

    // Core runtime — always required
    implementation("dev.androidbroadcast.featured:featured-core")

    // Compose extensions (collectAsState, LocalConfigValues)
    implementation("dev.androidbroadcast.featured:featured-compose")

    // Local persistence providers — pick one or both
    implementation("dev.androidbroadcast.featured:featured-datastore-provider")
    implementation("dev.androidbroadcast.featured:featured-sharedpreferences-provider")

    // Remote provider
    implementation("dev.androidbroadcast.featured:featured-firebase-provider")

    // Debug UI — debug builds only
    debugImplementation("dev.androidbroadcast.featured:featured-registry")
    debugImplementation("dev.androidbroadcast.featured:featured-debug-ui")
}

The Gradle plugin ID is dev.androidbroadcast.featured. The plugin itself is also published as a Maven artifact at dev.androidbroadcast.featured:featured-gradle-plugin.

Artifact reference

Artifact Purpose
featured-core Core runtime: ConfigValues, ConfigParam, ConfigValue, provider interfaces
featured-compose Compose extensions: collectAsState, LocalConfigValues
featured-datastore-provider DataStoreConfigValueProvider (Android, Jetpack DataStore)
featured-sharedpreferences-provider SharedPreferencesConfigValueProvider (Android only)
featured-nsuserdefaults-provider NSUserDefaultsConfigValueProvider (iOS/macOS, NSUserDefaults)
featured-javaprefs-provider JavaPreferencesConfigValueProvider (JVM/Desktop, java.util.prefs)
featured-firebase-provider FirebaseConfigValueProvider (remote, Firebase Remote Config)
featured-configcat-provider ConfigCatConfigValueProvider (remote, ConfigCat KMP SDK)
featured-registry FlagRegistry — flag registration for the debug screen
featured-debug-ui FeatureFlagsDebugScreen Composable
featured-bom BOM — manages all module versions from one place
featured-gradle-plugin The Gradle plugin (applied via plugin ID, not dependency)
featured-testing fakeConfigValues { } DSL for unit tests (test scope only)

Testing

Add the testing artifact to your test source set:

testImplementation("dev.androidbroadcast.featured:featured-testing")
// or for Android unit tests:
testImplementation("dev.androidbroadcast.featured:featured-testing")

featured-testing provides fakeConfigValues { } — a suspend DSL that builds a ConfigValues backed by an in-memory provider with optional initial overrides. See Best Practices — Testing with fake values for usage.

For JVM-only projects, the featured-javaprefs-provider artifact is available separately:

implementation("dev.androidbroadcast.featured:featured-javaprefs-provider")

iOS — Swift Package Manager

Add the package to your Package.swift:

// Package.swift
dependencies: [
    .package(
        url: "https://github.com/AndroidBroadcast/Featured",
        from: "<version>"
    )
],
targets: [
    .target(
        name: "YourTarget",
        dependencies: [
            .product(name: "FeaturedCore", package: "Featured"),
        ]
    )
]

Or add it in Xcode via File → Add Package Dependencies using the URL https://github.com/AndroidBroadcast/Featured.

The primary Swift product is FeaturedCore. It exposes the Kotlin API through SKIE — no Kotlin toolchain is required in the Xcode project; the framework is pre-built by the KMP Gradle build.

JVM / Desktop

Apply the same Gradle plugin and BOM. The relevant artifacts for pure JVM projects are:

plugins {
    id("dev.androidbroadcast.featured") version "<version>"
}

dependencies {
    implementation(platform("dev.androidbroadcast.featured:featured-bom:<version>"))
    implementation("dev.androidbroadcast.featured:featured-core")
    implementation("dev.androidbroadcast.featured:javaprefs-provider")
}

JavaPreferencesConfigValueProvider persists overrides using java.util.prefs.Preferences. Storage is OS-specific: the registry on Windows, a plist on macOS, and ~/.java on Linux.

Clone this wiki locally