Skip to content

Commit

Permalink
Add Java toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
dondonz committed Aug 21, 2023
1 parent 24526b6 commit 5a13516
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ plugins {
id "biz.aQute.bnd.builder" version "6.4.0"
}

if (JavaVersion.current() != JavaVersion.VERSION_1_8) {
def msg = String.format("This build must be run with java 1.8 - you are running %s - gradle finds the JDK via JAVA_HOME=%s",
JavaVersion.current(), System.getenv("JAVA_HOME"))
throw new GradleException(msg)
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

def getDevelopmentVersion() {
def output = new StringBuilder()
def error = new StringBuilder()
Expand Down

0 comments on commit 5a13516

Please sign in to comment.