This commit creates a new build convention that applies the Spring JavaFormat Gradle plugin. This is also adding a default checkstyle configuration for this project. See gh-54
38 lines
920 B
Groovy
38 lines
920 B
Groovy
plugins {
|
|
id "java-gradle-plugin"
|
|
id "io.spring.javaformat" version "${javaFormatVersion}"
|
|
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 {
|
|
conventionsPlugin {
|
|
id = "org.springframework.graphql.conventions"
|
|
implementationClass = "org.springframework.graphql.build.ConventionsPlugin"
|
|
}
|
|
}
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
} |