-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
104 lines (86 loc) · 2.86 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
100
101
102
103
104
plugins {
java
`java-library`
`maven-publish`
id("io.papermc.paperweight.userdev") version "1.5.5"
id("xyz.jpenilla.run-paper") version "2.0.1"
id("com.github.johnrengelman.shadow") version "7.1.2"
}
group = "com.antonio32a"
version = "1.0.0"
description = "Ant Core"
java {
// Configure the java toolchain. This allows gradle to auto-provision JDK 17 on systems that only have JDK 8 installed for example.
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
withSourcesJar()
}
repositories {
mavenCentral()
mavenLocal()
maven("https://repo.xenondevs.xyz/releases")
}
dependencies {
// Ant
implementation("com.antonio32a:ant-private-api-data:1.0.0")
// Paper
paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT")
// CommandFramework
implementation("cloud.commandframework:cloud-core:1.8.3")
implementation("cloud.commandframework:cloud-annotations:1.8.3")
implementation("cloud.commandframework:cloud-paper:1.8.3")
implementation("cloud.commandframework:cloud-minecraft-extras:1.8.3")
implementation("org.inventivetalent:reflectionhelper:1.18.13-SNAPSHOT")
// InvUI
implementation("xyz.xenondevs.invui:invui:1.5")
// Lombok and misc utils
compileOnly("org.projectlombok:lombok:1.18.26")
annotationProcessor("org.projectlombok:lombok:1.18.26")
implementation("com.squareup.okhttp3:okhttp:4.10.0")
// Tests
testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1")
}
tasks {
test {
useJUnitPlatform()
}
// Configure reobfJar to run when invoking the build task
assemble {
dependsOn(reobfJar)
}
reobfJar {
outputJar.set(layout.buildDirectory.file("libs/${project.name}.jar"))
}
compileJava {
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
// Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
// See https://openjdk.java.net/jeps/247 for more information.
options.release.set(17)
}
javadoc {
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
}
processResources {
filteringCharset = Charsets.UTF_8.name() // We want UTF-8 for everything
val props = mapOf(
"name" to project.name,
"version" to project.version,
"description" to project.description,
"apiVersion" to "1.19"
)
inputs.properties(props)
filesMatching("plugin.yml") {
expand(props)
}
}
}
publishing {
publications {
create<MavenPublication>("maven") {
artifact(tasks["shadowJar"]) {
classifier = ""
}
artifact(tasks["sourcesJar"])
}
}
}