214 lines
6.8 KiB
Groovy
214 lines
6.8 KiB
Groovy
buildscript {
|
|
dependencies {
|
|
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16'
|
|
classpath 'io.spring.asciidoctor:spring-asciidoctor-extensions:0.1.3.RELEASE'
|
|
}
|
|
}
|
|
plugins {
|
|
id 'io.spring.dependency-management' version '1.0.7.RELEASE' apply false
|
|
id 'org.jetbrains.kotlin.jvm' version '1.3.50' apply false
|
|
id 'org.jetbrains.dokka' version '0.9.18' apply false
|
|
id 'org.asciidoctor.convert' version '1.5.8'
|
|
id 'io.spring.nohttp' version '0.0.3.RELEASE'
|
|
id 'de.undercouch.download' version '4.0.0'
|
|
id "com.jfrog.artifactory" version '4.9.8' apply false
|
|
id "io.freefair.aspectj" version "4.0.0" apply false
|
|
}
|
|
|
|
ext {
|
|
moduleProjects = subprojects.findAll { it.name.startsWith("spring-") }
|
|
|
|
aspectjVersion = "1.9.4"
|
|
coroutinesVersion = "1.3.0"
|
|
freemarkerVersion = "2.3.28"
|
|
groovyVersion = "2.5.7"
|
|
hsqldbVersion = "2.5.0"
|
|
jackson2Version = "2.9.9"
|
|
jettyVersion = "9.4.20.v20190813"
|
|
junit5Version = "5.5.1"
|
|
kotlinVersion = "1.3.50"
|
|
log4jVersion = "2.12.0"
|
|
nettyVersion = "4.1.38.Final"
|
|
reactorVersion = "Dysprosium-M3"
|
|
rsocketVersion = "1.0.0-RC3-SNAPSHOT"
|
|
rxjavaVersion = "1.3.8"
|
|
rxjavaAdapterVersion = "1.2.1"
|
|
rxjava2Version = "2.2.10"
|
|
slf4jVersion = "1.7.26" // spring-jcl + consistent 3rd party deps
|
|
tiles3Version = "3.0.8"
|
|
tomcatVersion = "9.0.22"
|
|
undertowVersion = "2.0.23.Final"
|
|
|
|
withoutJclOverSlf4j = {
|
|
exclude group: "org.slf4j", module: "jcl-over-slf4j"
|
|
}
|
|
}
|
|
|
|
configure(allprojects.findAll { (it.name != "framework-bom") } ) { project ->
|
|
group = "org.springframework"
|
|
|
|
apply plugin: "java"
|
|
apply plugin: "checkstyle"
|
|
apply plugin: 'org.springframework.build.compile'
|
|
apply plugin: "io.spring.dependency-management"
|
|
apply from: "${rootDir}/gradle/ide.gradle"
|
|
|
|
dependencyManagement {
|
|
resolutionStrategy {
|
|
cacheChangingModulesFor 0, "seconds"
|
|
}
|
|
applyMavenExclusions = false
|
|
generatedPomCustomization {
|
|
enabled = false
|
|
}
|
|
imports {
|
|
mavenBom "org.junit:junit-bom:${junit5Version}"
|
|
mavenBom "org.jetbrains.kotlin:kotlin-bom:${kotlinVersion}"
|
|
mavenBom "org.jetbrains.kotlinx:kotlinx-coroutines-bom:${coroutinesVersion}"
|
|
}
|
|
}
|
|
|
|
configurations.all {
|
|
// Check for updates every build
|
|
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
|
|
|
|
// Consistent slf4j version (e.g. clashes between slf4j versions)
|
|
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
|
if (details.requested.group == "org.slf4j") {
|
|
details.useVersion slf4jVersion
|
|
}
|
|
}
|
|
}
|
|
|
|
pluginManager.withPlugin("kotlin") {
|
|
apply plugin: "org.jetbrains.dokka"
|
|
compileKotlin {
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
freeCompilerArgs = ["-Xjsr305=strict"]
|
|
}
|
|
}
|
|
compileTestKotlin {
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
freeCompilerArgs = ["-Xjsr305=strict"]
|
|
}
|
|
}
|
|
}
|
|
|
|
test {
|
|
systemProperty("java.awt.headless", "true")
|
|
systemProperty("testGroups", project.properties.get("testGroups"))
|
|
systemProperty("io.netty.leakDetection.level", "paranoid")
|
|
useJUnitPlatform()
|
|
scanForTestClasses = false
|
|
include(["**/*Tests.class", "**/*Test.class"])
|
|
// Since we set scanForTestClasses to false, we need to filter out inner
|
|
// classes with the "$" pattern; otherwise, using -Dtest.single=MyTests to
|
|
// run MyTests by itself will fail if MyTests contains any inner classes.
|
|
exclude(["**/Abstract*.class", '**/*$*'])
|
|
}
|
|
|
|
checkstyle {
|
|
toolVersion = "8.23"
|
|
configDir = rootProject.file("src/checkstyle")
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url "https://repo.spring.io/libs-release" }
|
|
maven { url "https://repo.spring.io/milestone" } // Reactor
|
|
maven { url "https://oss.jfrog.org/artifactory/libs-snapshot" } // RSocket
|
|
}
|
|
|
|
dependencies {
|
|
testCompile("org.junit.jupiter:junit-jupiter-api")
|
|
testCompile("org.junit.jupiter:junit-jupiter-params")
|
|
testCompile("org.mockito:mockito-core:3.0.0") {
|
|
exclude group: "org.hamcrest", module: "hamcrest-core"
|
|
}
|
|
testCompile("org.mockito:mockito-junit-jupiter:3.0.0")
|
|
testCompile("io.mockk:mockk:1.9.3")
|
|
testCompile("org.hamcrest:hamcrest:2.1")
|
|
testCompile("org.assertj:assertj-core:3.13.1")
|
|
// Pull in the latest JUnit 5 Launcher API to ensure proper support in IDEs.
|
|
testRuntime("org.junit.platform:junit-platform-launcher")
|
|
testRuntime("org.junit.jupiter:junit-jupiter-engine")
|
|
testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
|
|
testRuntime("org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}")
|
|
testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}")
|
|
// JSR-305 only used for non-required meta-annotations
|
|
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
|
|
testCompileOnly("com.google.code.findbugs:jsr305:3.0.2")
|
|
checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.15")
|
|
}
|
|
|
|
ext.javadocLinks = [
|
|
"https://docs.oracle.com/javase/8/docs/api/",
|
|
"https://docs.oracle.com/javaee/7/api/",
|
|
"https://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/", // CommonJ
|
|
"https://www.ibm.com/support/knowledgecenter/SS7JFU_8.5.5/com.ibm.websphere.javadoc.doc/web/apidocs/",
|
|
"https://glassfish.java.net/nonav/docs/v3/api/",
|
|
"https://docs.jboss.org/jbossas/javadoc/4.0.5/connector/",
|
|
"https://docs.jboss.org/jbossas/javadoc/7.1.2.Final/",
|
|
"https://tiles.apache.org/tiles-request/apidocs/",
|
|
"https://tiles.apache.org/framework/apidocs/",
|
|
"https://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/",
|
|
"https://www.ehcache.org/apidocs/2.10.4",
|
|
"https://www.quartz-scheduler.org/api/2.3.0/",
|
|
"https://fasterxml.github.io/jackson-core/javadoc/2.9/",
|
|
"https://fasterxml.github.io/jackson-databind/javadoc/2.9/",
|
|
"https://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.9/",
|
|
"https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/",
|
|
"https://junit.org/junit4/javadoc/4.12/",
|
|
"https://junit.org/junit5/docs/${junit5Version}/api/"
|
|
] as String[]
|
|
}
|
|
|
|
configure(moduleProjects) { project ->
|
|
apply from: "${rootDir}/gradle/spring-module.gradle"
|
|
}
|
|
|
|
configure(rootProject) {
|
|
description = "Spring Framework"
|
|
|
|
apply plugin: "groovy"
|
|
apply plugin: "kotlin"
|
|
apply plugin: "io.spring.nohttp"
|
|
apply plugin: 'org.springframework.build.api-diff'
|
|
apply from: "${rootDir}/gradle/publications.gradle"
|
|
apply from: "${rootDir}/gradle/docs.gradle"
|
|
|
|
nohttp {
|
|
source.exclude "**/test-output/**"
|
|
whitelistFile = project.file("src/nohttp/whitelist.lines")
|
|
def projectDirURI = project.projectDir.toURI()
|
|
allprojects.forEach { p ->
|
|
def outURI = p.file("out").toURI()
|
|
def pattern = projectDirURI.relativize(outURI).path + "**"
|
|
source.exclude pattern
|
|
}
|
|
}
|
|
|
|
dependencyManagement {
|
|
imports {
|
|
mavenBom "io.projectreactor:reactor-bom:${reactorVersion}"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
asciidoctor("io.spring.asciidoctor:spring-asciidoctor-extensions:0.1.3.RELEASE")
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
artifact docsZip
|
|
artifact schemaZip
|
|
artifact distZip
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|