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"
version = "1.4.0"
id = "com.example.jetzy"
}

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") {
ios("Jetzy Lite") // platform value override
skip(desktop) // this fact does not flow there
}

jvmTarget = 21 // Java + Kotlin JVM level, whole build

id("com.example.jetzy") {
android { suffix = ".android" } // applicationId = base + suffix
ios { suffix = ".ios" } // bundle id = base + suffix
desktop { suffix = ".desktop" }
}

version("1.4.0") {
// formula { v -> ... } // optional: your own build-number formula
android {
reupload = 1 // re-upload same version to Play
shipped = 1001003090 // highest code ever shipped, guard
}
ios { shipped = "1001003090" }
desktop { shipped = "1001003090" }
}

locales {
pin("en", "ar", "fr") // hand list, detection skipped
filterAndroidRes = true // drop Android res outside the list
}

logo {
foreground = file("art/logo-fg.png")
backgroundColor = "#0B0B0F"
android { safeZone = 0.611 }
desktop { roundMac = true } // desktop icons flow from presence
rewrite { replaceOld = true } // arms kiteRewriteLogo (source edits)
}

splash {
// empty block already works: art defaults to logo, plate to its color
dark { backgroundColor = "#000000" }
android { theme = "AppTheme" } // your app theme; the generated
// KiteSplash style inherits it
rewrite { } // arms the iOS launch-screen delivery
}

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

android { sdk(min = 26, target = 36, compile = 36) }

ios {
deploymentTarget = "15.0"
rewrite { // arms kiteRewriteXcode (source edits)
targets("iosApp")
cleanPlist = true
}
}

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

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, appName, id, version, locales, logo, splashflow control, at root = platform master
android("v") / ios("v") / desktop("v")appNameplatform value override
android { } / ios { } / desktop { } cornerid, version, logoplatform detail scope
pinversion corners, localesmanual value, machinery skipped
reupload, shipped, formulaversion and its cornersstore counter, guard floor, number formula
suffixid cornersappended to the base id
rewrite { }logo, splash, iosthe only acting word, arms a task
dark { }splashdark-mode variant
typed *Field(...)buildConfiggenerated constants

Tasks

kiteCheck, kiteDoctor, kiteVerify, kitePlan are read-only and always safe. kiteRewriteLogo and kiteRewriteXcode run only when armed by a rewrite { } block and only when you invoke them. 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.

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: id plus its android corner suffix.

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 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: id plus its desktop corner suffix.

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 override val id: Property<String>

Reverse-DNS id base shared by every platform. Simple form of id.

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: id plus its ios corner suffix.

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

The resolved Apple marketing version, CFBundleShortVersionString.

Link copied to clipboard
abstract override val jvmTarget: Property<Int>

Java and Kotlin JVM level for the whole build, for example 21.

Link copied to clipboard

App icon installation. 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
fun appName(value: String, action: Action<in KiteAppNameScope>)

Detailed form of appName: per-platform overrides and flow modifiers.

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 id(value: String, action: Action<in KiteIdScope>)

Detailed form of id: per-platform suffix corners and flow modifiers.

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 locales(action: Action<in KiteLocalesScope>)

The locales topic: pinned list, Android res filter, and flow modifiers.

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

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): <Error class: unknown class>

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): <Error class: unknown class>

This fact does not flow to the given platforms.

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

The splash topic: launch-screen art. Presence flows Android and desktop.

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

Detailed form of version: the shared formula and platform corners.

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

Configure optional browser Kotlin/JS source generation.