Last active
June 12, 2018 19:26
-
-
Save tiwiz/a2bd1f5249147e017730 to your computer and use it in GitHub Desktop.
Revisions
-
tiwiz revised this gist
Oct 5, 2015 . 1 changed file with 8 additions and 0 deletions.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 @@ -1,4 +1,12 @@ import org.gradle.internal.os.OperatingSystem; String getJavaHome(String version) { def stdout = new ByteArrayOutputStream() exec { commandLine "/usr/libexec/java_home", "-v", version standardOutput = stdout; } return stdout.toString().trim() } task findOs { doLast { -
tiwiz created this gist
Oct 5, 2015 .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,14 @@ import org.gradle.internal.os.OperatingSystem; task findOs { doLast { if (OperatingSystem.current().isMacOsX()) { println("Adding retrolmbda") retrolambda { jdk System.getenv("JAVA8_HOME") ?: getJavaHome("1.8") oldJdk System.getenv("JAVA7_HOME") ?: getJavaHome("1.7") } } } } preBuild.dependsOn findOs