Legacy SDK - Remove Java 7 check (#3663)
This commit is contained in:
Родитель
82f451af94
Коммит
bc8d429e6b
|
@ -103,8 +103,6 @@ jacocoTestReport {
|
||||||
}
|
}
|
||||||
|
|
||||||
// setting this variable is highly recommended
|
// setting this variable is highly recommended
|
||||||
def java7JreDir = System.env.'JAVA_JRE_7'
|
|
||||||
def isJava7 = JavaVersion.current().isJava7()
|
|
||||||
def isJava7Compatible = JavaVersion.current().isJava7Compatible()
|
def isJava7Compatible = JavaVersion.current().isJava7Compatible()
|
||||||
|
|
||||||
if (!isJava7Compatible) {
|
if (!isJava7Compatible) {
|
||||||
|
@ -113,26 +111,6 @@ if (!isJava7Compatible) {
|
||||||
throw new GradleException("incompatible JDK version: ${JavaVersion.current()}; needs 1.7+")
|
throw new GradleException("incompatible JDK version: ${JavaVersion.current()}; needs 1.7+")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (java7JreDir) {
|
|
||||||
def jre7libDir = fileTree(dir: "$java7JreDir/lib", include: '*.jar')
|
|
||||||
if (!jre7libDir.any()) {
|
|
||||||
throw new GradleException("Invalid JAVA_JRE_7 directory. ${jre7libDir.dir} was empty")
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
|
||||||
options.bootstrapClasspath = jre7libDir
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
def msg = "IMPORTANT: Environment variable 'JAVA_JRE_7' is not defined - Install JRE 7 and set 'JAVA_JRE_7' to prevent runtime compatibility issues!"
|
|
||||||
if (!isJava7) {
|
|
||||||
if (isBuildServer || isRelease) {
|
|
||||||
logger.error msg
|
|
||||||
throw new GradleException("JAVA_JRE_7 must be set")
|
|
||||||
} else {
|
|
||||||
logger.warn msg
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
integrationTest {
|
integrationTest {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче