Skip to content

Commit f3430ed

Browse files
committed
Update build.gradle from template
1 parent 33afefb commit f3430ed

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ ext{
1919
//the build number that this mod is made for
2020
mindustryVersion = 'v145.1'
2121
jabelVersion = "93fde537c7"
22+
//windows sucks
23+
isWindows = System.getProperty("os.name").toLowerCase().contains("windows")
2224
sdkRoot = System.getenv("ANDROID_HOME") ?: System.getenv("ANDROID_SDK_ROOT")
2325
}
2426

@@ -58,8 +60,10 @@ task jarAndroid{
5860
//collect dependencies needed for desugaring
5961
def dependencies = (configurations.compileClasspath.asList() + configurations.runtimeClasspath.asList() + [new File(platformRoot, "android.jar")]).collect{ "--classpath $it.path" }.join(" ")
6062

63+
def d8 = isWindows ? "d8.bat" : "d8"
64+
6165
//dex and desugar files - this requires d8 in your PATH
62-
"d8 $dependencies --min-api 14 --output ${project.archivesBaseName}Android.jar ${project.archivesBaseName}Desktop.jar"
66+
"$d8 $dependencies --min-api 14 --output ${project.archivesBaseName}Android.jar ${project.archivesBaseName}Desktop.jar"
6367
.execute(null, new File("$buildDir/libs")).waitForProcessOutput(System.out, System.err)
6468
}
6569
}

0 commit comments

Comments
 (0)