Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Slish562 authored Mar 27, 2024
1 parent 542e3be commit f5415f0
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ ext{
//the build number that this mod is made for
mindustryVersion = 'v146'
jabelVersion = "93fde537c7"
//windows sucks
isWindows = System.getProperty("os.name").toLowerCase().contains("windows")
sdkRoot = System.getenv("ANDROID_HOME") ?: System.getenv("ANDROID_SDK_ROOT")
}


//java 8 backwards compatibility flag
allprojects{
tasks.withType(JavaCompile){
Expand All @@ -41,9 +44,9 @@ dependencies {
}

//force arc version
configurations.configureEach {
configurations.all{
resolutionStrategy.eachDependency { details ->
if(details.requested.group == 'com.github.Anuken.Arc') {
if(details.requested.group == 'com.github.Anuken.Arc'){
details.useVersion "$mindustryVersion"
}
}
Expand All @@ -62,9 +65,11 @@ 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"
.execute(null, new File("$buildDir/libs")).waitForProcessOutput(System.out, System.err)
"$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 Expand Up @@ -100,4 +105,4 @@ task deploy(type: Jar){
delete "$buildDir/libs/${project.archivesBaseName}Android.jar"
}
}
}
}

0 comments on commit f5415f0

Please sign in to comment.