KiteConfigExtension

The single source of truth for your app's identity. Apply to the root project.

The law

  1. Facts always flow. A declared fact reaches every platform found, on every build, in memory or as files under build/. Declaring it is the consent. skip() and only() beside the fact are the only flow control.

  2. rewrite { } is the only word that acts on YOUR files. It arms a by-name task that edits source. dryRun, backups, and onConflict always apply.

  3. One topic, one block. Platform corners nest inside topics. Platform blocks hold only platform-exclusive things.

Three lines are a complete setup:

kiteConfig {
appName = "Jetzy"
appId = "com.example.jetzy"
version = "1.4.0"
}

Locales auto-detect from Compose resources, the shared module and the app modules are detected too. Everything else below is optional.

The full surface

kiteConfig {
appName = "Jetzy"
appId = "com.example.jetzy"

jvm {
toolchain = 21 // build with this JDK
target = 17 // Java and Kotlin bytecode level together
}

version = "1.4.0"
version {
// scheme { v -> "..." } // optional: your own build-number scheme
rebuild = 0 // re-upload the same version to a store
}

locales { tags = listOf("en", "ar", "fr") } // omit to detect them

logo {
foreground = file("art/logo-fg.png")
background = color("#0B0B0F") // or image(file("art/bg.png"))
foregroundScale = 0.75 // optional, per renderer default
}

splash {
enabled = true // off until you say this
dark { backgroundColor = "#000000" }
}

optIns {
add("kotlinx.cinterop.ExperimentalForeignApi")
}

android {
appId { suffix = ".android" } // applicationId = appId + suffix
version {
rebuild = 1 // this platform's counter
publishedBuildNumber = "1001003090" // new numbers must beat it
}
locales { filterResources = true } // drop res outside the list
splash { theme = "AppTheme" } // the theme the splash inherits
sdk(min = 26, target = 36, compile = 36)
}

ios {
appName = "Jetzy Lite" // only this platform differs
infoPlist { proMotion = true }
// xcodeTargets("iosApp") // only with several app targets
}

desktop {
appId { suffix = ".desktop" }
linuxPackageName = "jetzy"
}

web { ioWorker { targets("js") } }

buildConfig { // presence generates into build/
packageName = "com.example.jetzy"
stringField("API_HOST", "api.jetzy.app")
}

modules { shared = ":shared" } // only when detection guesses wrong

autoApply = true // ordinary builds apply the changes
dryRun = false
backups = true
// ignoreVersionGuards = true // off the tested AGP/KGP/Compose matrix, on your own head
}

What you can inject where

You can injectWorks inMeaning
skip(p...) / only(p...)root, version, locales, logo, splashflow control, at root = platform master
appName / appIdandroid, ios, desktopthat platform's own value
appId { suffix }android, ios, desktopappended to the shared appId
android { } / ios { } / desktop { } cornerversion, logoplatform detail scope
version / version { }android, ios, desktopthat platform's version and numbering
rebuild, buildNumber, publishedBuildNumberversion in a platform blockcounter, exact number, guard floor
dark { }splashdark-mode variant
typed *Field(...)buildConfiggenerated constants

Tasks

kiteCheck, kiteDoctor, kiteVerify, and kitePlan are read-only and always safe. kiteApply applies the configured source changes for every selected platform; kiteApplyAndroid and kiteApplyIos apply one. With autoApply = true an ordinary build runs the plan for the platform it is building. CLI overrides: -Pkiteconfig.dryRun=true, -Pkiteconfig.backups=false.

Read-back

This extension implements KiteConfigValues, so every resolved value is readable from any build file in the project:

import io.github.yuroyami.kiteconfig.kiteConfig

versionCode = kiteConfig.versionCode.get()

That view is read-only and covers version, identity, locales, the shared module path, and the Android SDK levels. See KiteConfigValues for the full list and for the two values that resolve later than the rest.

See also

for name overrides and flow.

KiteIdScope

for identity suffix corners.

for the formula and version corners.

for the pinned list and the Android res filter.

KiteConfigLogoExtension

for icon art and the armed logo rewrite.

for launch-screen art on all three platforms.

for the build-number formula input.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Android-only settings. Configure with kiteConfig { android { } }.

Link copied to clipboard
open override val androidApplicationId: Provider<String>

Android application id: the effective appId for Android.

Link copied to clipboard
abstract override val appId: Property<String>

The reverse-DNS identifier shared by every platform.

Link copied to clipboard
abstract override val appName: Property<String>

The display name users see on their home screen.

Link copied to clipboard
abstract val autoApply: Property<Boolean>

Apply the configured source changes as part of an ordinary build.

Link copied to clipboard
abstract val backups: Property<Boolean>

Keep a first-contact recovery copy before rewriting a file.

Link copied to clipboard

Generated runtime constants for commonMain. Configure with kiteConfig { buildConfig { } }.

Link copied to clipboard
open override val canonicalLocales: Provider<List<String>>

Normalized, de-duplicated locale tags.

Link copied to clipboard
open override val compileSdk: Provider<Int>

Android API level the app compiles against.

Link copied to clipboard

Compose Desktop settings. Configure with kiteConfig { desktop { } }.

Link copied to clipboard
open override val desktopBuildNumber: Provider<String>

The resolved desktop build number.

Link copied to clipboard
open override val desktopBundleId: Provider<String>

Desktop bundle id: the effective appId for desktop.

Link copied to clipboard
abstract val dryRun: Property<Boolean>

Make the explicit source-changing tasks report what they would do and write nothing.

Link copied to clipboard
abstract val ignoreVersionGuards: Property<Boolean>

Treat AGP, KGP, and Compose versions outside the tested range as supported.

Link copied to clipboard

Apple-only settings. Configure with kiteConfig { ios { } }.

Link copied to clipboard
open override val iosBuildNumber: Provider<String>

The resolved Apple build number, CFBundleVersion.

Link copied to clipboard
open override val iosBundleId: Provider<String>

Apple bundle id: the effective appId for iOS.

Link copied to clipboard
open override val iosMarketingVersion: Provider<String>

The resolved Apple marketing version, CFBundleShortVersionString.

Link copied to clipboard
open override val jvmTarget: Provider<Int>

The shared bytecode level, readable from any build file.

Link copied to clipboard
open override val jvmToolchain: Provider<Int>

The shared JDK selection, readable from any build file.

Link copied to clipboard

App icon art. Configure with kiteConfig { logo { } }.

Link copied to clipboard
open override val minSdk: Provider<Int>

Lowest Android API level the app runs on.

Link copied to clipboard

Where your modules live. Configure with kiteConfig { modules { } }.

Link copied to clipboard
open override val ndk: Provider<String>

Pinned Android NDK version, in Android's major.minor.build form.

Link copied to clipboard

Kotlin/Native interop opt-in markers. Configure with kiteConfig { optIns { } }.

Link copied to clipboard
open override val resolvedSharedProjectPath: Provider<String>

The selected shared KMP project path.

Link copied to clipboard
open override val targetSdk: Provider<Int>

Android API level the app targets.

Link copied to clipboard
abstract override val version: Property<String>

The release version you show to users, as x.y.z.

Link copied to clipboard
open override val versionCode: Provider<Int>

The resolved Android versionCode for this build.

Link copied to clipboard

Browser Kotlin/JS helpers. Configure with kiteConfig { web { } }.

Functions

Link copied to clipboard
fun android(action: Action<in KiteConfigAndroidExtension>)

Configure SDK levels, the Android id suffix, and the Play re-upload dial.

Link copied to clipboard
open override fun appIdFor(platform: KitePlatform): Provider<String>

The identifier platform receives, suffix or exact override applied.

Link copied to clipboard
open override fun appNameFor(platform: KitePlatform): Provider<String>

The app name as platform receives it, corner overrides applied.

Link copied to clipboard

Generate a Kotlin object of public runtime configuration.

Link copied to clipboard
fun desktop(action: Action<in KiteConfigDesktopExtension>)

Apply app identity, versions, and installer values to Compose Desktop.

Link copied to clipboard
fun ios(action: Action<in KiteConfigIosExtension>)

Configure the Apple bundle suffix, build number, paths, and source sync.

Link copied to clipboard
fun jvm(action: Action<in KiteJvmScope>)

The JVM topic: the toolchain that builds and the bytecode level it emits.

Link copied to clipboard
fun locales(action: Action<in KiteLocalesScope>)

The locales topic: the tag list every platform starts from.

Link copied to clipboard
fun logo(action: Action<in KiteLogoScope>)

Point KiteConfig at your foreground and background art.

Link copied to clipboard
fun modules(action: Action<in KiteConfigModulesExtension>)

Tell KiteConfig where the shared and Android application projects are.

Link copied to clipboard
fun only(vararg refs: KitePlatformRef)

This fact flows only to the given platforms.

Link copied to clipboard
fun optIns(action: Action<in KiteConfigNativeOptInsExtension>)

Add opt-in markers to the selected Kotlin/Native compilations.

Link copied to clipboard
fun skip(vararg refs: KitePlatformRef)

This fact does not flow to the given platforms.

Link copied to clipboard
fun splash(action: Action<in KiteSplashScope>)

The splash topic. Off until splash { enabled = true }.

Link copied to clipboard
fun version(action: Action<in KiteVersionScope>)

Details for version: the shared scheme and rebuild counter.

Link copied to clipboard
fun web(action: Action<in KiteConfigWebExtension>)

Configure optional browser Kotlin/JS source generation.