-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
35 lines (29 loc) · 942 Bytes
/
Copy pathbuild.gradle.kts
File metadata and controls
35 lines (29 loc) · 942 Bytes
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
plugins {
java
}
val projectGroup: String by project
val pluginVersion: String by project
val buildNumber: String? = System.getenv("BUILD_NUMBER")
val releaseVersion =
pluginVersion + (if (buildNumber != null && pluginVersion.contains('-')) "+build.$buildNumber" else "")
subprojects {
group = projectGroup
version = releaseVersion
}
val publishPluginRelease by tasks.registering {
group = "publishing"
description = "Builds and publishes plugin artifacts to Modrinth and Hangar."
}
subprojects {
plugins.withId("com.modrinth.minotaur") {
rootProject.tasks.named("publishPluginRelease") {
dependsOn(tasks.named("build"))
dependsOn(tasks.named("modrinth"))
}
}
plugins.withId("io.papermc.hangar-publish-plugin") {
rootProject.tasks.named("publishPluginRelease") {
dependsOn(tasks.named("publishPluginPublicationToHangar"))
}
}
}