plugins { id("com.diffplug.spotless") } spotless { kotlin { target("src/**/*.kt") targetExclude("**/build/**", "**/generated/**") ktlint() } kotlinGradle { target("*.gradle.kts") ktlint() } format("markdown") { target("*.md", "docs/**/*.md") endWithNewline() trimTrailingWhitespace() } } // D-11 redundancy guard: if a module applies recipe.quality alongside a Kotlin plugin // (multiplatform or jvm), ensure allWarningsAsErrors still applies even if the module // build didn't already configure it. Guarded with plugins.withId so this plugin is // safely composable even when applied alone (no KotlinCompilationTask type available // on the classpath until a Kotlin plugin is present). plugins.withId("org.jetbrains.kotlin.multiplatform") { tasks.withType>().configureEach { compilerOptions { allWarningsAsErrors.set(true) } } } plugins.withId("org.jetbrains.kotlin.jvm") { tasks.withType>().configureEach { compilerOptions { allWarningsAsErrors.set(true) } } }