-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
79 lines (72 loc) · 2.33 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 {
id("java")
id("io.github.goooler.shadow") version "8.1.7"
`maven-publish` // Add ./gradlew publishToMavenLocal
id("xyz.jpenilla.run-paper") version "2.3.1"
id("org.sonarqube") version "5.0.0.4638"
}
group="fr.formiko.flagsh"
version="4.4.1"
description="Display banners as flags."
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://jitpack.io")
maven("https://repo.aikar.co/content/groups/aikar/")
maven("https://repo.glaremasters.me/repository/towny/")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
compileOnly("com.palmergames.bukkit.towny:towny:0.101.0.0")
implementation("org.bstats:bstats-bukkit:3.1.0")
implementation("co.aikar:acf-paper:0.5.1-SNAPSHOT")
implementation("com.fasterxml.jackson.core:jackson-core:2.18.2")
implementation("com.fasterxml.jackson.core:jackson-databind:2.18.2")
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
tasks {
shadowJar {
val prefix = "${project.group}.lib"
sequenceOf(
"co.aikar",
"org.bstats",
"com.fasterxml.jackson"
).forEach { pkg ->
relocate(pkg, "$prefix.$pkg")
}
archiveFileName.set("${project.name}-${project.version}.jar")
}
assemble {
dependsOn(shadowJar)
}
processResources {
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("plugin.yml") {
expand(props)
}
}
runServer {
downloadPlugins {
github("TownyAdvanced", "Towny", "0.101.0.2", "towny-0.101.0.2.jar") // we can't use the latest release because it's inside a zip.
}
// Configure the Minecraft version for our task.
// This is the only required configuration besides applying the plugin.
// Your plugin's jar (or shadowJar if present) will be used automatically.
minecraftVersion("1.21.4")
}
// runPaper.folia.registerTask()
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}