-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
68 lines (55 loc) · 1.83 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
plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "8.1.1"
}
group = "com.iridium"
version = "1.0.2"
description = "MockNBTApi"
repositories {
mavenCentral()
maven("https://repo.codemc.org/repository/maven-public/")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}
dependencies {
// Dependencies that we want to shade in
implementation("org.jetbrains:annotations:24.1.0")
implementation("de.tr7zw:item-nbt-api:2.12.4")
// Other dependencies that are not required or already available at runtime
compileOnly("org.projectlombok:lombok:1.18.32")
compileOnly("org.spigotmc:spigot-api:1.20.6-R0.1-SNAPSHOT")
// Enable lombok annotation processing
annotationProcessor("org.projectlombok:lombok:1.18.32")
// Test dependencies
testImplementation(platform("org.junit:junit-bom:5.10.2"))
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
testImplementation("com.github.seeseemelk:MockBukkit-v1.18:2.85.2")
}
tasks {
// "Replace" the build task with the shadowJar task (probably bad but who cares)
jar {
dependsOn("shadowJar")
enabled = false
}
shadowJar {
// Remove the archive classifier suffix
archiveClassifier.set("")
relocate("de.tr7zw.changeme.nbtapi", "com.iridium.mocknbtapi.dependencies.nbtapi")
minimize()
}
// Set UTF-8 as the encoding
compileJava {
options.encoding = "UTF-8"
}
test {
useJUnitPlatform()
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}
compileTestJava {
sourceCompatibility = JavaVersion.VERSION_17.toString()
targetCompatibility = JavaVersion.VERSION_17.toString()
}
}