forked from MagmaGuy/EliteMobs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
158 lines (130 loc) · 5.28 KB
/
Copy pathbuild.gradle
File metadata and controls
158 lines (130 loc) · 5.28 KB
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
plugins {
id 'java-library'
id 'idea'
id 'maven-publish'
id "com.github.johnrengelman.shadow" version "7.0.0"
}
//Fixes issues related to special characters being used
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
group 'com.magmaguy'
version '7.3.17-SNAPSHOT-8'
repositories {
maven {
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
// As of Gradle 5.1, you can limit this to only those
// dependencies you expect from it
content {
includeGroup 'org.bukkit'
includeGroup 'org.spigotmc'
}
}
mavenCentral()
jcenter()
mavenLocal()
//Spigot API & CloudCommands
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
maven { url = 'https://oss.sonatype.org/content/repositories/central' }
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots" }
//Bstats API
maven { url = 'https://repo.codemc.org/repository/maven-public' }
//CloudCommands
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
//Vault
maven { url = 'https://jitpack.io' }
//DiscordSRV
maven { url = 'https://m2.dv8tion.net/releases/' }
maven { url = 'https://nexus.scarsz.me/content/groups/public/' }
//LibsDisguises
maven { url = 'https://repo.md-5.net/content/groups/public/' }
//PlaceholderAPI
maven { url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
//WorldGuard API
maven { url = 'https://maven.enginehub.org/repo/' }
//Model Engine
maven {
url = 'https://mvn.lumine.io/repository/maven-public/'
metadataSources {
artifact()
}
}
//Geyser
maven { url = 'https://repo.opencollab.dev/main/' }
}
dependencies {
//Spigot API
compileOnly "org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT"
//compileOnly 'org.spigotmc:spigot:1.17-R0.1-SNAPSHOT'
// The full CraftBukkit server with no shadowing. Requires mavenLocal.
//BStats API
implementation group: 'org.bstats', name: 'bstats-bukkit', version: '2.2.1'
//WorldGuard API
compileOnly group: 'com.sk89q.worldguard', name: 'worldguard-bukkit', version: '7.0.0'
//CloudCommands
implementation group: 'cloud.commandframework', name: 'cloud-paper', version: '1.5.0'
//CloudCommands Minecraft Extras module
implementation group: 'cloud.commandframework', name: 'cloud-minecraft-extras', version: '1.5.0'
//CloudCommands Adventure Platform module
implementation("net.kyori:adventure-platform-bukkit:4.0.0")
//I can't remember what this was for but it's in CloudCommands
implementation group: 'io.leangen.geantyref', name: 'geantyref', version: '1.3.4'
//Vault
//compileOnly group: 'com.github.MilkBowl', name: 'VaultAPI', version: '1.7'
compileOnly("com.github.MilkBowl:VaultAPI:1.7") {
exclude group: 'org.bukkit', module: 'bukkit'
}
//DiscordSRV
//compileOnly 'net.dv8tion:JDA:4.2.1_262'
compileOnly 'com.discordsrv:discordsrv:1.24.0'
//SQLite
compileOnly group: 'org.xerial', name: 'sqlite-jdbc', version: '3.32.3'
//LibsDisguises
compileOnly group: 'com.comphenix.protocol', name: 'ProtocolLib', version: '4.7.0';
compileOnly group: 'LibsDisguises', name: 'LibsDisguises', version: '10.0.26'
//PlaceholderAPI
compileOnly group: 'me.clip', name: 'placeholderapi', version: '2.10.9'
implementation group: 'commons-io', name: 'commons-io', version: '2.6'
//reflections - used for config initialization
implementation group: 'org.reflections', name: 'reflections', version: '0.9.12'
//lombok
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
//Model Engine
compileOnly "com.ticxo.modelengine:api:R2.5.0"
testCompileOnly 'org.projectlombok:lombok:1.18.20'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.20'
//Geyser for bedrock player detection
//This needs java 16 to work so you will want to change gradle.properties to match your directory for it
//compileOnly("org.geysermc:geyser-api:2.0.2-SNAPSHOT") disabled because I couldn't find an easy way to see if a player is using geyser through their api due to the bungeecord / waterfall specific implementations
}
artifacts { // task 'build' runs generates uberjar
archives shadowJar
}
jar {
archiveClassifier.set('min') // we want the Uberjar to be distributed, this is the minified version
}
String packagePath = 'com.magmaguy.shaded'
// Relocating a Package
shadowJar {
dependencies {
relocate('org.bstats', packagePath + '.bstats')
relocate('cloud.commandframework', packagePath + '.cloud')
relocate('net.kyori', packagePath + '.adventure-platform-bukkit')
relocate('io.leangen.geantyref', packagePath + '.geantyref')
relocate('org.reflections', packagePath + '.reflections')
}
archiveClassifier.set(null)
archiveFileName.set(project.name + ".jar")
destinationDirectory.set(new File("testbed/plugins"))
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
ext {
resourceTokens = [
'Version': version
]
}
processResources {
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: resourceTokens
}