-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
88 lines (76 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
80
81
82
83
84
85
86
87
88
import org.spongepowered.gradle.plugin.config.PluginLoaders
import org.spongepowered.plugin.metadata.model.PluginDependency
plugins {
`java-library`
id("org.spongepowered.gradle.plugin") version "2.2.0"
id("org.cadixdev.licenser") version "0.6.1"
}
group = project.group
version = "${project.properties["minecraftVersion"]}-r${project.properties["apiVersion"].toString().split("-")[0]}"
repositories {
maven("https://repo.spongepowered.org/repository/maven-public/") {
name = "sponge"
}
}
dependencies {
spongeRuntime("org.spongepowered:spongevanilla:1.21.1-12.0.0-RC1803:universal")
}
sponge {
apiVersion("${project.properties["apiVersion"]}")
license("MIT")
loader {
name(PluginLoaders.JAVA_PLAIN)
version("1.0")
}
plugin("royale") {
displayName("${project.properties["name"]}")
entrypoint("org.spongepowered.royale.Royale")
description("Battle Royale, now on Sponge!")
links {
homepage("https://spongepowered.org")
source("https://github.com/SpongePowered/Royale")
issues("https://github.com/SpongePowered/Royale/issues")
}
contributor("Spongie") {
description("Lead Developer")
}
dependency("spongeapi") {
loadOrder(PluginDependency.LoadOrder.AFTER)
optional(false)
}
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
tasks.withType(JavaCompile::class).configureEach {
options.encoding = "utf-8"
}
tasks {
jar {
manifest {
attributes(
"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
"Implementation-Vendor" to project.properties["organization"]
)
}
}
}
license {
properties {
this["name"] = project.properties["name"]
this["organization"] = project.properties["organization"]
this["url"] = project.properties["url"]
}
header(project.file("HEADER.txt"))
include("**/*.java")
newLine(false)
}
// Make sure all tasks which produce archives (jar, sources jar, javadoc jar, etc) produce more consistent output
tasks.withType(AbstractArchiveTask::class).configureEach {
isReproducibleFileOrder = true
isPreserveFileTimestamps = false
}