-
-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
77 lines (71 loc) · 2.06 KB
/
build.gradle.kts
File metadata and controls
77 lines (71 loc) · 2.06 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
import io.papermc.hangarpublishplugin.model.Platforms
plugins {
alias(libs.plugins.convention.standard)
alias(libs.plugins.minotaur) apply false
alias(libs.plugins.shadow)
alias(libs.plugins.hangar)
id("xyz.jpenilla.run-paper") version "3.0.2"
}
val minecraft = property("minecraft_version").toString()
val versionString = version.toString()
val groupString = group.toString()
val javadocJar by tasks.registering(Jar::class) {
dependsOn(tasks.dokkaGenerate)
archiveClassifier = "javadoc"
from(layout.buildDirectory.dir("dokka/html").orNull?.asFile)
}
runPaper {
disablePluginJarDetection()
}
tasks {
runServer {
pluginJars(fileTree("plugins"))
pluginJars(project(":platform:paper").tasks.shadowJar.flatMap {
it.archiveFile
})
pluginJars(project(":test-plugin").tasks.jar.flatMap {
it.archiveFile
})
version(minecraft)
downloadPlugins {
hangar("ViaVersion", "5.7.2")
hangar("ViaBackwards", "5.7.2")
hangar("Skript", "2.14.2")
hangar("TabTPS", "1.3.30")
}
}
build {
finalizedBy(
javadocJar
)
}
shadowJar {
enabled = false
}
}
hangarPublish {
publications.register("plugin") {
version = project.version as String
id = "BetterModel"
apiKey = System.getenv("HANGAR_API_TOKEN")
val log = System.getenv("COMMIT_MESSAGE")
if (log != null) {
changelog = log
channel = "Snapshot"
} else {
changelog = rootProject.file("changelog/$versionString.md").readText()
channel = "Release"
}
platforms {
register(Platforms.PAPER) {
jar = project(":platform:paper").tasks.shadowJar.flatMap {
it.archiveFile
}
platformVersions = SUPPORTED_VERSIONS
dependencies {
hangar("SkinsRestorer") { required = false }
}
}
}
}
}