-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
99 lines (84 loc) · 2.76 KB
/
build.gradle.kts
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.gradleup.shadow") version "8.3.0"
id("maven-publish")
id("java-library")
}
group = "me.levitate"
version = "2.6.0"
repositories {
mavenCentral()
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.codemc.io/repository/maven-public/")
maven("https://repo.aikar.co/content/groups/aikar/")
maven("https://jitpack.io")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
compileOnly("me.clip:placeholderapi:2.11.6")
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
compileOnly("org.projectlombok:lombok:1.18.32")
annotationProcessor("org.projectlombok:lombok:1.18.32")
implementation("com.fasterxml.jackson.core:jackson-core:2.16.1")
implementation("com.fasterxml.jackson.core:jackson-databind:2.16.1")
implementation("com.fasterxml.jackson.core:jackson-annotations:2.16.1")
implementation("dev.triumphteam:triumph-gui:3.1.10")
implementation("co.aikar:acf-paper:0.5.1-SNAPSHOT")
implementation("de.exlll:configlib-paper:4.5.0")
}
// Configure Java version compatibility
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
withJavadocJar()
withSourcesJar()
}
tasks {
compileJava {
options.encoding = "UTF-8"
options.release.set(17)
}
shadowJar {
// Relocate dependencies to avoid conflicts
relocate("de.exlll.configlib", "me.levitate.config")
relocate("co.aikar.commands", "me.levitate.acf")
relocate("co.aikar.locales", "me.levitate.locales")
relocate("dev.triumphteam.gui", "me.levitate.gui")
relocate("com.fasterxml.jackson", "me.levitate.jackson")
archiveClassifier.set("")
minimize()
}
javadoc {
options {
(this as StandardJavadocDocletOptions).apply {
addStringOption("Xdoclint:none", "-quiet")
addStringOption("encoding", "UTF-8")
addStringOption("charSet", "UTF-8")
addBooleanOption("html5", true)
links("https://docs.oracle.com/en/java/javase/17/docs/api/")
links("https://jd.papermc.io/paper/1.20/")
}
}
}
build {
dependsOn(shadowJar)
}
// Disable default jar task
jar {
enabled = false
}
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = project.group.toString()
artifactId = project.name
version = project.version.toString()
artifact(tasks["shadowJar"])
artifact(tasks["javadocJar"])
artifact(tasks["sourcesJar"])
}
}
}