-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
69 lines (58 loc) · 1.62 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
plugins {
`java-library`
id("java")
id("maven-publish")
id("io.papermc.paperweight.userdev") version "1.7.3"
id("com.gradleup.shadow") version "8.3.1"
}
group = "ru.violence"
version = "1.0.4"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
maven("https://repo.papermc.io/repository/maven-public/") // Paper
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/") // PlaceholderAPI
}
dependencies {
paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT")
compileOnly("me.clip:placeholderapi:2.11.6")
implementation("org.graalvm.polyglot:polyglot:24.1.1")
implementation("org.graalvm.polyglot:js-community:24.1.1")
implementation("dev.jorel:commandapi-bukkit-shade:9.5.3")
compileOnly("org.jetbrains:annotations:24.1.0")
}
tasks {
assemble {
dependsOn(reobfJar)
}
compileJava {
options.encoding = Charsets.UTF_8.name()
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filteringCharset = Charsets.UTF_8.name()
val props = mapOf(
"version" to project.version,
"apiVersion" to "1.21"
)
inputs.properties(props)
filesMatching("plugin.yml") {
expand(props)
}
}
shadowJar {
relocate("dev.jorel.commandapi", "ru.violence.graaljs.shaded.dev.jorel.commandapi")
}
build {
dependsOn(shadowJar)
}
reobfJar {
outputJar.set(layout.buildDirectory.file("libs/GraalJS.jar"))
}
}