Skip to content

Commit 28ea718

Browse files
committed
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
1 parent bc07a54 commit 28ea718

File tree

5 files changed

+15
-20
lines changed

5 files changed

+15
-20
lines changed

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ configure(allprojects) { project ->
4343

4444
ext.aspectjVersion = "1.8.13"
4545
ext.freemarkerVersion = "2.3.27-incubating"
46-
ext.groovyVersion = "2.4.14"
46+
ext.groovyVersion = "2.4.15"
4747
ext.hsqldbVersion = "2.4.0"
4848
ext.jackson2Version = "2.9.5"
4949
ext.jettyVersion = "9.4.9.v20180320"
@@ -113,13 +113,13 @@ configure(allprojects) { project ->
113113
"-Xlint:-deprecation", "-Xlint:-unchecked"]
114114

115115
compileJava {
116-
sourceCompatibility = 1.8
116+
sourceCompatibility = 1.8 // can be switched to 10 for testing
117117
targetCompatibility = 1.8
118118
options.encoding = 'UTF-8'
119119
}
120120

121121
compileTestJava {
122-
sourceCompatibility = 1.8
122+
sourceCompatibility = 1.8 // can be switched to 10 for testing
123123
targetCompatibility = 1.8
124124
options.encoding = 'UTF-8'
125125
options.compilerArgs += "-parameters"

spring-aspects/spring-aspects.gradle

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,16 @@ configurations {
1010
ajInpath
1111
}
1212

13-
// exclude spring-aspects as a module within IDEA until IDEA-64446 is resolved
14-
tasks.getByName("idea").onlyIf { false }
15-
tasks.getByName("ideaModule").onlyIf { false }
16-
17-
compileJava {
13+
compileJava {
1814
actions = []
1915
dependsOn configurations.ajc.getTaskDependencyFromProjectDependency(true, "compileJava")
2016

2117
def outputDir = project.sourceSets.main.java.outputDir
22-
2318
inputs.files(project.sourceSets.main.allSource + project.sourceSets.main.compileClasspath)
2419
outputs.dir outputDir
2520

26-
ext.sourceCompatibility = project(":spring-core").compileJava.sourceCompatibility
27-
ext.targetCompatibility = project(":spring-core").compileJava.targetCompatibility
21+
sourceCompatibility = 1.8 // fixed even when general compatibility level set to e.g. 10
22+
targetCompatibility = 1.8
2823

2924
doLast{
3025
// Assemble runtime classpath from folders and JARs that actually exist
@@ -49,18 +44,17 @@ compileJava {
4944
}
5045
}
5146

52-
compileTestJava {
47+
compileTestJava {
5348
actions = []
5449
dependsOn configurations.ajc.getTaskDependencyFromProjectDependency(true, "compileTestJava")
5550
dependsOn jar
5651

5752
def outputDir = project.sourceSets.test.java.outputDir
58-
5953
inputs.files(project.sourceSets.test.allSource + project.sourceSets.test.compileClasspath)
6054
outputs.dir outputDir
6155

62-
ext.sourceCompatibility = project(":spring-core").compileTestJava.sourceCompatibility
63-
ext.targetCompatibility = project(":spring-core").compileTestJava.targetCompatibility
56+
sourceCompatibility = 1.8 // fixed even when general compatibility level set to e.g. 10
57+
targetCompatibility = 1.8
6458

6559
doLast{
6660
// Assemble runtime classpath from folders and JARs that actually exist

spring-context-support/spring-context-support.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ dependencies {
1717
testCompile(project(":spring-context"))
1818
testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
1919
testCompile("org.hibernate:hibernate-validator:6.0.9.Final")
20+
testCompile("javax.annotation:javax.annotation-api:1.3.2")
2021
testRuntime("org.ehcache:jcache:1.0.1")
2122
testRuntime("org.ehcache:ehcache:3.4.0")
2223
testRuntime("org.glassfish:javax.el:3.0.1-b08")
23-
testRuntime("javax.annotation:javax.annotation-api:1.3.2")
2424
testRuntime("com.sun.mail:javax.mail:1.6.1")
2525
}

spring-test/spring-test.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ dependencies {
4242
optional("org.apache.taglibs:taglibs-standard-jstlel:1.2.5") {
4343
exclude group: "org.apache.taglibs", module: "taglibs-standard-spec"
4444
}
45-
optional("net.sourceforge.htmlunit:htmlunit:2.29") {
45+
optional("net.sourceforge.htmlunit:htmlunit:2.30") {
4646
exclude group: "commons-logging", module: "commons-logging"
4747
}
48-
optional("org.seleniumhq.selenium:htmlunit-driver:2.29.3") {
48+
optional("org.seleniumhq.selenium:htmlunit-driver:2.30.0") {
4949
exclude group: "commons-logging", module: "commons-logging"
5050
}
5151
optional("org.seleniumhq.selenium:selenium-java:3.11.0") {
@@ -60,6 +60,7 @@ dependencies {
6060
optional("io.projectreactor:reactor-test")
6161
testCompile(project(":spring-context-support"))
6262
testCompile(project(":spring-oxm"))
63+
testCompile("javax.annotation:javax.annotation-api:1.3.2")
6364
testCompile("javax.cache:cache-api:1.1.0")
6465
testCompile("javax.ejb:javax.ejb-api:3.2")
6566
testCompile("javax.interceptor:javax.interceptor-api:1.2.1")
@@ -82,11 +83,10 @@ dependencies {
8283
testCompile('io.projectreactor.ipc:reactor-netty')
8384
// Pull in the latest JUnit 5 Launcher API and the Vintage engine as well
8485
// so that we can run JUnit 4 tests in IntelliJ IDEA.
86+
testCompile('de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1')
8587
testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
8688
testRuntime("org.junit.platform:junit-platform-launcher:${junitPlatformVersion}")
8789
testRuntime("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}")
88-
testCompile('de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1')
89-
testRuntime("javax.annotation:javax.annotation-api:1.3.2")
9090
testRuntime("org.glassfish:javax.el:3.0.1-b08")
9191
testRuntime("com.sun.xml.bind:jaxb-core:2.3.0")
9292
testRuntime("com.sun.xml.bind:jaxb-impl:2.3.0")

spring-web/spring-web.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ dependencies {
2929
optional("javax.validation:validation-api:1.1.0.Final")
3030
optional("javax.xml.bind:jaxb-api:2.3.0")
3131
optional("javax.xml.ws:jaxws-api:2.3.0")
32+
optional("org.glassfish.main:javax.jws:4.0-b33")
3233
optional("io.reactivex:rxjava:${rxjavaVersion}")
3334
optional("io.reactivex:rxjava-reactive-streams:${rxjavaAdapterVersion}")
3435
optional("io.reactivex.rxjava2:rxjava:${rxjava2Version}")

0 commit comments

Comments
 (0)