plugins
A module in a large project spends most of its build file repeating the same setup: the same target platforms, the same compiler flags, the same test dependencies. These plugins move that setup out of the build file and leave behind a scaffold {} block where a module declares only the choices it actually has to make.
Apply the root plugin on the root project, then one plugin per module.
// root build.gradle.kts
plugins {
id("io.github.thomaskioko.gradle.plugins.root")
}Content copied to clipboard
// a module's build.gradle.kts
plugins {
id("io.github.thomaskioko.gradle.plugins.multiplatform")
}
scaffold {
useMetro()
}Content copied to clipboard
The root plugin sets the daemon toolchain vendor, configures dependency analysis, and checks that it was applied to the root project and not a module. Every module plugin configures only its own module, so the suite works with Gradle's isolated projects turned on.