forked from MagmaGuy/BetterStructures
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
164 lines (141 loc) · 5.11 KB
/
build.gradle
File metadata and controls
164 lines (141 loc) · 5.11 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
159
160
161
162
163
164
plugins {
id 'java-library'
id 'idea'
id 'maven-publish'
id "com.github.johnrengelman.shadow" version "7.0.0"
}
group = 'com.magmaguy'
version = '1.5.1-SNAPSHOT'
repositories {
mavenCentral()
maven {
name = 'spigotmc-repo'
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
//Bstats API
maven { url = 'https://repo.codemc.org/repository/maven-public' }
//WorldEdit API
maven { url = 'https://maven.enginehub.org/repo/' }
//CloudCommands
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
//EliteMobs
maven { url = 'https://s01.oss.sonatype.org/content/repositories/snapshots' }
// carm start - Support MMOItems and MythicMobs
//MMOItems
maven { url = 'https://nexus.phoenixdevt.fr/repository/maven-public/' }
//MythicMobs
maven { url = 'https://mvn.lumine.io/repository/maven-public/' }
// carm end - Support MMOItems and MythicMobs
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT'
//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.7'
//WorldEdit API
compileOnly group: 'com.sk89q.worldedit', name: 'worldedit-bukkit', version: '7.2.13'
//lombok
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
//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'
//apache commons
implementation 'org.apache.commons:commons-lang3:3.9'
//reflections - used for config initialization
implementation group: 'org.reflections', name: 'reflections', version: '0.9.12'
//EliteMobs
compileOnly group: 'com.magmaguy', name: 'EliteMobs', version: '8.3.12-SNAPSHOT'
// carm start - Support MMOItems and MythicMobs
//MythicMobs
compileOnly group: 'io.lumine', name: 'Mythic-Dist', version: '5.2.1'
//MythicLib
compileOnly group: 'io.lumine', name: 'MythicLib-dist', version: '1.5.2-SNAPSHOT'
//MMOItems
compileOnly group: 'net.Indyuce', name: 'MMOItems-API', version: '6.9.2-SNAPSHOT'
// carm end - Support MMOItems and MythicMobs
}
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
}
//sonatype repo
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
publishing {
repositories {
maven {
def releaseRepo = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotRepo = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = isReleaseVersion ? releaseRepo : snapshotRepo
credentials {
username = project.hasProperty('ossrhUsername') ? ossrhUsername : "Unknown user"
password = project.hasProperty('ossrhPassword') ? ossrhPassword : "Unknown password"
}
}
}
publications {
mavenJava(MavenPublication) {
pom {
groupId = 'com.magmaguy'
name = 'betterstructures'
description = 'BetterStructures repo'
url = 'https://example.com/'
from components.java
licenses {
license {
name = 'GPLV3'
url = 'https://www.gnu.org/licenses/gpl-3.0.en.html'
}
}
}
}
}
}