// Precompiled script plugins, written in Groovy because the main build is Groovy DSL and a reader // moving logic out of a leaf should not also be translating it. plugins { id 'groovy-gradle-plugin' } dependencies { // The third-party Gradle plugins the convention plugins apply. // // The root build used to apply these to every leaf from `configure(subprojects)`, and the // recorded reason for keeping them there (D8) was that build-logic would have to re-declare // their versions, giving each one a second home that could drift. That objection no longer // holds: build-logic/settings.gradle reads the main build's `gradle/libs.versions.toml`, so the // versions below and the ones the root `plugins {}` block declares are the same table entries. implementation "com.diffplug.spotless:spotless-plugin-gradle:${libs.versions.spotless.get()}" implementation "com.github.spotbugs.snom:spotbugs-gradle-plugin:${libs.versions.spotbugsPlugin.get()}" implementation "net.ltgt.gradle:gradle-errorprone-plugin:${libs.versions.errorpronePlugin.get()}" implementation "io.spring.gradle:dependency-management-plugin:${libs.versions.springDependencyManagement.get()}" // TestKit needs the Gradle API of the running distribution, which `groovy-gradle-plugin` already // puts on the main source set; the test source set asks for it explicitly. testImplementation gradleTestKit() testImplementation libs.spock.core.groovy4 testImplementation libs.junit.jupiter testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { useJUnitPlatform() }