forked from ItsLewizzz/DeluxeHub
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathbuild.gradle
More file actions
99 lines (86 loc) · 3.28 KB
/
build.gradle
File metadata and controls
99 lines (86 loc) · 3.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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'xyz.jpenilla.run-paper' version '2.3.1'
}
group = 'dev.strafbefehl'
version = '3.7.2'
description = 'An all-in-one hub management system'
repositories {
mavenCentral()
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url 'https://oss.sonatype.org/content/groups/public/' }
maven { url 'https://jitpack.io' }
maven { url 'https://repo.codemc.org/repository/maven-public' }
maven { url 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
maven { url 'https://libraries.minecraft.net/' }
maven { url 'https://repo.opencollab.dev/main/' }
maven { url 'https://repo.aikar.co/content/groups/aikar/' }
maven { url 'https://repo.papermc.io/repository/maven-public/' }
}
dependencies {
// Provided dependencies
compileOnly 'org.spigotmc:spigot-api:1.21.4-R0.1-SNAPSHOT'
compileOnly 'net.md-5:bungeecord-chat:1.16-R0.1'
compileOnly 'com.mojang:authlib:1.5.25'
compileOnly 'me.clip:placeholderapi:2.11.6'
compileOnly 'de.tr7zw:item-nbt-api:2.14.0'
compileOnly 'com.github.shynixn.headdatabase:hdb-api:1.0'
// Implementation dependencies (will be included in the jar)
implementation 'org.bstats:bstats-bukkit-lite:1.7'
implementation 'javax.inject:javax.inject:1'
implementation 'javax.annotation:javax.annotation-api:1.2'
implementation 'com.github.BGMP.CommandFramework:command-framework-bukkit:master'
implementation 'co.aikar:acf-paper:0.5.1-SNAPSHOT'
implementation 'net.kyori:adventure-api:4.21.0'
}
tasks {
runServer {
minecraftVersion("1.21")
}
shadowJar {
archiveClassifier.set('')
// Relocate libraries to avoid conflicts
relocate 'org.bstats', 'dev.strafbefehl.deluxehubreloaded.libs.metrics'
relocate 'cl.bgmp', 'dev.strafbefehl.deluxehubreloaded.libs.command'
relocate 'co.aikar', 'dev.strafbefehl.deluxehubreloaded.libs.aikar'
// Include only specified dependencies
dependencies {
include(dependency('org.bstats:bstats-bukkit-lite'))
include(dependency('com.github.BGMP.CommandFramework:command-framework-bukkit'))
include(dependency('javax.inject:javax.inject'))
include(dependency('co.aikar:acf-paper'))
}
}
build {
dependsOn shadowJar
}
}
def targetJavaVersion = 9
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release.set(targetJavaVersion)
}
}
processResources {
def props = [
'name': rootProject.name,
'version': project.version,
'description': project.description ?: 'An all-in-one hub management system',
'url': 'https://www.spigotmc.org/resources/118904/'
]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}