diff --git a/.circleci/config.yml b/.circleci/config.yml index 442b941327..665308dfda 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -77,6 +77,10 @@ jobs: sudo apt-get update sudo apt-get install $INSTALL_ZULU fi + if [ "${INSTALL_OPENJDK}" != "" ]; then + wget -O ~/openjdk.tar.gz $INSTALL_OPENJDK + sudo tar xvf ~/openjdk.tar.gz -C /usr/lib/jvm/ + fi - attach_workspace: at: . @@ -131,6 +135,13 @@ jobs: - TEST_TASK: testJava10 latestDepTestJava10 - INSTALL_ZULU: zulu-10 + test_11: + <<: *default_test_job + environment: + - JAVA11_HOME: /usr/lib/jvm/jdk-11 + - TEST_TASK: testJava11 latestDepTestJava11 + - INSTALL_OPENJDK: https://download.java.net/java/ga/jdk11/openjdk-11_linux-x64_bin.tar.gz + agent_integration_tests: <<: *defaults docker: @@ -255,6 +266,12 @@ workflows: filters: tags: only: /.*/ + - test_11: + requires: + - build + filters: + tags: + only: /.*/ - agent_integration_tests: requires: @@ -276,6 +293,7 @@ workflows: - test_8 - test_9 - test_10 + - test_11 - agent_integration_tests filters: branches: @@ -289,6 +307,7 @@ workflows: - test_8 - test_9 - test_10 + - test_11 - agent_integration_tests filters: branches: diff --git a/gradle/jacoco.gradle b/gradle/jacoco.gradle index fa1148209e..75c8dc5641 100644 --- a/gradle/jacoco.gradle +++ b/gradle/jacoco.gradle @@ -1,7 +1,7 @@ apply plugin: "jacoco" jacoco { - toolVersion = "0.8.1" + toolVersion = "0.8.2" } jacocoTestReport { diff --git a/gradle/java.gradle b/gradle/java.gradle index d253375699..0840b6049e 100644 --- a/gradle/java.gradle +++ b/gradle/java.gradle @@ -141,47 +141,32 @@ project.ext.testJava8Only = [] project.ext.testJava8Minimum = [] tasks.withType(Test) { - if (name.endsWith("Java7") || name.endsWith("Java9") || name.endsWith("Java10")) { + if (name.endsWith("Java7") || name.endsWith("Java9") || name.endsWith("Java10") || name.endsWith("Java11")) { return } def cloned = it - def java7Home = System.getenv("JAVA7_HOME") - if (java7Home != null) { - def testJ7 = task "${cloned.name}Java7"(type: cloned.class) { - description "Runs $cloned.name under java 7" - executable = "$java7Home/bin/java" - afterEvaluate { - exclude project.testJava8Only - exclude project.testJava8Minimum + [7, 9, 10, 11].each { i -> + def javaHome = System.getenv("JAVA${i}_HOME") + if (javaHome != null) { + def test = task "${cloned.name}Java${i}"(type: cloned.class) { + group = "Verification" + description "Runs $cloned.name under Java ${i}" + executable = "$javaHome/bin/java" + if (i == 7) { + afterEvaluate { + exclude project.testJava8Only + exclude project.testJava8Minimum + } + } else if (i > 8) { + afterEvaluate { + exclude project.testJava8Only + } + } } + tasks.check.dependsOn test } - tasks.check.dependsOn testJ7 - } - - def java9Home = System.getenv("JAVA9_HOME") - if (java9Home != null) { - def testJ9 = task "${cloned.name}Java9"(type: cloned.class) { - description "Runs $cloned.name under java 9" - executable = "$java9Home/bin/java" - project.afterEvaluate { - exclude project.testJava8Only - } - } - tasks.check.dependsOn testJ9 - } - - def java10Home = System.getenv("JAVA10_HOME") - if (java10Home != null) { - def testJ10 = task "${cloned.name}Java10"(type: cloned.class) { - description "Runs $cloned.name under java 10" - executable = "$java10Home/bin/java" - project.afterEvaluate { - exclude project.testJava8Only - } - } - tasks.check.dependsOn testJ10 } }