mirror of https://github.com/cabaletta/baritone
proguard: get java from gradle runtime before JAVA_HOME
This commit is contained in:
parent
f36072c8d3
commit
60d6791f0c
|
@ -114,6 +114,9 @@ public class ProguardTask extends BaritoneGradleTask {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
path = findJavaByGradleCurrentRuntime();
|
||||||
|
if (path != null) return path;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
path = findJavaByJavaHome();
|
path = findJavaByJavaHome();
|
||||||
if (path != null) return path;
|
if (path != null) return path;
|
||||||
|
@ -122,10 +125,6 @@ public class ProguardTask extends BaritoneGradleTask {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
path = findJavaByGradleCurrentRuntime();
|
|
||||||
if (path != null) return path;
|
|
||||||
|
|
||||||
throw new Exception("Unable to find java to determine ProGuard libraryjars. Please specify forkOptions.executable in javaCompile," +
|
throw new Exception("Unable to find java to determine ProGuard libraryjars. Please specify forkOptions.executable in javaCompile," +
|
||||||
" JAVA_HOME environment variable, or make sure to run Gradle with the correct JDK (a v1.8 only)");
|
" JAVA_HOME environment variable, or make sure to run Gradle with the correct JDK (a v1.8 only)");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue