proguard: get java from gradle runtime before JAVA_HOME

This commit is contained in:
Babbaj 2023-08-16 00:27:23 -04:00
parent f36072c8d3
commit 60d6791f0c
No known key found for this signature in database
GPG Key ID: F044309848A07CAC
1 changed files with 3 additions and 4 deletions

View File

@ -114,6 +114,9 @@ public class ProguardTask extends BaritoneGradleTask {
ex.printStackTrace();
}
path = findJavaByGradleCurrentRuntime();
if (path != null) return path;
try {
path = findJavaByJavaHome();
if (path != null) return path;
@ -122,10 +125,6 @@ public class ProguardTask extends BaritoneGradleTask {
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," +
" JAVA_HOME environment variable, or make sure to run Gradle with the correct JDK (a v1.8 only)");
}