2020-01-10 21:48:43 +08:00
|
|
|
plugins {
|
2020-01-23 03:24:37 +08:00
|
|
|
id "java-gradle-plugin"
|
|
|
|
id "io.spring.javaformat" version "${javaFormatVersion}"
|
|
|
|
id "checkstyle"
|
2022-09-08 06:51:53 +08:00
|
|
|
id "eclipse"
|
2020-01-10 21:48:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
gradlePluginPortal()
|
|
|
|
}
|
|
|
|
|
2023-05-05 15:16:37 +08:00
|
|
|
new File(new File("$projectDir").parentFile, "gradle.properties").withInputStream {
|
|
|
|
def properties = new Properties()
|
|
|
|
properties.load(it)
|
|
|
|
ext.set("kotlinVersion", properties["kotlinVersion"])
|
|
|
|
ext.set("springFrameworkVersion", properties["springFrameworkVersion"])
|
|
|
|
if (properties["springFrameworkVersion"].contains("-")) {
|
|
|
|
repositories {
|
|
|
|
maven { url "https://repo.spring.io/milestone" }
|
|
|
|
maven { url "https://repo.spring.io/snapshot" }
|
|
|
|
}
|
2022-06-15 01:58:16 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-05 15:20:05 +08:00
|
|
|
sourceCompatibility = 17
|
|
|
|
targetCompatibility = 17
|
2023-05-05 15:16:37 +08:00
|
|
|
|
2020-01-10 21:48:43 +08:00
|
|
|
dependencies {
|
2020-01-22 10:33:33 +08:00
|
|
|
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}"
|
2023-05-02 15:40:58 +08:00
|
|
|
|
2023-05-02 15:59:58 +08:00
|
|
|
implementation(platform("org.springframework:spring-framework-bom:${springFrameworkVersion}"))
|
2022-09-06 21:09:28 +08:00
|
|
|
implementation("com.diffplug.gradle:goomph:3.37.2")
|
2021-02-11 18:07:39 +08:00
|
|
|
implementation("com.fasterxml.jackson.core:jackson-databind:2.11.4")
|
2023-01-03 23:55:07 +08:00
|
|
|
implementation("com.gradle:gradle-enterprise-gradle-plugin:3.12.1")
|
2022-11-17 02:09:10 +08:00
|
|
|
implementation("com.tngtech.archunit:archunit:1.0.0")
|
2020-01-23 06:09:17 +08:00
|
|
|
implementation("commons-codec:commons-codec:1.13")
|
2023-05-02 15:40:58 +08:00
|
|
|
implementation("io.spring.javaformat:spring-javaformat-gradle-plugin:${javaFormatVersion}")
|
2020-01-23 06:09:17 +08:00
|
|
|
implementation("org.apache.maven:maven-embedder:3.6.2")
|
2021-05-11 09:04:05 +08:00
|
|
|
implementation("org.asciidoctor:asciidoctor-gradle-jvm:3.3.2")
|
2022-06-15 01:58:16 +08:00
|
|
|
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
|
|
|
|
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable:${kotlinVersion}")
|
2023-05-02 15:40:58 +08:00
|
|
|
implementation("org.springframework:spring-context")
|
2022-01-24 22:19:47 +08:00
|
|
|
implementation("org.springframework:spring-core")
|
|
|
|
implementation("org.springframework:spring-web")
|
2023-05-02 15:40:58 +08:00
|
|
|
|
2020-01-23 06:09:17 +08:00
|
|
|
testImplementation("org.assertj:assertj-core:3.11.1")
|
2022-01-02 18:29:40 +08:00
|
|
|
testImplementation("org.apache.logging.log4j:log4j-core:2.17.1")
|
2020-01-24 23:24:28 +08:00
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter:5.6.0")
|
2023-05-02 15:40:58 +08:00
|
|
|
|
2021-05-19 04:24:39 +08:00
|
|
|
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
2020-01-10 21:48:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
checkstyle {
|
|
|
|
toolVersion = 8.11
|
|
|
|
}
|
|
|
|
|
|
|
|
gradlePlugin {
|
|
|
|
plugins {
|
2020-07-03 00:38:13 +08:00
|
|
|
annotationProcessorPlugin {
|
|
|
|
id = "org.springframework.boot.annotation-processor"
|
|
|
|
implementationClass = "org.springframework.boot.build.processors.AnnotationProcessorPlugin"
|
|
|
|
}
|
2022-11-15 19:24:27 +08:00
|
|
|
architecturePlugin {
|
|
|
|
id = "org.springframework.boot.architecture"
|
|
|
|
implementationClass = "org.springframework.boot.build.architecture.ArchitecturePlugin"
|
|
|
|
}
|
2020-01-10 21:48:43 +08:00
|
|
|
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"
|
|
|
|
}
|
2021-07-09 05:23:43 +08:00
|
|
|
systemTestPlugin {
|
|
|
|
id = "org.springframework.boot.system-test"
|
|
|
|
implementationClass = "org.springframework.boot.build.test.SystemTestPlugin"
|
|
|
|
}
|
2020-01-10 21:48:43 +08:00
|
|
|
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"
|
|
|
|
}
|
2022-09-06 21:09:28 +08:00
|
|
|
processedAnnotationsPlugin {
|
|
|
|
id = "org.springframework.boot.processed-annotations"
|
|
|
|
implementationClass = "org.springframework.boot.build.processors.ProcessedAnnotationsPlugin"
|
|
|
|
}
|
2020-01-10 21:48:43 +08:00
|
|
|
starterPlugin {
|
|
|
|
id = "org.springframework.boot.starter"
|
|
|
|
implementationClass = "org.springframework.boot.build.starters.StarterPlugin"
|
|
|
|
}
|
2020-01-17 04:55:20 +08:00
|
|
|
testFailuresPlugin {
|
|
|
|
id = "org.springframework.boot.test-failures"
|
|
|
|
implementationClass = "org.springframework.boot.build.testing.TestFailuresPlugin"
|
|
|
|
}
|
2020-01-10 21:48:43 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
2022-09-08 06:51:53 +08:00
|
|
|
|
|
|
|
eclipse.classpath.file.whenMerged {
|
|
|
|
def jreEntry = entries.find { it.path.contains("org.eclipse.jdt.launching.JRE_CONTAINER") }
|
|
|
|
jreEntry.entryAttributes['module'] = 'true'
|
|
|
|
jreEntry.entryAttributes['limit-modules'] = 'java.base'
|
|
|
|
}
|
|
|
|
|