-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
90 lines (76 loc) · 2.4 KB
/
build.gradle.kts
File metadata and controls
90 lines (76 loc) · 2.4 KB
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
89
90
import org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier
import xyz.jpenilla.runtask.task.AbstractRun
plugins {
id("java")
id("idea")
kotlin("jvm") version "2.3.21"
id("com.gradleup.shadow") version "9.4.1"
id("xyz.jpenilla.run-paper") version "3.0.2"
id("xyz.jpenilla.resource-factory-paper-convention") version "1.3.1"
id("org.jetbrains.dokka") version "2.2.0"
id("org.jlleitschuh.gradle.ktlint") version "12.3.0"
}
val mcVersion = "1.21.11"
val buildNumber =
providers
.exec { commandLine("git", "rev-list", "--count", "HEAD") }
.standardOutput.asText
.map { it.trim() }
group = "org.xodium.vanillaplus.VanillaPlus"
version = "$mcVersion+build.${buildNumber.get()}"
description = "Minecraft plugin that enhances the base gameplay"
val deployJarPath: String =
layout.projectDirectory
.dir("build/libs")
.file("${rootProject.name}-${project.version}.jar")
.asFile.absolutePath
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:$mcVersion-R0.1-SNAPSHOT")
implementation(kotlin("stdlib"))
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
@Suppress("UnstableApiUsage")
vendor = JvmVendorSpec.JETBRAINS
}
}
sourceSets { main { kotlin { srcDirs("src") } } }
dokka {
moduleName.set("VanillaPlus")
dokkaSourceSets.main {
documentedVisibilities.set(
setOf(
VisibilityModifier.Public,
VisibilityModifier.Internal,
),
)
sourceRoots.from("src")
}
dokkaPublications.html {
outputDirectory.set(layout.projectDirectory.dir("docs"))
}
}
tasks {
shadowJar {
dependsOn(processResources)
archiveClassifier.set("")
destinationDirectory.set(layout.projectDirectory.dir("build/libs"))
minimize()
}
jar { enabled = false }
runServer { minecraftVersion(mcVersion) }
withType<JavaCompile> { options.encoding = "UTF-8" }
withType(AbstractRun::class) { jvmArgs("-XX:+AllowEnhancedClassRedefinition") }
}
paperPluginYaml {
main.set(group.toString())
website.set("https://github.com/XodiumSoftware/VanillaPlus")
authors.add("Xodium")
apiVersion.set(mcVersion)
bootstrapper.set("org.xodium.vanillaplus.VanillaPlusBootstrap")
}