Skip to content

Commit

Permalink
Require Java 1.8.0u202 or later for the build
Browse files Browse the repository at this point in the history
Java versions prior to 1.8.0u202 have known issues that cause
invalid bytecode in certain patterns of annotation usage.
  • Loading branch information
vlsi committed Dec 9, 2020
1 parent 7900625 commit fd20efd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions build.gradle.kts
Expand Up @@ -77,6 +77,18 @@ val werror by props(true) // treat javac warnings as errors
// Inherited from stage-vote-release-plugin: skipSign, useGpgCmd
// Inherited from gradle-extensions-plugin: slowSuiteLogThreshold=0L, slowTestLogThreshold=2000L

// Java versions prior to 1.8.0u202 have known issues that cause invalid bytecode in certain patterns
// of annotation usage.
// So we require at least 1.8.0u202
System.getProperty("java.version")
.removePrefix("1.8.0_")
.toIntOrNull()
?.let {
require(it >= 202) {
"Apache Calcite requires Java 1.8.0u202 or later. The current Java version is " + System.getProperty("java.version")
}
}

ide {
copyrightToAsf()
ideaInstructionsUri =
Expand Down

0 comments on commit fd20efd

Please sign in to comment.