-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
62 lines (54 loc) · 1.68 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
import io.papermc.paperweight.userdev.ReobfArtifactConfiguration
plugins {
id("java")
id("maven-publish")
id("io.papermc.paperweight.userdev") version "2.0.0-beta.14" // the latest version can be found on the Gradle Plugin Portal
}
// The Minecraft version we're currently building for
val minecraftVersion = "1.21.4"
// Version of CoreApi
val projectVersion = "1.1.0"
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
withSourcesJar()
}
paperweight.reobfArtifactConfiguration = ReobfArtifactConfiguration.MOJANG_PRODUCTION
repositories {
mavenCentral()
}
dependencies {
// Paper
paperweight.paperDevBundle("${minecraftVersion}-R0.1-SNAPSHOT")
}
tasks {
processResources {
expand("version" to projectVersion)
}
compileJava {
options.release = 21
}
javadoc {
options.encoding = Charsets.UTF_8.name()
options.overview("src/main/javadoc/overview.html")
(options as StandardJavadocDocletOptions).links(
"https://jd.papermc.io/paper/$minecraftVersion/",
"https://jd.advntr.dev/api/4.19.0/",
"https://jd.advntr.dev/text-minimessage/4.19.0/",
"https://commons.apache.org/proper/commons-lang/apidocs/"
)
(options as StandardJavadocDocletOptions).docTitle("CoreAPI - $projectVersion")
}
jar {
archiveFileName.set("CoreAPI-$projectVersion-$minecraftVersion.jar")
}
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = "com.github.shanebeestudios"
artifactId = project.name.lowercase()
version = projectVersion
from(components["java"])
}
}
}