Skip to content

Commit

Permalink
Legacy SDK - Remove Java 7 check (#3663)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanbisutti committed Apr 23, 2024
1 parent 82f451a commit bc8d429
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions gradle/common-java.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ jacocoTestReport {
}

// setting this variable is highly recommended
def java7JreDir = System.env.'JAVA_JRE_7'
def isJava7 = JavaVersion.current().isJava7()
def isJava7Compatible = JavaVersion.current().isJava7Compatible()

if (!isJava7Compatible) {
Expand All @@ -113,26 +111,6 @@ if (!isJava7Compatible) {
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 {
integrationTest {
Expand Down

0 comments on commit bc8d429

Please sign in to comment.