forked from Vortex-coders/AdminTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
70 lines (54 loc) · 1.54 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import com.xpdustry.toxopid.spec.ModPlatform
import com.xpdustry.toxopid.extension.anukeZelaux
import com.xpdustry.toxopid.extension.anukeJitpack
import com.xpdustry.toxopid.spec.ModMetadata
plugins {
java
id("com.xpdustry.toxopid") version "4.1.0"
}
project.version = "1.0.0"
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
anukeJitpack()
anukeZelaux()
}
val metadata = ModMetadata.fromJson(project.file("mod.json"))
version = metadata.version
val jabelVersion = "93fde537c7"
toxopid {
compileVersion.set("v${metadata.minGameVersion}")
platforms.set(setOf(ModPlatform.ANDROID, ModPlatform.DESKTOP))
}
allprojects {
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
options.compilerArgs.addAll(listOf("--release", "8"))
}
}
dependencies {
compileOnly(toxopid.dependencies.mindustryCore)
compileOnly(toxopid.dependencies.arcCore)
annotationProcessor("com.github.Anuken:jabel:$jabelVersion")
}
//tasks.runMindustryDesktop {
// mods.from(project.file("./libs/AdminTools-${version}.jar"))
//}
tasks {
withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(rootDir) {
include("mod.json")
}
doLast {
val name = project.rootDir.name
project.file("build/libs/$name-$version-dexed.jar").renameTo(project.file("build/libs/$name.jar"))
}
}
}
tasks.build {
dependsOn(tasks.mergeJar)
}