This commit configures a CompilerConventions Gradle Plugin that configures the compiler for main and test sources.
41 lines
1.0 KiB
Groovy
41 lines
1.0 KiB
Groovy
plugins {
|
|
id "java-gradle-plugin"
|
|
id "checkstyle"
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
gradlePluginPortal()
|
|
maven { url "https://repo.spring.io/release" }
|
|
}
|
|
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
dependencies {
|
|
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}"
|
|
implementation("io.spring.javaformat:spring-javaformat-gradle-plugin:${javaFormatVersion}")
|
|
}
|
|
|
|
checkstyle {
|
|
def archive = configurations.checkstyle.filter { it.name.startsWith("spring-javaformat-checkstyle")}
|
|
config = resources.text.fromArchiveEntry(archive, "io/spring/javaformat/checkstyle/checkstyle.xml")
|
|
toolVersion = 8.11
|
|
}
|
|
|
|
gradlePlugin {
|
|
plugins {
|
|
formattingConventionsPlugin {
|
|
id = "org.springframework.graphql.formatting"
|
|
implementationClass = "org.springframework.graphql.build.format.FormattingConventionsPlugin"
|
|
}
|
|
compilerConventionsPlugin {
|
|
id = "org.springframework.graphql.compiler"
|
|
implementationClass = "org.springframework.graphql.build.compile.CompilerConventionsPlugin"
|
|
}
|
|
}
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
} |