-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathbuild.gradle
More file actions
120 lines (105 loc) · 3.75 KB
/
build.gradle
File metadata and controls
120 lines (105 loc) · 3.75 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
plugins {
id 'java-library'
id 'idea'
id 'maven-publish'
id "com.gradleup.shadow" version "9.0.0-beta12"
}
group = 'com.magmaguy'
version = '2.3.0'
repositories {
mavenCentral()
mavenLocal()
maven {
name = 'spigotmc-repo'
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven { url = 'https://repo.magmaguy.com/releases' }
maven { url = "https://repo.magmaguy.com/snapshots" }
maven { url = 'https://repo.codemc.org/repository/maven-public' }
maven { url = 'https://maven.enginehub.org/repo/' }
maven { url = 'https://nexus.phoenixdevt.fr/repository/maven-public/' }
maven { url = 'https://mvn.lumine.io/repository/maven-public/' }
}
dependencies {
annotationProcessor 'org.projectlombok:lombok:1.18.30'
compileOnly 'org.projectlombok:lombok:1.18.30'
implementation (group: 'com.magmaguy', name: 'MagmaCore', version: '2.0.0-SNAPSHOT'){
changing = true
}
implementation group: 'org.bstats', name: 'bstats-bukkit', version: '2.2.1'
implementation group: 'org.joml', name: 'joml', version: '1.10.8'
compileOnly group: 'com.magmaguy', name: 'EliteMobs', version: '9.3.3-SNAPSHOT'
compileOnly group: 'io.lumine', name: 'Mythic-Dist', version: '5.2.1'
compileOnly group: 'io.lumine', name: 'MythicLib-dist', version: '1.5.2-SNAPSHOT'
compileOnly group: 'net.Indyuce', name: 'MMOItems-API', version: '6.9.2-SNAPSHOT'
compileOnly group: 'com.sk89q.worldguard', name: 'worldguard-bukkit', version: '7.0.7'
compileOnly group: 'com.sk89q.worldedit', name: 'worldedit-bukkit', version: '7.3.0'
compileOnly 'org.spigotmc:spigot-api:1.21.3-R0.1-SNAPSHOT'
}
//This allows any modules tagged as changing to be updated every time, which is extremely convenient for some of the shaded libs
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
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 'com.magmaguy.easyminecraftgoals', 'com.magmaguy.betterstructures.easyminecraftgoals'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
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
]
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21) // or your target version
}
}
processResources {
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: resourceTokens
}
publishing {
repositories {
maven {
name = "BetterStructures"
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 = 'betterstructures'
description = 'BetterStructures repo'
url = 'https://magmaguy.com/'
from components.java
licenses {
license {
name = 'GPLV3'
url = 'https://www.gnu.org/licenses/gpl-3.0.en.html'
}
}
}
}
}
}