-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathbuild.gradle
174 lines (155 loc) · 5.25 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
plugins {
id 'java-library'
id 'idea'
id 'maven-publish'
id("io.github.goooler.shadow") version "8.1.8"
id 'signing'
}
//Fixes issues related to special characters being used
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
//Fixes issues with utf-8 in the translations files.
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
group 'com.magmaguy'
version '9.2.3'
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://hub.spigotmc.org/nexus/content/repositories/snapshots" }
//MagmaCore
maven {
url = 'https://repo.magmaguy.com/releases'
}
//MagmaCore
maven {
url = 'https://repo.magmaguy.com/snapshots'
}
//Bstats API
maven { url = 'https://repo.codemc.org/repository/maven-public' }
//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()
}
}
}
dependencies {
//Spigot API
compileOnly "org.spigotmc:spigot-api:1.21.4-R0.1-SNAPSHOT"
//WorldGuard API
compileOnly group: 'com.sk89q.worldguard', name: 'worldguard-bukkit', version: '7.0.7'
//Vault
compileOnly("com.github.MilkBowl:VaultAPI:1.7") {
exclude group: 'org.bukkit', module: 'bukkit'
}
//DiscordSRV
compileOnly 'com.discordsrv:discordsrv:1.28.0'
//SQLite
compileOnly group: 'org.xerial', name: 'sqlite-jdbc', version: '3.32.3'
//MySQL
compileOnly 'mysql:mysql-connector-java:8.0.33'
//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'
//lombok
compileOnly 'org.projectlombok:lombok:1.18.34'
annotationProcessor 'org.projectlombok:lombok:1.18.34'
//Model Engine - legacy
compileOnly "com.ticxo.modelengine:api:R3.1.7"
//Free Minecraft Models
compileOnly group: 'com.magmaguy', name: 'FreeMinecraftModels', version: '1.4.2'
// Mythic Mobs integration - currently only for arenas
compileOnly group: 'io.lumine', name: 'Mythic-Dist', version: '5.3.5'
///Shaded in
implementation group: 'org.bstats', name: 'bstats-bukkit', version: '2.2.1'
implementation group: 'commons-io', name: 'commons-io', version: '2.7'
implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
implementation group: 'com.magmaguy', name: 'EasyMinecraftGoals-dist', version: '1.15.0'
implementation group: 'com.magmaguy', name: 'MagmaCore', version: '1.7'
}
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 bStats
relocate('org.bstats', packagePath + '.bstats')
// Relocate MagmaCore
relocate('com.magmaguy.magmacore', 'com.magmaguy.elitemobs.magmacore')
relocate('com.magmaguy.easyminecraftgoals', 'com.magmaguy.elitemobs.easyminecraftgoals')
}
archiveClassifier.set(null)
archiveFileName.set(project.name + ".jar")
destinationDirectory.set(new File("testbed/plugins"))
}
publishing {
repositories {
maven {
name = "EliteMobs"
url = "https://repo.magmaguy.com/releases"
credentials {
username = project.hasProperty('ossrhUsername') ? ossrhUsername : "Unknown user"
password = project.hasProperty('ossrhPassword') ? ossrhPassword : "Unknown password"
}
}
}
publications {
mavenJava(MavenPublication) {
pom {
groupId = 'com.magmaguy'
name = 'elitemobs'
description = 'EliteMobs repo'
url = 'https://magmaguy.com/'
from components.java
licenses {
license {
name = 'GPLV3'
url = 'https://www.gnu.org/licenses/gpl-3.0.en.html'
}
}
}
}
}
}