Setup KMP App
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
iru-setup-kmp-app generates a complete, buildable Kotlin Multiplatform app for Android and iOS at the repository
root: a Gradle Kotlin DSL build, a shared/ KMP module, an androidApp/ application module and an iosApp/
SwiftUI host app whose Xcode project is generated by XcodeGen. Its templates live in four reference files
(gradle-templates.md, shared-templates.md, android-templates.md, ios-templates.md) and were verified against
the real toolchain.
Purpose
The skill produces the scaffold contract that the KMP coding and gate skills (iru-kmp-code-one-task,
iru-kmp-test, iru-kmp-coverage, iru-kmp-code-quality, iru-kmp-dokka, iru-kmp-bump-version) and
iru-setup-kmp-github-workflows detect and call. It wires the version properties (VERSION_NAME/VERSION_CODE in
gradle.properties), a version catalog, a shared/ module on the AGP com.android.kotlin.multiplatform.library
plugin with iosArm64 and iosSimulatorArm64 targets producing a static Shared framework, an androidApp/
module with env-driven release signing, and an iosApp/ project driven by iosApp/project.yml. The ui input
chooses between Compose Multiplatform (one App() in shared/commonMain) and native UI (shared logic only, with
Jetpack Compose on Android and SwiftUI on iOS).
It also configures detekt, ktlint, Android Lint, Kover (aggregated at the root with an 80% koverVerify bound),
Dokka 2, SwiftLint and an optional sonar {} block, with sample code and tests in every source set so coverage
starts at 100%. Following the catalog’s UI contract (see Building user
interfaces) it also writes a root .ui-quality.yml and UI test wiring: a GreetingScreenTest that captures
.ui-screenshots/screen/GreetingScreen/ across states, left-to-right/right-to-left and light/dark on Android and iOS,
with an accessibility check at the configured level. It announces whether it is scaffolding from scratch or updating an existing project, asks
Update / Keep as is / Replace / Stop for each existing file group (unless on-existing decides), never overwrites
hand-written source, and treats the JetBrains wizard’s single composeApp/ layout as foreign. Every toolchain
version is looked up at run time, with a verified fallback table. Like iru-setup-android-app, it writes no
publishing block.
Plugin
Shipped by the iru-kmp plugin of the ai-catalog marketplace (install with /plugin install iru-kmp@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
|
Asked (Compose Multiplatform recommended). |
|
No |
Launcher label on both platforms. |
Asked (or the existing value when updating). |
|
No |
Android |
Asked. |
|
No |
iOS |
|
|
No |
Kotlin base package (Android app package is |
|
|
No |
|
The repository name. |
|
No |
Android SDK levels. |
|
|
No |
Minimum iOS version. |
Looked up from installed simulator runtimes (fallback |
|
No |
Initial app version written to |
|
|
No |
Apple Developer Team ID written to |
Empty (filled in later or supplied by CI). |
|
No |
Recorded in the report (and consumed later by |
Asked. |
|
No |
Shared bootstrap inputs; they only drive the |
|
|
No |
|
Recommended from |
|
No |
|
|
|
No |
|
|
|
No |
|
Detected. |
|
No |
|
|
Unknown keys from a full shared-args set (publish, ci-tests, pages, …) are ignored and named in the report.
Outputs
-
Gradle build files: wrapper (
gradlew,gradlew.bat,gradle/wrapper/*withdistributionSha256Sum),settings.gradle.kts, rootbuild.gradle.kts(Kover aggregation, optionalsonar {}),gradle.properties,gradle/libs.versions.toml,detekt.yml,.editorconfig,.ui-quality.yml(accessibility,directions,themes). -
shared/module:build.gradle.ktsand sample sources and tests incommonMain,commonTest,androidMain,androidHostTest,iosMainandiosTest(plusApp.ktandMainViewController.ktforui: compose). Forui: composethe UI test wiring too:commonTestuitest/UiScreenshots.kt,GreetingScreenTest.kt, and a RobolectricUiTestbase class on the Android host. -
androidApp/module: build file, ProGuard rules, manifest, resources,MainActivity.ktand a Robolectric test (forui: nativealso aGreetingScreenTestwithcreateComposeRule()and auitest/UiScreenshots.kthelper). -
iosApp/:project.yml,Configuration/Config.xcconfig,.swiftlint.yml, Swift sources,Info.plistandiosAppTests(plusGreetingModel.swift,GreetingScreenTests.swiftand anImageRenderer-basedUIScreenshots.swifthelper forui: native). The generated.xcodeprojandlocal.propertiesare never written. -
A verification run (Step 7) of the build, the gate tasks and, on macOS, the iOS framework, XcodeGen and
xcodebuild teststeps, plus a UI-captures check that.ui-screenshots/screen/GreetingScreen/holds one PNG per state × direction × theme per platform; anything not runnable (for example iOS captures on a non-macOS host) is reported as unverified. -
A closing report with the resolved inputs, the setup mode, the per-group action (created / updated / replaced / kept as is, with
.ui-quality.ymland itsaccessibilitylevel listed), what was included or omitted and why, live versus fallback toolchain versions, and ignored keys.
Execution flow
Dependencies
Invokes
-
Setup Android App and Setup Apple App — not invoked; they are only cited as the conventions this skill mirrors.
-
No other catalog skill is invoked. Step 7’s verification commands are run through the Gate Runner agent.
Invoked by
-
Setup KMP Repository — Step 4 runs
iru-setup-kmp-app(through an isolated skill executor) first in the chain, passing the resolved shared inputs asargs. -
Setup Repository — reaches it indirectly by delegating to
iru-setup-kmp-repository. It can also be run directly by a person.
Related agents
-
Gate Runner — runs Step 7’s Gradle, XcodeGen and
xcodebuildverification commands so their long logs stay out of the caller’s context.
Source
SKILL.md on GitHub — the file this page was generated from.