Kite Config Extension
The single source of truth for your app's identity. Apply to the root project.
The law
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()andonly()beside the fact are the only flow control.rewrite { }is the only word that acts on YOUR files. It arms a by-name task that edits source. dryRun, backups, andonConflictalways apply.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 inject | Works in | Meaning |
|---|---|---|
skip(p...) / only(p...) | root, version, locales, logo, splash | flow control, at root = platform master |
appName / appId | android, ios, desktop | that platform's own value |
appId { suffix } | android, ios, desktop | appended to the shared appId |
android { } / ios { } / desktop { } corner | version, logo | platform detail scope |
version / version { } | android, ios, desktop | that platform's version and numbering |
rebuild, buildNumber, publishedBuildNumber | version in a platform block | counter, exact number, guard floor |
dark { } | splash | dark-mode variant |
typed *Field(...) | buildConfig | generated 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.
for identity suffix corners.
for the formula and version corners.
for the pinned list and the Android res filter.
for icon art and the armed logo rewrite.
for launch-screen art on all three platforms.
for the build-number formula input.
Properties
Android-only settings. Configure with kiteConfig { android { } }.
Android application id: the effective appId for Android.
Generated runtime constants for commonMain. Configure with kiteConfig { buildConfig { } }.
Normalized, de-duplicated locale tags.
Android API level the app compiles against.
Compose Desktop settings. Configure with kiteConfig { desktop { } }.
The resolved desktop build number.
Desktop bundle id: the effective appId for desktop.
Treat AGP, KGP, and Compose versions outside the tested range as supported.
Apple-only settings. Configure with kiteConfig { ios { } }.
The resolved Apple build number, CFBundleVersion.
Apple bundle id: the effective appId for iOS.
The resolved Apple marketing version, CFBundleShortVersionString.
The shared JDK selection, readable from any build file.
App icon art. Configure with kiteConfig { logo { } }.
Where your modules live. Configure with kiteConfig { modules { } }.
Kotlin/Native interop opt-in markers. Configure with kiteConfig { optIns { } }.
The selected shared KMP project path.
The resolved Android versionCode for this build.
Browser Kotlin/JS helpers. Configure with kiteConfig { web { } }.
Functions
Configure SDK levels, the Android id suffix, and the Play re-upload dial.
The identifier platform receives, suffix or exact override applied.
The app name as platform receives it, corner overrides applied.
Generate a Kotlin object of public runtime configuration.
Apply app identity, versions, and installer values to Compose Desktop.
Configure the Apple bundle suffix, build number, paths, and source sync.
The JVM topic: the toolchain that builds and the bytecode level it emits.
The locales topic: the tag list every platform starts from.
Point KiteConfig at your foreground and background art.
Tell KiteConfig where the shared and Android application projects are.
This fact flows only to the given platforms.
Add opt-in markers to the selected Kotlin/Native compilations.
This fact does not flow to the given platforms.
The splash topic. Off until splash { enabled = true }.
Details for version: the shared scheme and rebuild counter.
Configure optional browser Kotlin/JS source generation.