Created
April 26, 2019 03:49
-
-
Save rivergod/ee07014733d2f7ddd257c0210d349bac to your computer and use it in GitHub Desktop.
Revisions
-
rivergod created this gist
Apr 26, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ allprojects { afterEvaluate { def versions = [ '1.6' : "/usr/lib/jvm/zulu-6-amd64/jre/lib/", '1.7' : "/usr/lib/jvm/zulu-7-amd64/jre/lib/", '1.8' : "/usr/lib/jvm/zulu-8-amd64/jre/lib/" ] // convert map to classpaths versions = versions.collectEntries { key, value -> [key, fileTree(dir: value, include: "*.jar")] } def apply = { task -> if (versions.containsKey(task.targetCompatibility)) { task.options.fork = true; task.options.bootstrapClasspath = versions[task.targetCompatibility] } } tasks.withType(JavaCompile, apply) } }