-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
79 lines (67 loc) · 2.51 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
plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "6.1.0"
}
group = "com.iridium"
version = "1.0.0"
description = "IridiumPunishments"
java.sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
maven("https://repo.mvdw-software.com/content/groups/public/")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://ci.ender.zone/plugin/repository/everything/")
maven("https://jitpack.io")
maven("https://nexus.savagelabs.net/repository/maven-releases/")
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://repo.rosewooddev.io/repository/public/")
maven("https://repo.jeff-media.de/maven2/")
}
dependencies {
// Dependencies that we want to shade in
implementation("org.jetbrains", "annotations", "16.0.1")
implementation("com.iridium", "IridiumCore", "1.0.9")
implementation("org.bstats", "bstats-bukkit", "2.2.1")
implementation("com.github.j256", "ormlite-core", "master-SNAPSHOT")
implementation("com.j256.ormlite", "ormlite-jdbc", "5.3")
implementation("de.jeff_media", "SpigotUpdateChecker", "1.2.4")
// Other dependencies that are not required or already available at runtime
compileOnly("org.projectlombok", "lombok", "1.18.20")
compileOnly("org.spigotmc", "spigot-api", "1.16.5-R0.1-SNAPSHOT")
// Enable lombok annotation processing
annotationProcessor("org.projectlombok", "lombok", "1.18.20")
}
tasks {
// "Replace" the build task with the shadowJar task (probably bad but who cares)
jar {
dependsOn("shadowJar")
enabled = false
}
// Relocate dependencies, remove the archive classifier suffix
shadowJar {
archiveClassifier.set("")
relocate("com.j256.ormlite", "com.iridium.iridiumskyblock.dependencies.ormlite")
relocate("org.bstats", "com.iridium.iridiumskyblock.dependencies.bstats")
// Remove unnecessary files from the jar
minimize()
}
// Set UTF-8 as the encoding
compileJava {
options.encoding = "UTF-8"
}
// Process Placeholders for the plugin.yml
processResources {
filesMatching("**/plugin.yml") {
expand(rootProject.project.properties)
}
// Always re-run this task
outputs.upToDateWhen { false }
}
}
// Maven publishing
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}