Build setup allows for JDK 10 as source/test target compatibility

Includes upgrade to Groovy 2.4.15 and HtmlUnit 2.30.

Issue: SPR-16390
master
Juergen Hoeller 7 years ago
parent bc07a54075
commit 28ea718d2d
  1. 6
      build.gradle
  2. 18
      spring-aspects/spring-aspects.gradle
  3. 2
      spring-context-support/spring-context-support.gradle
  4. 8
      spring-test/spring-test.gradle
  5. 1
      spring-web/spring-web.gradle

@ -43,7 +43,7 @@ configure(allprojects) { project ->
ext.aspectjVersion = "1.8.13"
ext.freemarkerVersion = "2.3.27-incubating"
ext.groovyVersion = "2.4.14"
ext.groovyVersion = "2.4.15"
ext.hsqldbVersion = "2.4.0"
ext.jackson2Version = "2.9.5"
ext.jettyVersion = "9.4.9.v20180320"
@ -113,13 +113,13 @@ configure(allprojects) { project ->
"-Xlint:-deprecation", "-Xlint:-unchecked"]
compileJava {
sourceCompatibility = 1.8
sourceCompatibility = 1.8 // can be switched to 10 for testing
targetCompatibility = 1.8
options.encoding = 'UTF-8'
}
compileTestJava {
sourceCompatibility = 1.8
sourceCompatibility = 1.8 // can be switched to 10 for testing
targetCompatibility = 1.8
options.encoding = 'UTF-8'
options.compilerArgs += "-parameters"

@ -10,21 +10,16 @@ configurations {
ajInpath
}
// exclude spring-aspects as a module within IDEA until IDEA-64446 is resolved
tasks.getByName("idea").onlyIf { false }
tasks.getByName("ideaModule").onlyIf { false }
compileJava {
compileJava {
actions = []
dependsOn configurations.ajc.getTaskDependencyFromProjectDependency(true, "compileJava")
def outputDir = project.sourceSets.main.java.outputDir
inputs.files(project.sourceSets.main.allSource + project.sourceSets.main.compileClasspath)
outputs.dir outputDir
ext.sourceCompatibility = project(":spring-core").compileJava.sourceCompatibility
ext.targetCompatibility = project(":spring-core").compileJava.targetCompatibility
sourceCompatibility = 1.8 // fixed even when general compatibility level set to e.g. 10
targetCompatibility = 1.8
doLast{
// Assemble runtime classpath from folders and JARs that actually exist
@ -49,18 +44,17 @@ compileJava {
}
}
compileTestJava {
compileTestJava {
actions = []
dependsOn configurations.ajc.getTaskDependencyFromProjectDependency(true, "compileTestJava")
dependsOn jar
def outputDir = project.sourceSets.test.java.outputDir
inputs.files(project.sourceSets.test.allSource + project.sourceSets.test.compileClasspath)
outputs.dir outputDir
ext.sourceCompatibility = project(":spring-core").compileTestJava.sourceCompatibility
ext.targetCompatibility = project(":spring-core").compileTestJava.targetCompatibility
sourceCompatibility = 1.8 // fixed even when general compatibility level set to e.g. 10
targetCompatibility = 1.8
doLast{
// Assemble runtime classpath from folders and JARs that actually exist

@ -17,9 +17,9 @@ dependencies {
testCompile(project(":spring-context"))
testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
testCompile("org.hibernate:hibernate-validator:6.0.9.Final")
testCompile("javax.annotation:javax.annotation-api:1.3.2")
testRuntime("org.ehcache:jcache:1.0.1")
testRuntime("org.ehcache:ehcache:3.4.0")
testRuntime("org.glassfish:javax.el:3.0.1-b08")
testRuntime("javax.annotation:javax.annotation-api:1.3.2")
testRuntime("com.sun.mail:javax.mail:1.6.1")
}

@ -42,10 +42,10 @@ dependencies {
optional("org.apache.taglibs:taglibs-standard-jstlel:1.2.5") {
exclude group: "org.apache.taglibs", module: "taglibs-standard-spec"
}
optional("net.sourceforge.htmlunit:htmlunit:2.29") {
optional("net.sourceforge.htmlunit:htmlunit:2.30") {
exclude group: "commons-logging", module: "commons-logging"
}
optional("org.seleniumhq.selenium:htmlunit-driver:2.29.3") {
optional("org.seleniumhq.selenium:htmlunit-driver:2.30.0") {
exclude group: "commons-logging", module: "commons-logging"
}
optional("org.seleniumhq.selenium:selenium-java:3.11.0") {
@ -60,6 +60,7 @@ dependencies {
optional("io.projectreactor:reactor-test")
testCompile(project(":spring-context-support"))
testCompile(project(":spring-oxm"))
testCompile("javax.annotation:javax.annotation-api:1.3.2")
testCompile("javax.cache:cache-api:1.1.0")
testCompile("javax.ejb:javax.ejb-api:3.2")
testCompile("javax.interceptor:javax.interceptor-api:1.2.1")
@ -82,11 +83,10 @@ dependencies {
testCompile('io.projectreactor.ipc:reactor-netty')
// Pull in the latest JUnit 5 Launcher API and the Vintage engine as well
// so that we can run JUnit 4 tests in IntelliJ IDEA.
testCompile('de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1')
testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
testRuntime("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}")
testRuntime("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}")
testCompile('de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1')
testRuntime("javax.annotation:javax.annotation-api:1.3.2")
testRuntime("org.glassfish:javax.el:3.0.1-b08")
testRuntime("com.sun.xml.bind:jaxb-core:2.3.0")
testRuntime("com.sun.xml.bind:jaxb-impl:2.3.0")

@ -29,6 +29,7 @@ dependencies {
optional("javax.validation:validation-api:1.1.0.Final")
optional("javax.xml.bind:jaxb-api:2.3.0")
optional("javax.xml.ws:jaxws-api:2.3.0")
optional("org.glassfish.main:javax.jws:4.0-b33")
optional("io.reactivex:rxjava:${rxjavaVersion}")
optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
optional("io.reactivex.rxjava2:rxjava:${rxjava2Version}")

Loading…
Cancel
Save