-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
75 lines (60 loc) · 1.76 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
plugins {
`java-library`
id("io.github.goooler.shadow") version "8.1.8"
}
project.extra["paperVersion"] = "1.21"
project.extra["foliaVersion"] = "1.20.6"
project.extra["apiVersion"] = "1.20"
val fullVersion = "${version}-mc${project.extra["paperVersion"]}"
allprojects {
apply(plugin = "java-library")
val javaVersion = JavaVersion.VERSION_21
val charset = Charsets.UTF_8
java {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
toolchain {
languageVersion.set(JavaLanguageVersion.of(javaVersion.ordinal + 1))
}
}
tasks {
compileJava {
options.encoding = charset.name()
options.release.set(javaVersion.ordinal + 1)
}
processResources {
filteringCharset = charset.name()
}
}
dependencies {
implementation(files(rootDir.resolve("libs/Scoreboard-5.0-SNAPSHOT.jar")))
}
}
repositories {
maven {
url = uri("https://repo.papermc.io/repository/maven-public/")
}
}
dependencies {
compileOnly("io.papermc.paper:paper-api:${project.extra["paperVersion"]}-R0.1-SNAPSHOT")
implementation(projects.scoreboardFoliaPacketDisplay)
implementation(projects.scoreboardFoliaPlaceholders)
}
tasks {
build {
dependsOn(shadowJar)
}
processResources {
filesMatching(listOf("paper-plugin.yml")) {
expand("projectVersion" to fullVersion, "apiVersion" to project.extra["apiVersion"])
}
}
shadowJar {
minimize()
relocate("com.github.siroshun09", "${project.group}.libs")
archiveFileName = "Scoreboard-${fullVersion}.jar"
manifest {
attributes("paperweight-mappings-namespace" to "mojang")
}
}
}