Skip to main content

Kotzilla Gradle plugin configuration

This page documents the Kotzilla Gradle plugin configuration. It applies to all setups, whether you declare the plugin through a Version Catalog (the default in the setup guides) or through the legacy Gradle configuration.

Kotzilla DSL Reference

The kotzilla {} block provides configuration options for the Gradle plugin:

kotzilla {
enabled = true // Master switch (default: true)
versionName = "1.0.0" // Auto-detected if omitted
site = "gateway.kotzilla.io" // Custom endpoint (optional)
projectFile = "kotzilla.json" // Custom config path (optional)
uploadMappingFile = true // ProGuard mapping upload (default: true)
composeInstrumentation = true // Compose NavHost tracking (default: true)
obfuscateGeneratedConfig = true // Encodes API key to avoid visibility in bundle (default: true)
autoInjectXcodeScript = true // iOS dSYM script (default: true)
autoAddDependencies = true // Auto-add SDK deps (default: true)
displayLogs = false // Debug logging (default: false)
skipBuildReportFailure = true // Don't fail the build on a FAIL report (default: true)
}

Default Changes in SDK 2.0.x

Option1.4.x Default2.0.x Default
composeInstrumentationfalsetrue
autoInjectXcodeScriptfalsetrue
obfuscateGeneratedConfigN/Atrue
autoAddDependenciesN/Atrue

Build Report

Since SDK 2.2.0, Gradle builds print the Kotzilla report for the selected app version, run by auto-wired kotzillaBuildReport{Variant} tasks, so regressions are visible at build time without leaving your build.

Since SDK 2.2.4, a FAIL report status no longer blocks the build by default (skipBuildReportFailure = true): the report banner still prints, but the build stays green. This avoids blocking your first build, before any data exists for the app version. To turn the report into a hard build gate, set skipBuildReportFailure = false in the kotzilla {} block of your app, shared, or ComposeApp module:

kotzilla {
skipBuildReportFailure = false // fail the build when the report status is FAIL
}

PASS, 404 (no data yet), and transient HTTP errors never fail the build.

Overriding the failure gate from CI/CD

You can flip the gate per build without editing build.gradle.kts using a Gradle property. The property wins over the DSL value when present:

./gradlew assemble -Pkotzilla.skipBuildReportFailure=false   # force the gate ON (fail on FAIL)
./gradlew assemble -Pkotzilla.skipBuildReportFailure=true # force the gate OFF (informational only)

Any value other than true / false is ignored, and the DSL value applies. This is handy when you want local and PR builds to stay green but a release pipeline to fail on a FAIL report.

The build report applies to all project types (Android, Android with Compose, KMP, CMP, and SDK Library for Android).

Plugin application

Since SDK 2.2.0, the Kotzilla Gradle plugin is applied at the root with apply true. This makes the plugin process every module in your project, including feature modules with Compose Navigation routes, so screens owned by feature modules are reported in production.

// root build.gradle.kts (Version Catalog)
plugins {
alias(libs.plugins.kotzilla) apply true
}
// root build.gradle.kts (legacy)
plugins {
id("io.kotzilla.kotzilla-plugin") version "2.2.4" apply true
}

The module-level plugin application stays as before in your app, shared, or ComposeApp module. Feature modules do not need a Kotzilla API key; only your app or main runtime module does.