-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
92 lines (75 loc) · 3.23 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
repositories {
mavenLocal()
// Public Servers
maven {
url = uri("https://repo.essentialsx.net/releases/")
}
maven {
url = uri("https://jitpack.io")
}
}
dependencies {
compileOnly("org.spigotmc:spigot:1.8.8-R0.1")
implementation("net.kyori:adventure-api:4.12.0")
implementation("net.kyori:adventure-platform-bukkit:4.1.2")
implementation("net.kyori:adventure-text-minimessage:4.12.0")
implementation("net.kyori:adventure-text-serializer-legacy:4.12.0")
implementation("com.rabbitmq:amqp-client:5.16.0")
implementation("io.lettuce:lettuce-core:6.2.1.RELEASE")
// Third Party libraries with public API
compileOnly("net.essentialsx:EssentialsX:2.19.7")
compileOnly("com.github.mbax:VanishNoPacket:3.22")
compileOnly("com.github.xtomyserrax:StaffFacilities:5.0.8")
compileOnly("com.github.LeonMangler:PremiumVanishAPI:2.7.11-2")
// Third Party libraries without public API (only for compilation, allocated at our private repository for development purposes)
compileOnly("github.jet315:antiafkpro:3.6.3")
// Configurate - Sponge
implementation("org.spongepowered:configurate-yaml:4.1.2")
implementation("org.spongepowered:configurate-hocon:4.1.2")
implementation(project(":EnhancedGlist-Updater"))
implementation(project(":EnhancedGlist-Messenger"))
}
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
destinationDirectory.set(file("$rootDir/compiled"))
if(archiveClassifier.get() == "all") {
archiveClassifier.set("")
}
// Relocations for Configurate - Sponge
relocate("org.spongepowered.configurate", "dev.wirlie.shaded.org.spongepowered.configurate")
relocate("org.yaml.snakeyaml", "dev.wirlie.shaded.org.yaml.snakeyaml")
relocate("io.leangen.geantyref", "dev.wirlie.shaded.io.leangen.geantyref")
relocate("kotlin", "dev.wirlie.shaded.kotlin")
relocate("com.github.benmanes.caffeine", "dev.wirlie.shaded.com.github.benmanes.caffeine")
relocate("net.kyori", "dev.wirlie.shaded.net.kyori")
relocate("com.rabbitmq", "dev.wirlie.shaded.com.rabbitmq")
relocate("io.netty", "dev.wirlie.shaded.io.netty")
relocate("io.lettuce", "dev.wirlie.shaded.io.lettuce")
relocate("okhttp3", "dev.wirlie.shaded.okhttp3")
}
tasks.withType<ProcessResources> {
val props = mutableMapOf(
Pair("build_version", version),
Pair("version", version),
Pair("build_job_name", System.getenv("JOB_NAME") ?: "unknown"),
Pair("build_id", System.getenv("BUILD_ID") ?: "unknown"),
Pair("target_release", System.getenv("BUILD_TARGET_RELEASE") ?: "unknown"),
Pair("build_full_hash", System.getenv("GIT_COMMIT") ?: "unknown"),
Pair("build_branch", System.getenv("GIT_BRANCH") ?: "unknown"),
Pair("build_timestamp", System.currentTimeMillis()),
)
inputs.properties(props)
filteringCharset = "UTF-8"
filesMatching(listOf("config.conf", "plugin.yml")) {
expand(props)
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "1.8"
}
}