mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
156 lines
5.5 KiB
Groovy
156 lines
5.5 KiB
Groovy
plugins {
|
|
id "java-gradle-plugin"
|
|
id "io.spring.javaformat" version "${javaFormatVersion}"
|
|
id "checkstyle"
|
|
id "eclipse"
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
gradlePluginPortal()
|
|
}
|
|
|
|
sourceCompatibility = 17
|
|
targetCompatibility = 17
|
|
|
|
def versions = [:]
|
|
new File(projectDir.parentFile, "gradle.properties").withInputStream {
|
|
def properties = new Properties()
|
|
properties.load(it)
|
|
["assertj", "commonsCodec", "hamcrest", "junitJupiter", "kotlin", "maven", "snakeYaml"].each {
|
|
versions[it] = properties[it + "Version"]
|
|
}
|
|
}
|
|
versions["jackson"] = "2.15.3"
|
|
versions["springFramework"] = "6.0.12"
|
|
ext.set("versions", versions)
|
|
if (versions.springFramework.contains("-")) {
|
|
repositories {
|
|
maven { url "https://repo.spring.io/milestone" }
|
|
maven { url "https://repo.spring.io/snapshot" }
|
|
}
|
|
}
|
|
|
|
checkstyle {
|
|
toolVersion = "10.12.4"
|
|
}
|
|
|
|
dependencies {
|
|
checkstyle("com.puppycrawl.tools:checkstyle:${checkstyle.toolVersion}")
|
|
checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}")
|
|
|
|
implementation(platform("org.springframework:spring-framework-bom:${versions.springFramework}"))
|
|
implementation("com.diffplug.gradle:goomph:3.37.2")
|
|
implementation("dev.adamko.dokkatoo:dokkatoo-plugin:2.3.1")
|
|
implementation("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}")
|
|
implementation("com.github.node-gradle:gradle-node-plugin:3.5.1")
|
|
implementation("com.gradle:develocity-gradle-plugin:3.17.2")
|
|
implementation("com.tngtech.archunit:archunit:1.0.0")
|
|
implementation("commons-codec:commons-codec:${versions.commonsCodec}")
|
|
implementation("de.undercouch.download:de.undercouch.download.gradle.plugin:5.5.0")
|
|
implementation("io.spring.gradle.antora:spring-antora-plugin:0.0.1")
|
|
implementation("io.spring.javaformat:spring-javaformat-gradle-plugin:${javaFormatVersion}")
|
|
implementation("io.spring.nohttp:nohttp-gradle:0.0.11")
|
|
implementation("org.apache.httpcomponents.client5:httpclient5:5.3.1")
|
|
implementation("org.apache.maven:maven-embedder:${versions.maven}")
|
|
implementation("org.antora:gradle-antora-plugin:1.0.0")
|
|
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}")
|
|
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable:${versions.kotlin}")
|
|
implementation("org.springframework:spring-context")
|
|
implementation("org.springframework:spring-core")
|
|
implementation("org.springframework:spring-web")
|
|
implementation("org.yaml:snakeyaml:${versions.snakeYaml}")
|
|
|
|
testImplementation("org.assertj:assertj-core:${versions.assertj}")
|
|
testImplementation("org.hamcrest:hamcrest:${versions.hamcrest}")
|
|
testImplementation("org.junit.jupiter:junit-jupiter:${versions.junitJupiter}")
|
|
testImplementation("org.springframework:spring-test")
|
|
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
|
}
|
|
|
|
configurations.all {
|
|
exclude group:"org.slf4j", module:"slf4j-api"
|
|
exclude group:"ch.qos.logback", module:"logback-classic"
|
|
exclude group:"ch.qos.logback", module:"logback-core"
|
|
}
|
|
|
|
gradlePlugin {
|
|
plugins {
|
|
annotationProcessorPlugin {
|
|
id = "org.springframework.boot.annotation-processor"
|
|
implementationClass = "org.springframework.boot.build.processors.AnnotationProcessorPlugin"
|
|
}
|
|
architecturePlugin {
|
|
id = "org.springframework.boot.architecture"
|
|
implementationClass = "org.springframework.boot.build.architecture.ArchitecturePlugin"
|
|
}
|
|
autoConfigurationPlugin {
|
|
id = "org.springframework.boot.auto-configuration"
|
|
implementationClass = "org.springframework.boot.build.autoconfigure.AutoConfigurationPlugin"
|
|
}
|
|
bomPlugin {
|
|
id = "org.springframework.boot.bom"
|
|
implementationClass = "org.springframework.boot.build.bom.BomPlugin"
|
|
}
|
|
configurationPropertiesPlugin {
|
|
id = "org.springframework.boot.configuration-properties"
|
|
implementationClass = "org.springframework.boot.build.context.properties.ConfigurationPropertiesPlugin"
|
|
}
|
|
conventionsPlugin {
|
|
id = "org.springframework.boot.conventions"
|
|
implementationClass = "org.springframework.boot.build.ConventionsPlugin"
|
|
}
|
|
deployedPlugin {
|
|
id = "org.springframework.boot.deployed"
|
|
implementationClass = "org.springframework.boot.build.DeployedPlugin"
|
|
}
|
|
integrationTestPlugin {
|
|
id = "org.springframework.boot.integration-test"
|
|
implementationClass = "org.springframework.boot.build.test.IntegrationTestPlugin"
|
|
}
|
|
systemTestPlugin {
|
|
id = "org.springframework.boot.system-test"
|
|
implementationClass = "org.springframework.boot.build.test.SystemTestPlugin"
|
|
}
|
|
mavenPluginPlugin {
|
|
id = "org.springframework.boot.maven-plugin"
|
|
implementationClass = "org.springframework.boot.build.mavenplugin.MavenPluginPlugin"
|
|
}
|
|
mavenRepositoryPlugin {
|
|
id = "org.springframework.boot.maven-repository"
|
|
implementationClass = "org.springframework.boot.build.MavenRepositoryPlugin"
|
|
}
|
|
optionalDependenciesPlugin {
|
|
id = "org.springframework.boot.optional-dependencies"
|
|
implementationClass = "org.springframework.boot.build.optional.OptionalDependenciesPlugin"
|
|
}
|
|
processedAnnotationsPlugin {
|
|
id = "org.springframework.boot.processed-annotations"
|
|
implementationClass = "org.springframework.boot.build.processors.ProcessedAnnotationsPlugin"
|
|
}
|
|
starterPlugin {
|
|
id = "org.springframework.boot.starter"
|
|
implementationClass = "org.springframework.boot.build.starters.StarterPlugin"
|
|
}
|
|
testFailuresPlugin {
|
|
id = "org.springframework.boot.test-failures"
|
|
implementationClass = "org.springframework.boot.build.testing.TestFailuresPlugin"
|
|
}
|
|
}
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
eclipse {
|
|
jdt {
|
|
file {
|
|
withProperties {
|
|
it["org.eclipse.jdt.core.compiler.ignoreUnnamedModuleForSplitPackage"] = "enabled"
|
|
}
|
|
}
|
|
}
|
|
}
|