-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
78 lines (60 loc) · 1.81 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
// Gradle / Project setup
// ---------------------------------------------------------
plugins {
id 'java'
// Generates the plugin.yml, allows easier access to common plugin libraries, and facilitates the test server tasks.
id 'kr.entree.spigradle' version '2.2.3'
// Allows us to shade libraries into the build plugin.
id 'com.github.johnrengelman.shadow' version '5.2.0'
}
repositories {
jcenter()
mavenCentral()
spigot()
paper()
}
dependencies {
compileOnly spigot(project.property('mcVersion'))
compileOnly paper(project.property('mcVersion'))
implementation 'com.google.guava:guava:28.2-jre'
testImplementation platform('org.junit:junit-bom:5.7.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation mockBukkit()
}
test {
useJUnitPlatform()
testLogging {
events 'passed', 'skipped', 'failed'
}
}
task cleanAll {
dependsOn 'clean'
dependsOn 'cleanDebug'
dependsOn 'cleanSpigotBuild'
}
// Compilation variables / tasks
// ---------------------------------------------------------
targetCompatibility = 1.8
sourceCompatibility = 1.8
tasks.build.dependsOn(shadowJar)
shadowJar {
// This is required to prevent Spigradle from attempting to look for an incorrectly named file during debug.
classifier = ''
}
// Plugin variables / tasks
// ---------------------------------------------------------
group = project.property('group')
version = project.property('version')
description = project.property('description')
spigot {
name = project.property('name')
authors = project.property('authors').split(/(,\s*|\s+)/)
apiVersion = project.property('apiVersion')
load = STARTUP
debug {
eula = true
buildVersion = project.property('mcVersion')
args = project.property('debugServerArgs').split(/(,\s*|\s+)/)
jvmArgs = project.property('debugServerJvmArgs').split(/(,\s*|\s+)/)
}
}