-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
108 lines (89 loc) · 2.4 KB
/
build.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import org.apache.tools.ant.filters.ReplaceTokens
buildscript {
repositories {
jcenter()
}
dependencies {
classpath group: 'eu.appsatori', name: 'gradle-fatjar-plugin', version: '0.3'
classpath group: 'com.github.rodionmoiseev.gradle.plugins', name: 'idea-utils', version: '0.2'
classpath group: 'de.undercouch', name: 'gradle-download-task', version: '2.1.0'
}
}
apply plugin: 'java'
apply plugin: 'eu.appsatori.fatjar'
apply plugin: 'de.undercouch.download'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'idea-utils'
idea {
project {
ipr {
withXml { xmlProvider ->
def project = xmlProvider.asNode()
def runConfigs = new XmlParser().parse(new File("config/intellij_runconfigs.txt"))
project.append(runConfigs)
}
}
}
}
repositories {
jcenter()
maven {
url "https://hub.spigotmc.org/nexus/content/repositories/snapshots"
}
maven {
url "https://oss.sonatype.org/content/groups/public"
}
ivy {
url "http://getspigot.org/jenkins/job/Spigot/lastSuccessfulBuild/artifact"
layout 'pattern', {
ivy '[module]-ivy.xml'
artifact '[module]-[revision].[ext]'
}
}
}
group = "net.javaforge.minecraft.spigot"
version = project.property("version")
sourceCompatibility = 1.8
dependencies {
compile "org.spigotmc:spigot-api:1.9-R0.1-SNAPSHOT", {
ext { fatJarExclude = true }
}
compile ':spigot:1.9', {
ext { fatJarExclude = true }
}
compile 'com.google.guava:guava:19.0'
}
task wrapper(type: Wrapper) {
gradleVersion = '2.12'
}
processResources {
filter ReplaceTokens, tokens: [
"version": project.property("version")
]
}
clean {
delete "testserver/"
}
task setupDevServer(type: Copy) {
from 'config/serverfiles'
into 'testserver'
}
task cleanPlugins() {
delete "testserver/plugins"
}
task copyPluginToTestserver(dependsOn: ['build'], type: Copy) {
from "${buildDir}/libs"
into "testserver/plugins"
}
task startDevServer(dependsOn: ['cleanPlugins', 'copyPluginToTestserver', 'setupDevServer'], type: JavaExec) {
classpath configurations.compile
main = "org.bukkit.craftbukkit.Main"
workingDir = "testserver/"
standardInput = System.in
}
jar {
actions = []
dependsOn = []
dependsOn('fatJar')
}