Skip to content

Commit

Permalink
Merge pull request #24 from SMOLKEYS/master
Browse files Browse the repository at this point in the history
windows is a disaster
  • Loading branch information
Anuken authored Nov 28, 2023
2 parents a53a5e3 + 2e0e674 commit f579a41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down Expand Up @@ -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)
}
}
Expand Down

0 comments on commit f579a41

Please sign in to comment.