-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
56 lines (48 loc) · 1.2 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
plugins {
java
id("xyz.jpenilla.run-paper") version "2.1.0" // test plugin from your IDE using project server
}
group = "io.papermc"
version = "1.0.0"
description = "Example plugin using PaperMC software"
base {
archivesName.set("example-plugin-paper-only")
}
repositories {
mavenCentral()
maven("https://papermc.io/repo/repository/maven-public/")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.20-R0.1-SNAPSHOT")
implementation("org.bstats:bstats-bukkit:3.0.1") // bStats - as you like it
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
// withSourcesJar()
}
tasks {
assemble {
dependsOn(clean)
}
compileJava {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filteringCharset = Charsets.UTF_8.name()
// Token replacing
val props = mapOf(
"version" to version,
"desc" to project.description,
"apiVersion" to "1.20"
)
inputs.properties(props)
filesMatching("plugin.yml") {
expand(props)
}
}
jar {
from("LICENSE") {
rename { "LICENSE_${rootProject.name}" }
}
}
}