CrazyAuctions/build.gradle.kts

65 lines
1.6 KiB
Plaintext
Raw Normal View History

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)
`root-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)
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()))
loaders.add("paper")
loaders.add("purpur")
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
}