diff --git a/build.gradle b/build.gradle index fe6de8e..6fa5dd1 100644 --- a/build.gradle +++ b/build.gradle @@ -19,6 +19,8 @@ ext{ //the build number that this mod is made for mindustryVersion = 'v145' jabelVersion = "93fde537c7" + //windows sucks + isWindows = System.getProperty("os.name").toLowerCase().contains("windows") sdkRoot = System.getenv("ANDROID_HOME") ?: System.getenv("ANDROID_SDK_ROOT") } @@ -58,8 +60,10 @@ task jarAndroid{ //collect dependencies needed for desugaring def dependencies = (configurations.compileClasspath.asList() + configurations.runtimeClasspath.asList() + [new File(platformRoot, "android.jar")]).collect{ "--classpath $it.path" }.join(" ") + def d8 = isWindows ? "d8.bat" : "d8" + //dex and desugar files - this requires d8 in your PATH - "d8 $dependencies --min-api 14 --output ${project.archivesBaseName}Android.jar ${project.archivesBaseName}Desktop.jar" + "$d8 $dependencies --min-api 14 --output ${project.archivesBaseName}Android.jar ${project.archivesBaseName}Desktop.jar" .execute(null, new File("$buildDir/libs")).waitForProcessOutput(System.out, System.err) } }