From b1b0fa890694c575b7ff83c747495fefbb582dd6 Mon Sep 17 00:00:00 2001 From: skat Date: Sat, 17 Jul 2021 19:57:11 +0300 Subject: [PATCH] Increment version, remove android compile task --- README.md | 4 ++-- assets/mod.json | 2 +- build.gradle | 24 ++---------------------- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 6aaec20..8e5b993 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ If you use for a server, you can also start the server automatically, use [this ## Building -* Windows: `gradlew desktop` -* *nix/Mac OS: `./gradlew desktop` +* Windows: `gradlew dist` +* *nix/Mac OS: `./gradlew dist` After building, the `.jar` file should be located in `build/libs` folder. diff --git a/assets/mod.json b/assets/mod.json index f21c70b..6389172 100644 --- a/assets/mod.json +++ b/assets/mod.json @@ -6,7 +6,7 @@ "main": "inside.updater.Loader", "hidden": true, "java": true, - "version": "0.8", + "version": "0.9", "minGameVersion": 120, "repo": "MindustryInside/AutoUpdater" } diff --git a/build.gradle b/build.gradle index e93e01a..45d07b2 100644 --- a/build.gradle +++ b/build.gradle @@ -17,15 +17,11 @@ repositories{ ext{ def json = new JsonSlurper() - def libs = "$rootDir/build/libs" def modFile = file("${sourceSets.main.resources.srcDirs.last()}/mod.json") def mod = json.parseText(modFile.text) artifactBaseName = mod.name + (!mod.version.isEmpty() ? "-$mod.version" : "") - jarPath = "$libs/${artifactBaseName}-desktop.jar" - dexPath = "$libs/${artifactBaseName}-android.jar" - versions = [:] versions.mindustry = '126.2' versions.jabel = '0.4.1' @@ -38,8 +34,8 @@ dependencies{ annotationProcessor "com.github.MindustryInside:jabel:$versions.jabel" } -task desktop(type: Jar){ - archiveBaseName.set "$artifactBaseName-desktop" +task dist(type: Jar){ + archiveBaseName.set artifactBaseName from{ configurations.runtimeClasspath.collect{it.isDirectory() ? it : zipTree(it)} @@ -48,22 +44,6 @@ task desktop(type: Jar){ with jar } -task android(type: Exec, dependsOn: desktop){ - def command = ['d8', jarPath, '--min-api', '28', '--output', dexPath] - - if(System.getProperty('os.name').toLowerCase().contains('windows')){ - commandLine("cmd", "/c", *command) - }else{ - commandLine(*command) - } -} - -task dist(type: Jar, dependsOn: android){ - archiveBaseName.set artifactBaseName - - from zipTree(jarPath), zipTree(dexPath) -} - tasks.withType(JavaCompile){ if(JavaVersion.current() != JavaVersion.VERSION_1_8){ options.compilerArgs = ['--release', '8', '--enable-preview']