Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy SDK - Remove Java 7 check #3663

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading