You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by vl...@apache.org on 2020/12/09 20:10:21 UTC
[calcite] 01/01: Require Java 1.8.0u202 or later for the build
This is an automated email from the ASF dual-hosted git repository.
vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git
commit 3311d45bdf95eecac9659443b350080d0b5f4eee
Author: Vladimir Sitnikov <si...@gmail.com>
AuthorDate: Wed Dec 9 11:27:04 2020 +0300
Require Java 1.8.0u202 or later for the build
Java versions prior to 1.8.0u202 have known issues that cause
invalid bytecode in certain patterns of annotation usage.
---
build.gradle.kts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/build.gradle.kts b/build.gradle.kts
index 697b02b..9255897 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -77,6 +77,20 @@ 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").let { version ->
+ version.takeIf { it.startsWith("1.8.0_") }
+ ?.removePrefix("1.8.0_")
+ ?.toIntOrNull()
+ ?.let {
+ require(it >= 202) {
+ "Apache Calcite requires Java 1.8.0u202 or later. The current Java version is $version"
+ }
+ }
+}
+
ide {
copyrightToAsf()
ideaInstructionsUri =