Manifest Format
Every section of
Kargo.toml. All of them parse and validate today; the Effect column says whether a section currently changes a build. See Implementation Status, and The Manifest for the guided version.
Keys are kebab-case. Maps preserve sorted order when serialized, so generated output is byte-stable.
| Section | Effect |
|---|---|
[package] | 🟢 Active |
[targets] | 🟢 Active |
[source-sets.<name>] | 🟢 Active |
[dependencies] | 🟢 Active |
[dev-dependencies] | 🟢 Active |
[target.<name>.dependencies] | 🟢 Active |
[flavor.<name>.dependencies] | 🟡 Parsed, not applied |
[plugins] | 🟢 Active |
[ksp] / [ksp-options] | 🟢 Active |
[kapt] / [kapt-options] | 🟢 Active |
[build-config] | 🟢 Active |
[compose] | ⚪ Parsed |
[flavors] | 🟡 Parsed, not applied |
[profile.<name>] | 🟢 Active |
[repositories] | 🟢 Active |
[toolchain] | 🟢 Active |
[workspace] | 🟡 Parsed, not orchestrated |
[catalog] | 🟡 Parsed, references unresolved |
[test] | ⚪ Parsed |
[lint] / [format] | ⚪ Parsed |
[hooks] | ⚪ Parsed |
[signing] | ⚪ Parsed |
[package.docker] | ⚪ Parsed |
[package]
| Key | Type | Required | Description |
|---|---|---|---|
name | string | yes | Alphanumeric, -, _. Validated on load. |
version | string | yes | Must parse as semver. |
kotlin | string | yes | Exact Kotlin compiler version. |
group | string | for publishing | Maven group id. |
main-class | string | for kargo run | JVM entry point, e.g. com.example.MainKt. |
description | string | no | Carried into the published POM. |
authors | list | no | "Name <email>" entries. |
license | string | no | SPDX identifier. |
repository | string | no | Source repository URL. |
ksp-version | string | no | Pins the KSP processor API version. |
[package]
name = "my-service"
group = "com.example"
version = "1.2.0"
kotlin = "2.4.21"
description = "Order processing service"
authors = ["Jane Doe <jane@example.com>"]
license = "Apache-2.0"
repository = "https://github.com/example/my-service"
main-class = "com.example.MainKt"
[targets]
A map of target name to options. Names accept kebab-case or camelCase. See the Targets reference for the full list.
[targets.jvm]
java-target = "25"
[targets]
jvm = { java-target = "25" }
android = { min-sdk = 24, target-sdk = 36, compile-sdk = 36 }
ios-arm64 = {}
js = { module-kind = "es" }
| Key | Applies to | Description |
|---|---|---|
java-target | jvm, android | Bytecode level, e.g. "17", "25". |
module-kind | js | "es" or "commonjs". |
min-sdk | android | Minimum Android API level. |
target-sdk | android | Android API level targeted. |
compile-sdk | android | Android API level compiled against. |
cinterop | native | C interop definitions, see below. |
Android requires min-sdk <= target-sdk; violating it fails validation.
[source-sets.<name>]
Declares what the conventional layout would otherwise infer for one source set.
[source-sets.jvmMain]
kotlin = ["legacy/src/java", "build/generated/kotlin"]
resources = ["legacy/src/resources"]
depends-on = ["commonMain"]
[source-sets.jvmAndAndroidMain]
depends-on = ["commonMain"]
targets = ["jvm", "android"]
| Key | Type | Description |
|---|---|---|
kotlin | list | Source roots, relative to the project root, replacing src/<name>/kotlin. |
resources | list | Resource roots, replacing src/<name>/resources. |
depends-on | list | Parent source sets, replacing the inferred parent. |
targets | list | The targets this set compiles into, which is how a grouping the standard hierarchy does not provide gets one. |
The name is main or test in the Maven layout, and ends in Main or Test
in the multiplatform one. A key left out keeps the convention, so moving the
sources says nothing about the resources, and an empty list reads the same way
as leaving the key out. Declaring a set is itself what brings it into existence
— its directories need not be under src/.
See the Source Sets reference.
[dependencies]
A map of local alias to dependency. Three forms:
[dependencies]
# coordinate shorthand
kotlinx-coroutines-core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0"
# detailed
my-lib = { group = "com.example", artifact = "my-lib", version = "1.0.0" }
# catalog reference
ktor-server = { catalog = "ktor-server", bundle = true }
Detailed form keys:
| Key | Type | Description |
|---|---|---|
group | string | Maven group id. Required. |
artifact | string | Maven artifact id. Required. |
version | string | Exact version. Empty means "from an imported BOM". |
scope | string | compile (default), runtime, provided, test, system, import. |
optional | bool | Not propagated to consumers. |
classifier | string | For platform-specific artifacts. |
exclusions | array of tables | { group, artifact }; omit artifact for the whole group. |
[dependencies.jackson-databind]
group = "com.fasterxml.jackson.core"
artifact = "jackson-databind"
version = "2.16.1"
[[dependencies.jackson-databind.exclusions]]
group = "org.slf4j"
artifact = "slf4j-log4j12"
Catalog form keys: catalog (the entry name) and bundle (whether the name
refers to a bundle).
[dev-dependencies]
Identical shape. On the test compile and runtime classpath only; never published.
[target.<name>.dependencies]
Dependencies that apply only when building that target.
[target.jvm.dependencies]
ktor-client-okhttp = "io.ktor:ktor-client-okhttp:2.3.0"
[target.ios.dependencies]
ktor-client-darwin = "io.ktor:ktor-client-darwin:2.3.0"
[flavor.<name>.dependencies]
🟡 Parsed, not yet applied to builds.
[flavor.free.dependencies]
ad-sdk = "com.example:ad-sdk:2.0.0"
Note the singular flavor here, versus plural flavors for definitions.
[plugins]
Kotlin compiler plugins by id. A bare string, or a table with a version.
[plugins]
serialization = "org.jetbrains.kotlin.plugin.serialization"
parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version = "2.4.21" }
Without version, the plugin tracks package.kotlin.
[ksp]
KSP annotation processors, in dependency form.
[ksp]
room-compiler = "androidx.room:room-compiler:2.6.1"
[ksp-options]
String options passed to KSP processors.
[ksp-options]
"room.schemaLocation" = "build/schemas"
"room.incremental" = "true"
[kapt]
KAPT annotation processors, for libraries that have not moved to KSP.
[kapt]
dagger-compiler = "com.google.dagger:dagger-compiler:2.59.2"
Only what this section declares runs. Generated sources land in
build/<target>/<profile>/generated/kapt/sources and join the main compile; the
Java stubs the processors read stay in generated/kapt/stubs.
Every pass is a full pass — there is no incremental KAPT — and kapt's own
javacOption has no manifest key. KAPT is deprecated upstream, so prefer
[ksp] when a processor offers both.
[kapt-options]
Options for the KAPT processors, passed as -A<key>=<value> the same way a
javac invocation would pass them.
[kapt-options]
"dagger.fastInit" = "enabled"
[build-config]
Compile-time constants emitted into a generated BuildConfig object. Values are
strings and support ${env:…} interpolation.
[build-config]
API_VERSION = "v2"
TELEMETRY_ENABLED = "false"
Merged with flavor build-config, flavors taking precedence.
[compose]
⚪ Parsed; the compiler plugin is not applied yet.
[compose]
enabled = true
[flavors]
🟡 Parsed and validated; not applied to builds.
[flavors]
dimensions = ["tier", "environment"]
default = { tier = "paid", environment = "staging" }
exclude = [{ tier = "free", environment = "production" }]
[flavors.tier.free]
build-config = { IS_PAID = "false" }
application-id-suffix = ".free"
[flavors.tier.paid.signing]
keystore = "release.keystore"
key-alias = "paid-release"
store-password-cmd = "op read 'op://Dev/Keystore/password'"
| Key | Type | Description |
|---|---|---|
dimensions | list | Ordered axes. Order determines variant naming. |
default | table | Flavor per dimension, used when none is specified. |
exclude | array of tables | Combinations that do not exist. |
Per-flavor keys, under [flavors.<dimension>.<flavor>]:
| Key | Type | Description |
|---|---|---|
build-config | table | Constants for this flavor. |
application-id-suffix | string | Appended to the application id. |
signing | table | keystore, key-alias, store-password-cmd. |
See Flavors and Variants.
[profile.<name>]
[profile.dev]
debug = true
optimization = false
[profile.release]
debug = false
optimization = true
compiler-args = ["-Xjvm-default=all"]
| Key | Type | Description |
|---|---|---|
debug | bool | Emit debug symbols. |
optimization | bool | Enable compiler optimizations. |
compiler-args | list | Extra flags passed to the compiler verbatim. |
dev and release exist without being declared. Any other name defines a custom
profile. See Build Profiles.
[repositories]
A map of name to URL or table. Maven Central is always available and tried last.
[repositories]
google = "https://maven.google.com"
internal = { url = "https://nexus.example.com/maven", username = "${env:NEXUS_USER}", password = "${env:NEXUS_PASS}" }
shared = { url = "https://nexus.example.com/maven", auth = "my-nexus" }
| Key | Type | Description |
|---|---|---|
url | string | Repository base URL. Required in table form. |
username | string | Basic auth user. Use ${env:…}. |
password | string | Basic auth password or token. Use ${env:…}. |
auth | string | Name of a [credentials.*] entry in global config. |
[toolchain]
[toolchain]
jdk = "25"
kotlin-mirror = "https://mirror.example.com/kotlin"
auto-download = true
| Key | Type | Description |
|---|---|---|
jdk | string | A major version, or an absolute path. |
kotlin-mirror | string | Alternative to the JetBrains release archive. |
auto-download | bool | Default true. Set false for air-gapped builds. |
See Toolchains.
[workspace]
🟡 Parsed; member builds are not orchestrated yet.
[workspace]
members = ["app", "shared", "libs/*"]
exclude = ["experimental"]
Globs are supported in members. A workspace root usually has no [package].
See Workspaces.
[catalog]
🟡 Parsed;
{ catalog = … }references are not resolved yet.
[catalog.versions]
ktor = "2.3.0"
[catalog.libraries]
ktor-server-core = { group = "io.ktor", artifact = "ktor-server-core", version.ref = "ktor" }
ktor-client-core = { group = "io.ktor", artifact = "ktor-client-core", version = "2.3.0" }
[catalog.bundles]
ktor-server = ["ktor-server-core", "ktor-server-netty"]
[catalog.plugins]
serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
| Subsection | Shape |
|---|---|
versions | name to version string |
libraries | name to { group, artifact, version or version.ref } |
bundles | name to a list of library names |
plugins | name to { id, version or version.ref } |
See Version Catalogs.
[test]
⚪ Parsed; coverage is not implemented.
[test.coverage]
engine = "kover"
min-line = 80
min-branch = 70
exclude = ["**/generated/**", "**/BuildConfig.*"]
| Key | Type | Description |
|---|---|---|
engine | string | kover or jacoco. |
min-line | integer | Fail below this line coverage percentage. |
min-branch | integer | Fail below this branch coverage percentage. |
exclude | list | Glob patterns excluded from measurement. |
[lint]
⚪ Parsed; the linter is not implemented.
[lint]
rules = ["naming", "style", "complexity"]
severity = "warning"
See the Lint Rules reference.
[format]
⚪ Parsed; the formatter is not implemented.
[format]
style = "official"
indent = 4
max-line-length = 120
[hooks]
⚪ Parsed; no lifecycle phase dispatches hooks yet.
A map of phase name to a list of commands.
[hooks]
pre-build = ["fmt --check", "lint"]
post-compile = ["./scripts/generate-openapi.sh"]
post-test = ["coverage-report"]
Phase names are listed in Plugins and Hooks.
[signing]
⚪ Parsed; publishing is not implemented.
[signing]
gpg-key = "${env:GPG_KEY_ID}"
gpg-password = "${env:GPG_PASSPHRASE}"
[package.docker]
⚪ Parsed; packaging is not implemented.
[package.docker]
base-image = "eclipse-temurin:25-jre-alpine"
ports = [8080]
entrypoint = "java -jar /app/app.jar"
labels = { maintainer = "team@example.com" }
[target.<name>.cinterop.<name>]
⚪ Parsed; CInterop is not implemented.
[target.ios-arm64.cinterop.mylib]
def-file = "src/nativeInterop/cinterop/mylib.def"
headers = ["include/mylib.h"]
compiler-opts = ["-Iinclude"]
linker-opts = ["-L/usr/local/lib", "-lmylib"]
Environment interpolation
Any string value may contain ${env:VAR}, resolved before TOML parsing from
.kargo.env and then the process environment. An unresolved reference is an
error naming the variable.
[repositories]
internal = { url = "${env:NEXUS_URL}", username = "${env:NEXUS_USER}", password = "${env:NEXUS_PASS}" }
Validation
Checked when the manifest loads, before any build work:
package.nameis non-empty and contains only alphanumerics,-, and_package.versionparses as semver- Android
min-sdk <= target-sdk - Target names are recognized, in
[targets]and in a source set'stargets [source-sets]names end inMainorTest(or aremain/test), and theirdepends-onedges form no cycle[flavors] defaultandexcludereference declared dimensions and flavors
Failures report the offending key rather than a generic parse error.