Skip to content

Commit

Permalink
Add exception message when not invoking with JDK11 compatible develop…
Browse files Browse the repository at this point in the history
…ment build (#1510)
  • Loading branch information
devinrsmith authored Nov 1, 2021
1 parent ae88b45 commit 33a930f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,24 @@ plugins {

import io.deephaven.tools.Java
import io.deephaven.tools.License
import org.gradle.internal.jvm.Jvm

import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.util.concurrent.TimeUnit

def isCi = System.getenv().getOrDefault("CI", "false") == "true"
def gradleJvmVersion = Jvm.current().getJavaVersion()
if (isCi) {
if (gradleJvmVersion != JavaVersion.VERSION_11) {
throw new IllegalStateException("JDK 11 is currently required for CI builds")
}
} else {
if (!gradleJvmVersion.isCompatibleWith(JavaVersion.VERSION_11)) {
throw new IllegalStateException("JDK 11+ is currently required for development builds. For help installing, see https://deephaven.io/core/docs/how-to-guides/launch-build")
}
}

allprojects {
repositories {
mavenCentral()
Expand Down

0 comments on commit 33a930f

Please sign in to comment.