Merge pull request #778 from DataDog/mar-kolya/some-java11-prep
Mar kolya/some java11 prep
This commit is contained in:
commit
722e6c4f68
|
@ -1,4 +1,4 @@
|
|||
def groovyVer = "2.5.2"
|
||||
def groovyVer = "2.5.3"
|
||||
def spockGroovyVer = groovyVer.replaceAll(/\.\d+$/, '')
|
||||
|
||||
ext {
|
||||
|
@ -15,7 +15,7 @@ ext {
|
|||
logback : "1.2.3",
|
||||
lombok : "1.18.4",
|
||||
bytebuddy : "1.9.9",
|
||||
scala : "2.11.12",
|
||||
scala : "2.11.12", // Last version to support Java 7 (2.12+ require Java 8+)
|
||||
kotlin : "1.3.11",
|
||||
coroutines : "1.1.0"
|
||||
]
|
||||
|
|
|
@ -152,7 +152,7 @@ if (project.parent && project.parent.hasProperty("javaExecutableVersionCache"))
|
|||
project.ext.javaExecutableVersionCache = [:]
|
||||
}
|
||||
|
||||
def getJavaExecutableVersion(String path) {
|
||||
JavaVersion getJavaExecutableVersion(String path) {
|
||||
def cache = project.ext.javaExecutableVersionCache
|
||||
|
||||
if (cache.containsKey(path)) {
|
||||
|
@ -221,6 +221,17 @@ for (def env : System.getenv().entrySet()) {
|
|||
def javaPath = "$javaHome/bin/java"
|
||||
def javaVersion = getJavaExecutableVersion(javaPath)
|
||||
|
||||
// This is slightly complicated because we need to dereference symlinks to make sure
|
||||
// we are considering same JVM implementation
|
||||
def currentJavaHome = new File(System.getProperty("java.home")).toPath().toRealPath()
|
||||
if (currentJavaHome.endsWith("jre")) {
|
||||
currentJavaHome = currentJavaHome.parent
|
||||
}
|
||||
if (currentJavaHome == new File(javaHome).toPath().toRealPath()) {
|
||||
// Skip JVM implementation we are running gradle on
|
||||
continue
|
||||
}
|
||||
|
||||
def parentTask = task "testJava${javaName}"() {
|
||||
group = 'Verification'
|
||||
description = "Run tests for Java ${javaName}"
|
||||
|
@ -228,7 +239,7 @@ for (def env : System.getenv().entrySet()) {
|
|||
tasks.check.dependsOn parentTask
|
||||
|
||||
tasks.withType(Test).configureEach {
|
||||
// if (name.endsWith("Generated")) {
|
||||
//if (name.endsWith("Generated")) {
|
||||
if (!name.equals("test")) {
|
||||
// The way we're copying the test doesn't currently work with "test-sets" generated tests.
|
||||
return
|
||||
|
|
|
@ -2,6 +2,16 @@
|
|||
|
||||
apply plugin: 'scala'
|
||||
|
||||
configurations {
|
||||
all {
|
||||
if (it.name != "zinc") {
|
||||
resolutionStrategy {
|
||||
force deps.scala
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compileTestGroovy {
|
||||
classpath = classpath.plus(files(compileTestScala.destinationDir))
|
||||
dependsOn compileTestScala
|
||||
|
|
Loading…
Reference in New Issue