Skip to content

Commit

Permalink
Merge pull request #8 from petebankhead/main
Browse files Browse the repository at this point in the history
Add toolchain support, build with Java 11
  • Loading branch information
petebankhead authored Aug 7, 2021
2 parents bf93304 + 0d9ac18 commit ced222f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,17 @@ tasks.register("copyDependencies", Copy) {
from configurations.default
into 'build/libs'
}

java {
def version = project.findProperty('toolchain')
if (!version)
version = 11
else if (version.strip() == 'skip')
version = null
if (version != null) {
logger.quiet("Setting toolchain to {}", version)
toolchain {
languageVersion = JavaLanguageVersion.of(version)
}
}
}

0 comments on commit ced222f

Please sign in to comment.