Skip to content

Plugins

This section describes the ten plugins we publish. You apply root once, then one plugin per module. The rest are applied for you, or you opt into them.

Plugin Identifier Apply it
Root io.github.thomaskioko.gradle.plugins.root On the root project, once
App io.github.thomaskioko.gradle.plugins.app On an Android application module
Android io.github.thomaskioko.gradle.plugins.android On an Android library module
JVM io.github.thomaskioko.gradle.plugins.jvm On a plain Kotlin library module
Multiplatform io.github.thomaskioko.gradle.plugins.multiplatform On a Kotlin Multiplatform module
Base io.github.thomaskioko.gradle.plugins.base Applied for you by the four above
Spotless io.github.thomaskioko.gradle.plugins.spotless Applied for you by Base
Baseline profile io.github.thomaskioko.gradle.plugins.baseline.profile On a benchmark module
Resource generator io.github.thomaskioko.gradle.plugins.resource.generator On the module holding the strings
Build config io.github.thomaskioko.gradle.plugins.buildconfig On a module needing compile-time constants

Pick exactly one of App, Android, JVM and Multiplatform per module. Each one applies Base, and Base creates the scaffold {} block.

The suite's own ktlint rules are not a plugin. One property turns them on, see Lint.

Scaffold DSL

scaffold {} is one block. Its nested blocks only appear when the matching plugin is applied.

scaffold {
    // always here, see the Base page
    useMetro()

    // only on an Android or Multiplatform module, see the Android page
    android {
        useCompose()
    }

    // only on an Android application module, see the App page
    app {
        applicationId("com.example.myapp")
    }

    // only on a JVM module, see the JVM page
    jvm {
        useAndroidLint()
    }
}