Skip to content

Commit 5528fe8

Browse files
author
Anuraag Agrawal
authored
Add an error message to better explain Java 11+ build requirement (#2081)
* Add an error message to better explain Java 11+ build requirement * Better wording * Merge
1 parent a68b0bf commit 5528fe8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ plugins {
1010
id "io.morethan.jmhreport" apply false
1111
}
1212

13+
if (!JavaVersion.current().isJava11Compatible()) {
14+
throw new GradleException("JDK 11 or higher is required to build. " +
15+
"One option is to download it from https://adoptopenjdk.net/. If you believe you already " +
16+
"have it, please check that the JAVA_HOME environment variable is pointing at the " +
17+
"JDK 11 installation.")
18+
}
19+
1320
ext {
1421
opentelemetryProjects = subprojects - project(":opentelemetry-bom")
1522
}

0 commit comments

Comments
 (0)