2024-03-05 18:08:54 +01:00
|
|
|
plugins {
|
2024-06-15 07:06:32 +02:00
|
|
|
alias(libs.plugins.minotaur)
|
|
|
|
alias(libs.plugins.hangar)
|
|
|
|
|
2024-06-16 20:38:19 +02:00
|
|
|
`java-plugin`
|
2024-06-15 07:06:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
val buildNumber: String? = System.getenv("BUILD_NUMBER")
|
|
|
|
|
2024-06-15 07:13:54 +02:00
|
|
|
rootProject.version = if (buildNumber != null) "1.4.2-$buildNumber" else "1.4.2"
|
2024-06-15 07:06:32 +02:00
|
|
|
|
|
|
|
val isSnapshot = false
|
|
|
|
|
|
|
|
val content: String = rootProject.file("CHANGELOG.md").readText(Charsets.UTF_8)
|
|
|
|
|
2024-06-15 07:15:07 +02:00
|
|
|
subprojects.filter { it.name != "api" }.forEach {
|
|
|
|
it.project.version = rootProject.version
|
|
|
|
}
|
|
|
|
|
2024-06-15 07:06:32 +02:00
|
|
|
modrinth {
|
|
|
|
token.set(System.getenv("MODRINTH_TOKEN"))
|
|
|
|
|
|
|
|
projectId.set(rootProject.name.lowercase())
|
|
|
|
|
|
|
|
versionType.set(if (isSnapshot) "beta" else "release")
|
|
|
|
|
|
|
|
versionName.set("${rootProject.name} ${rootProject.version}")
|
|
|
|
versionNumber.set(rootProject.version as String)
|
|
|
|
|
|
|
|
changelog.set(content)
|
|
|
|
|
|
|
|
uploadFile.set(rootProject.projectDir.resolve("jars/${rootProject.name}-${rootProject.version}.jar"))
|
|
|
|
|
|
|
|
gameVersions.set(listOf(libs.versions.minecraft.get()))
|
|
|
|
|
2024-06-16 20:38:19 +02:00
|
|
|
loaders.addAll("paper", "purpur")
|
2024-06-15 07:06:32 +02:00
|
|
|
|
|
|
|
autoAddDependsOn.set(false)
|
|
|
|
detectLoaders.set(false)
|
|
|
|
}
|
|
|
|
|
|
|
|
hangarPublish {
|
|
|
|
publications.register("plugin") {
|
|
|
|
apiKey.set(System.getenv("HANGAR_KEY"))
|
|
|
|
|
|
|
|
id.set(rootProject.name.lowercase())
|
|
|
|
|
|
|
|
version.set(rootProject.version as String)
|
|
|
|
|
|
|
|
channel.set(if (isSnapshot) "Snapshot" else "Release")
|
|
|
|
|
|
|
|
changelog.set(content)
|
|
|
|
|
|
|
|
platforms {
|
|
|
|
paper {
|
|
|
|
jar.set(rootProject.projectDir.resolve("jars/${rootProject.name}-${rootProject.version}.jar"))
|
|
|
|
|
|
|
|
platformVersions.set(listOf(libs.versions.minecraft.get()))
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
hangar("PlaceholderAPI") {
|
|
|
|
required = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-03-05 18:08:54 +01:00
|
|
|
}
|