This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbuild.gradle
274 lines (219 loc) · 8.69 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
plugins {
id "java"
id "idea"
id "org.jetbrains.kotlin.jvm" version "1.5.0"
id "com.github.johnrengelman.shadow" version "6.0.0"
}
apply plugin: "java"
allprojects {
apply plugin: "java"
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "org.jetbrains.kotlin.jvm"
apply plugin: 'idea'
targetCompatibility = 1.8
sourceCompatibility = 1.8
group "net.starlegacy"
version "SNAPSHOT"
repositories {
// used for github projects without their own repo, com.github.User:Project:Tag
maven {
url "https://jitpack.io"
content {
includeGroupByRegex "com\\.github.*"
}
}
// Official PaperMC repository for API
maven {
url "https://papermc.io/repo/repository/maven-public/"
content {
includeGroupByRegex "org\\.spigotmc.*"
includeGroupByRegex "com\\.destroystokyo.*"
}
}
// used for WorldEdit and WorldGuard
maven {
url "https://maven.sk89q.com/repo/"
content {
includeGroupByRegex "com\\.sk89q.*"
includeGroup "com.sk89q.worldguard"
}
}
// used for EventChain
maven {
url "https://www.myget.org/F/egg82-java/maven/"
content {
includeGroup "ninja.egg82"
}
}
// aikar's repository which mirrors lots of Minecraft things plus hosts his own projects
maven {
url "https://repo.aikar.co/content/groups/aikar/"
content {
includeGroup "co.aikar"
}
}
// used for discordsrv
maven {
url "https://nexus.scarsz.me/content/groups/public/"
content {
includeGroup "com.discordsrv"
includeGroup "github.scarsz"
includeGroup "dev.vankka"
}
}
// used for dependency of discordsrv (MCDiscordReserializer)
maven {
url 'https://nexus.vankka.dev/repository/maven-public/'
content {
includeGroup "dev.vankka"
}
}
// used for dependency of discordsrv (UltimateChat)
maven {
url 'https://raw.githubusercontent.com/FabioZumbi12/UltimateChat/mvn-repo/'
content {
includeGroup "br.net.fabiozumbi12.UltimateChat"
}
}
// screaming bedwars repo
maven {
url 'https://repo.screamingsandals.org/repository/maven-public/'
content {
includeGroup "org.screamingsandals.bedwars"
}
}
// anvilgui repo
maven {
url 'https://repo.codemc.io/repository/maven-snapshots/'
content {
includeGroup "net.wesjd"
}
}
// Citizens NPCs plugin repo
maven {
url "https://repo.citizensnpcs.co/"
content {
includeGroup "net.citizensnpcs"
}
}
maven {
url "https://repo.codemc.io/repository/maven-snapshots/"
content {
includeGroup "net.wesjd"
}
}
// private repository to host server binaries
maven { url "https://maven.starlegacy.net/" }
// general maven central repository
mavenCentral()
jcenter()
// aikar's repository which mirrors lots of Minecraft things plus hosts his own projects
// put twice: once before to quickly pick up his own plugins, once here as a last resort for other stuff
maven {
url "https://repo.aikar.co/content/groups/aikar/"
}
}
dependencies {
if (project.name != "starlegacy-libs") {
compileOnly project(':starlegacy-libs')
if (project.name != rootProject.name) {
compileOnly rootProject
}
}
// https://papermc.io (full server hosted at https://maven.starlegacy.net/)
compileOnly "com.destroystokyo.paper:paper-api:1.16.4-R0.1-SNAPSHOT"
compileOnly "com.destroystokyo.paper:paper:1.16.4-R0.1-SNAPSHOT"
compileOnly('net.luckperms:api:5.0') { exclude group: "org.bukkit", module: "bukkit" }
// https://github.com/MilkBowl/Vault
compileOnly("com.github.MilkBowl:VaultAPI:1.7") { exclude group: "org.bukkit", module: "bukkit" }
// https://github.com/bloodmc/GriefDefender/
compileOnly("com.github.bloodmc:GriefDefenderAPI:master") { exclude group: "org.bukkit", module: "bukkit" }
compileOnly("com.discordsrv:discordsrv:1.20.0") { exclude group: "org.bukkit", module: "bukkit" }
// https://github.com/webbukkit/dynmap
compileOnly("com.github.webbukkit.dynmap:spigot:3.1-beta-4") { exclude group: "org.bukkit", module: "bukkit" }
// https://github.com/EngineHub/WorldEdit
compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.2.0-SNAPSHOT") {
exclude group: "org.bukkit", module: "bukkit"
}
// https://github.com/EngineHub/WorldGuard
compileOnly("com.sk89q.worldguard:worldguard-core:7.0.0-SNAPSHOT") {
exclude group: "org.bukkit", module: "bukkit"
}
// https://github.com/CitizensDev/Citizens2/
compileOnly "net.citizensnpcs:citizens:2.0.27-SNAPSHOT"
// https://github.com/ScreamingSandals/BedWars
compileOnly "org.screamingsandals.bedwars:BedWars-API:0.3.0-SNAPSHOT"
// https://kotlinlang.org/
compileClasspath "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
// https://github.com/davethomas11/MoshiPack
compileClasspath "com.daveanthonythomas.moshipack:moshipack:1.0.0-beta"
// https://github.com/Litote/kmongo
compileClasspath "org.litote.kmongo:kmongo:4.2.3"
// https://github.com/xetorthio/jedis
compileClasspath "redis.clients:jedis:2.9.0"
// https://github.com/config4k/config4k
compileClasspath 'io.github.config4k:config4k:0.4.1'
// https://github.com/npgall/cqengine
compileClasspath "com.googlecode.cqengine:cqengine:3.0.0"
// https://github.com/jkcclemens/khttp
compileClasspath "khttp:khttp:0.1.0"
compileClasspath("net.wesjd:anvilgui:1.5.0-SNAPSHOT") { exclude group: "org.bukkit", module: "bukkit" }
// https://github.com/stefvanschie/IF
compileClasspath("com.github.stefvanschie.inventoryframework:IF:0.5.8") { exclude group: "org.bukkit", module: "bukkit" }
// https://github.com/aikar/commands
compileClasspath("co.aikar:acf-paper:0.5.0-SNAPSHOT") { exclude group: "org.bukkit", module: "bukkit" }
// https://github.com/egg82/EventChain
compileClasspath("ninja.egg82:event-chain-bukkit:1.0.7") { exclude group: "org.bukkit", module: "bukkit" }
compileClasspath group: 'org.ejml', name: 'ejml-all', version: '0.40'
// https://github.com/MinnDevelopment/discord-webhooks
compileClasspath("club.minnced:discord-webhooks:0.5.6")
compileClasspath 'org.jetbrains.kotlin:kotlin-reflect:1.5.0'
compileClasspath 'org.jetbrains.kotlin:kotlin-stdlib:1.5.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
testImplementation "io.mockk:mockk:1.10.0"
testImplementation 'com.github.seeseemelk:MockBukkit-v1.16:1.0.0'
}
test {
useJUnitPlatform()
}
compileJava {
options.compilerArgs += '-parameters'
}
compileKotlin {
kotlinOptions.javaParameters = true
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.noReflect = false
kotlinOptions.noStdlib = false
}
// mixed things dont work well otherwise
sourceSets {
main.kotlin.srcDirs += 'src/main/java'
main.java.srcDirs += 'src/main/kotlin'
configurations.testImplementation.extendsFrom configurations.compileOnly
}
jar {
archiveFileName = project.name + ".jar"
destinationDir file(rootProject.projectDir.absolutePath + "/build/raw-libs")
}
shadowJar {
destinationDir file(rootProject.projectDir.absolutePath + "/build/libs")
baseName project.name
classifier null
version null
configurations = []
relocate 'com.fasterxml.jackson', 'net.starlegacy.libs.jackson'
relocate 'co.aikar.commands', 'net.starlegacy.libs.acf'
relocate 'org.ejml', 'net.starlegacy.libs.ejml'
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
build.dependsOn shadowJar
}
test {
useJUnitPlatform()
}