-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
51 lines (42 loc) · 1.21 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
val mindustryVersion = "v140.1"
plugins {
kotlin("jvm") version "1.7.20"
java
}
sourceSets["main"].kotlin.srcDir("src")
sourceSets["main"].java.srcDir("src")
java {
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_16
}
repositories {
mavenCentral()
maven("https://www.jitpack.io")
}
dependencies {
compileOnly("com.github.Anuken.Arc:arc-core:$mindustryVersion")
compileOnly("com.github.anuken.mindustryjitpack:core:$mindustryVersion")
annotationProcessor("com.github.Anuken:jabel:0.9.0")
}
tasks.jar {
from(configurations.runtimeClasspath.get().map { if (it.isDirectory()) it else zipTree(it) })
from(rootDir){
include("plugin.hjson")
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.create("buildMove") {
dependsOn("jar")
doLast {
copy {
from("build/libs/${project.name}.jar")
into("${System.getenv("destination")}/config/mods")
}
exec {
workingDir = File(System.getenv("destination"))
commandLine("java", "-jar", System.getenv("jarpath"), "host")
standardOutput = System.out
standardInput = System.`in`
}
}
}