forked from BigScary/ExtraHardMode
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathspigot.gradle
50 lines (43 loc) · 1.17 KB
/
spigot.gradle
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
def buildTools = file('/spigot/BuildTools.jar').getAbsolutePath()
task spigotDownloadBuildtools() {
def sourceUrl = 'https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar'
def target = file(buildTools).newOutputStream()
target << new URL(sourceUrl).openStream()
target.close()
}
task spigotRunBuildTools (type: Exec) {
commandLine 'java -jar spigot/BuildTools.jar'
}
task copySpigotToServer(type: Copy) {
from 'spigot/'
into 'spigot/server'
include 'spigot-*.jar'
}
task copyEHMToServer(type: Copy) {
from 'build/libs'
into 'spigot/server/plugins'
include 'ExtraHardMode-*-all.jar'
}
task buildEHM {
dependsOn 'build'
dependsOn 'shadowJar'
dependsOn 'copySpigotToServer'
dependsOn 'copyEHMToServer'
tasks.findByName('copySpigotToServer').mustRunAfter 'shadowJar'
tasks.findByName('copyEHMToServer').mustRunAfter 'shadowJar'
}
configure(spigotDownloadBuildtools){
group = 'EHM'
}
configure(spigotRunBuildTools){
group = 'EHM'
}
configure(copyEHMToServer){
group = 'EHM'
}
configure(copySpigotToServer){
group = 'EHM'
}
configure(buildEHM){
group = 'EHM'
}