forked from sVoxelDev/spigot-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
122 lines (100 loc) · 3.65 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
buildscript {
repositories {
jcenter()
mavenCentral()
}
}
plugins {
id 'java'
id 'jacoco'
id 'idea'
id 'io.freefair.lombok' version '5.3.0'
id 'io.ebean' version '12.5.1'
id 'kr.entree.spigradle' version '2.2.3'
id 'com.github.johnrengelman.shadow' version '6.1.0'
}
apply from: "$rootDir/gradle/jacoco.gradle"
apply from: "$rootDir/gradle/publish.gradle"
if (project.hasProperty("local_script")) {
apply from: file(local_script + "/build.local.gradle")
}
sourceCompatibility = 11
targetCompatibility = 11
ext {
mcVersion = project.property("mcVersion")
}
group project.property("group")
spigot {
name = project.property("pluginName")
authors = [project.property("author")]
apiVersion = project.property("apiVersion")
load = STARTUP
// depends = ['']
// softDepends = ['']
}
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs += ["-parameters"]
options.fork = true
options.forkOptions.executable = 'javac'
}
archivesBaseName = project.property("pluginName")
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url = 'https://jitpack.io' }
spigot()
maven { url = "https://repo.aikar.co/content/groups/aikar/" }
}
dependencies {
compileOnly spigot(mcVersion)
implementation 'net.silthus:ebean-wrapper:2.8.1'
implementation 'net.silthus.configlib:configlib-bukkit:2.6.0'
implementation 'co.aikar:acf-paper:0.5.0-SNAPSHOT'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.11.3'
implementation 'net.kyori:adventure-api:4.5.0'
implementation 'net.kyori:adventure-text-minimessage:4.0.0-SNAPSHOT'
implementation 'net.kyori:adventure-platform-bukkit:4.0.0-SNAPSHOT'
implementation group: 'net.kyori', name: 'adventure-text-feature-pagination', version: '4.0.0-SNAPSHOT'
implementation group: 'net.kyori', name: 'adventure-text-serializer-plain', version: '4.5.0'
implementation group: 'io.art-framework.core', name: 'api', version: '4.5.1'
testImplementation 'io.ebean:ebean-test:12.6.0'
testImplementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
testImplementation group: 'com.h2database', name: 'h2', version: '1.4.200'
testImplementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.7.0'
testImplementation group: 'mysql', name: 'mysql-connector-java', version: '8.0.22'
testImplementation group: 'org.xerial', name: 'sqlite-jdbc', version: '3.32.3.2'
testImplementation group: 'org.postgresql', name: 'postgresql', version: '42.2.18'
testImplementation 'org.junit.jupiter:junit-jupiter:5.+'
testImplementation "org.mockito:mockito-core:3.+"
testImplementation 'org.assertj:assertj-core:3.+'
testImplementation 'com.github.seeseemelk:MockBukkit-v1.16:0.20.0'
}
shadowJar {
classifier = ''
dependencies {
include(dependency('co.aikar:acf-paper:'))
include(dependency('net.silthus.configlib:configlib-bukkit:'))
include(dependency('net.kyori::'))
}
relocate 'co.aikar.commands', "shadow.${pluginName}.acf"
relocate 'co.aikar.locales', "shadow.${pluginName}.locales"
relocate 'de.exlll.configlib', "shadow.${pluginName}.configlib"
relocate 'net.kyori', "shadow.${pluginName}.text"
}
tasks.build.dependsOn(shadowJar)
tasks.publish.dependsOn(shadowJar)
tasks.prepareSpigotPlugins.dependsOn(shadowJar)
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
ignoreFailures = false
}
processResources {
project.properties.put("version", this.version)
expand project.properties
}
defaultTasks 'build'