[build] reverts premature migration to new API

This commit is contained in:
Roman Shevchenko
2017-12-21 17:34:35 +01:00
parent ff1842bfda
commit ec5440bbdd
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ private String setupJdkPath(String propertyName, String defaultDir, String envVa
else {
jdk = guessJdk()
def jdkInfo = JdkVersionDetector.instance.detectJdkVersionInfo(jdk)
if (propertyName.contains("8") && jdkInfo.@version.feature != 8) {
if (propertyName.contains("8") && jdkInfo.version.contains("1.8.")) {
projectBuilder.error("JDK 1.8 is required to compile the project, but '$propertyName' property and '$envVarName' environment variable" +
" aren't defined and default JDK $jdk ($jdkInfo) cannot be used as JDK 1.8")
return null
@@ -43,7 +43,7 @@ class JdkUtils {
else {
jdkDir = getCurrentJdk()
def jdkInfo = JdkVersionDetector.instance.detectJdkVersionInfo(jdkDir)
if (propertyName.contains("8") && jdkInfo.@version.feature != 8) {
if (propertyName.contains("8") && !jdkInfo.version.contains("1.8.")) {
messages.error("JDK 1.8 is required to compile the project, but '$propertyName' property and '$envVarName' environment variable" +
" aren't defined and default JDK $jdkDir ($jdkInfo) cannot be used as JDK 1.8")
return null