@@ -9,34 +9,26 @@ repositories{
99
1010 // Downloads the dependencies JAR file from Mindustry releases; does not use any real repository. Surprisingly, this is the most reliable option.
1111 ivy{
12- url ' https://github.com/'
12+ url = ' https://github.com/'
1313 patternLayout{artifact ' /[organisation]/[module]/releases/download/[revision]/dependencies.jar' }
1414 metadataSources{ artifact() }
1515 }
1616
1717 // "Latest" option to depend on BE builds.
1818 ivy{
19- url ' https://github.com/'
19+ url = ' https://github.com/'
2020 patternLayout{artifact ' /[organisation]/[module]/releases/download/master/[revision].jar' }
2121 metadataSources{ artifact() }
2222 }
23-
24- // Do the same with jabel
25- ivy{
26- url ' https://github.com/'
27- patternLayout{artifact ' /[organisation]/[module]/releases/download/[revision]/jabel.jar' }
28- metadataSources{ artifact() }
29- }
3023}
3124
3225java {
33- targetCompatibility = 8
26+ targetCompatibility = JavaVersion . VERSION_17
3427 sourceCompatibility = JavaVersion . VERSION_17
3528}
3629
3730ext {
3831 mindustryVersion = ' v158.1' // the build number that this mod is made for
39- jabelVersion = " 93fde537c7"
4032 isWindows = System . getProperty(" os.name" ). toLowerCase(). contains(" windows" )
4133 sdkRoot = System . getenv(" ANDROID_HOME" ) ?: System . getenv(" ANDROID_SDK_ROOT" )
4234}
@@ -54,12 +46,11 @@ dependencies{
5446 def useLatest = false // set to "true" to always depend on the newest version of mindustry
5547
5648 compileOnly useLatest ? " Anuken:MindustryBuilds:latest" : " Anuken:Mindustry:$mindustryVersion "
57-
58- annotationProcessor " Anuken:jabel:v1.0.0"
5949}
6050
6151tasks. register(' jarAndroid' ){
6252 dependsOn " jar"
53+ def projectName = project. name
6354
6455 doLast{
6556 if (! sdkRoot || ! new File (sdkRoot). exists()) throw new GradleException (" No valid Android SDK found. Ensure that ANDROID_HOME is set to your Android SDK directory." )
@@ -74,7 +65,7 @@ tasks.register('jarAndroid'){
7465 def d8 = isWindows ? " d8.bat" : " d8"
7566
7667 // dex and desugar files - this requires d8 in your PATH
77- " $d8 $dependencies --min-api 14 --output ${ project.name } Android.jar ${ project.name } Desktop.jar"
68+ " $d8 $dependencies --min-api 14 --output ${ projectName } Android.jar ${ projectName } Desktop.jar"
7869 .execute(null , new File (" build/libs" )). waitForProcessOutput(System . out, System . err)
7970 }
8071}
9687}
9788
9889tasks. register(' deploy' , Jar ){
90+ def projectName = project. name
9991 dependsOn jarAndroid
10092 dependsOn jar
101- archiveFileName = " ${ project.name } .jar"
93+ archiveFileName = " ${ projectName } .jar"
10294
103- from{ [zipTree(" build/libs/${ project.name } Desktop.jar" ), zipTree(" build/libs/${ project.name } Android.jar" )] }
95+ from{ [zipTree(" build/libs/${ projectName } Desktop.jar" ), zipTree(" build/libs/${ projectName } Android.jar" )] }
10496
10597 doLast{
10698 delete{
107- delete " build/libs/${ project.name } Android.jar"
99+ delete " build/libs/${ projectName } Android.jar"
108100 }
109101 }
110102}
0 commit comments