44 lines
1.1 KiB
Groovy
44 lines
1.1 KiB
Groovy
plugins {
|
|
id "java-gradle-plugin"
|
|
id "checkstyle"
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
gradlePluginPortal()
|
|
}
|
|
|
|
ext {
|
|
def propertiesFile = new File(new File("$projectDir").parentFile, "gradle.properties")
|
|
propertiesFile.withInputStream {
|
|
def properties = new Properties()
|
|
properties.load(it)
|
|
set("kotlinVersion", properties["kotlinVersion"])
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}"
|
|
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
|
|
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable:${kotlinVersion}")
|
|
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.build.conventions"
|
|
implementationClass = "org.springframework.graphql.build.ConventionsPlugin"
|
|
}
|
|
}
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
} |