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-09-08 05:17:08 +02:00
|
|
|
`java-plugin`
|
2024-06-15 07:06:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
val buildNumber: String? = System.getenv("BUILD_NUMBER")
|
|
|
|
|
2024-07-23 04:53:03 +02:00
|
|
|
rootProject.version = if (buildNumber != null) "${libs.versions.minecraft.get()}-$buildNumber" else "1.6.2"
|
2024-06-15 07:06:32 +02:00
|
|
|
|
2024-07-12 02:00:03 +02:00
|
|
|
val isSnapshot = true
|
2024-06-15 07:06:32 +02:00
|
|
|
|
|
|
|
val content: String = rootProject.file("CHANGELOG.md").readText(Charsets.UTF_8)
|
|
|
|
|
2024-09-08 05:17:08 +02:00
|
|
|
subprojects.filter { it.name != "api" }.forEach {
|
|
|
|
it.project.version = rootProject.version
|
2024-07-12 02:00:03 +02:00
|
|
|
}
|
2024-06-15 07:06:32 +02:00
|
|
|
|
2024-07-12 02:00:03 +02:00
|
|
|
tasks {
|
|
|
|
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)
|
2024-06-15 07:06:32 +02:00
|
|
|
|
|
|
|
changelog.set(content)
|
|
|
|
|
2024-07-12 02:00:03 +02:00
|
|
|
uploadFile.set(rootProject.projectDir.resolve("jars/${rootProject.name}-${rootProject.version}.jar"))
|
|
|
|
|
|
|
|
gameVersions.set(listOf(libs.versions.minecraft.get()))
|
|
|
|
|
|
|
|
loaders.addAll(listOf("purpur", "paper", "folia"))
|
|
|
|
|
|
|
|
syncBodyFrom.set(rootProject.file("README.md").readText(Charsets.UTF_8))
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
2024-07-12 04:17:16 +02:00
|
|
|
channel.set(if (isSnapshot) "Beta" else "Release")
|
2024-07-12 02:00:03 +02:00
|
|
|
|
|
|
|
changelog.set(content)
|
|
|
|
|
|
|
|
platforms {
|
|
|
|
paper {
|
|
|
|
jar.set(rootProject.projectDir.resolve("jars/${rootProject.name}-${rootProject.version}.jar"))
|
2024-06-15 07:06:32 +02:00
|
|
|
|
2024-07-12 02:00:03 +02:00
|
|
|
platformVersions.set(listOf(libs.versions.minecraft.get()))
|
2024-06-15 07:06:32 +02:00
|
|
|
|
2024-07-12 02:00:03 +02:00
|
|
|
dependencies {
|
|
|
|
hangar("PlaceholderAPI") {
|
|
|
|
required = false
|
|
|
|
}
|
2024-06-15 07:06:32 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-03-05 18:08:54 +01:00
|
|
|
}
|