-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
73 lines (66 loc) · 1.96 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
plugins {
id("java")
id("io.github.goooler.shadow") version "8.1.7"
`maven-publish`
}
group = "net.mvndicraft.townywaypoints"
version = "1.5"
description = "Configurable plot types for Towny that players can teleport between."
repositories {
mavenCentral()
maven("https://jitpack.io")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.glaremasters.me/repository/towny/")
maven("https://repo.aikar.co/content/groups/aikar/")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
compileOnly("com.palmergames.bukkit.towny:towny:0.99.5.0")
compileOnly("io.github.townyadvanced.commentedconfiguration:CommentedConfiguration:1.0.0")
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
implementation("co.aikar:acf-paper:0.5.1-SNAPSHOT")
implementation("com.github.Anon8281:UniversalScheduler:0.1.6")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
tasks {
shadowJar {
val prefix = "${project.group}.lib"
sequenceOf(
"co.aikar",
"com.github.Anon8281.universalScheduler",
).forEach { pkg ->
relocate(pkg, "$prefix.$pkg")
}
archiveFileName.set("${project.name}-${project.version}.jar")
}
build {
dependsOn(shadowJar)
}
compileJava {
options.encoding = Charsets.UTF_8.name()
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filteringCharset = Charsets.UTF_8.name()
val props = mapOf(
"name" to project.name,
"version" to project.version,
"description" to project.description,
"apiVersion" to "1.20",
"group" to project.group
)
inputs.properties(props)
filesMatching("paper-plugin.yml") {
expand(props)
}
}
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}