CrazyAuctions/build.gradle.kts

141 lines
3.8 KiB
Plaintext
Raw Normal View History

2024-03-05 18:08:54 +01:00
plugins {
2024-07-12 02:00:03 +02:00
alias(libs.plugins.paperweight)
alias(libs.plugins.runPaper)
2024-06-15 07:06:32 +02:00
alias(libs.plugins.minotaur)
alias(libs.plugins.hangar)
2024-09-03 04:54:38 +02:00
alias(libs.plugins.shadow)
2024-06-15 07:06:32 +02:00
2024-07-12 02:00:03 +02:00
`paper-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-07-12 02:00:03 +02:00
dependencies {
paperweight.paperDevBundle(libs.versions.paper)
implementation(libs.vital.paper)
compileOnly(libs.placeholderapi)
compileOnly(libs.oraxen)
compileOnly(libs.vault)
compileOnly(fileTree("libs").include("*.jar"))
2024-06-15 07:15:07 +02:00
}
2024-07-12 02:00:03 +02:00
paperweight {
reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION
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 {
runServer {
jvmArgs("-Dnet.kyori.ansi.colorLevel=truecolor")
2024-06-15 07:06:32 +02:00
2024-07-12 02:00:03 +02:00
defaultCharacterEncoding = Charsets.UTF_8.name()
2024-06-15 07:06:32 +02:00
2024-07-12 02:00:03 +02:00
downloadPlugins {
url("https://github.com/EssentialsX/Essentials/releases/download/2.20.1/EssentialsX-2.20.1.jar")
2024-06-15 07:06:32 +02:00
2024-07-12 02:00:03 +02:00
url("https://ci.lucko.me/job/TinyVault/lastSuccessfulBuild/artifact/build/libs/Vault.jar")
2024-06-15 07:06:32 +02:00
2024-07-12 02:00:03 +02:00
url("https://download.luckperms.net/1544/bukkit/loader/LuckPerms-Bukkit-5.4.131.jar")
}
2024-06-15 07:06:32 +02:00
2024-07-12 02:00:03 +02:00
minecraftVersion(libs.versions.minecraft.get())
}
2024-06-15 07:06:32 +02:00
2024-07-12 02:00:03 +02:00
assemble {
dependsOn(reobfJar)
2024-06-15 07:06:32 +02:00
2024-07-12 02:00:03 +02:00
doLast {
copy {
from(reobfJar.get())
into(rootProject.projectDir.resolve("jars"))
}
}
}
2024-06-15 07:06:32 +02:00
2024-07-12 02:00:03 +02:00
shadowJar {
archiveBaseName.set(rootProject.name)
archiveClassifier.set("")
2024-06-15 07:06:32 +02:00
2024-07-12 02:00:03 +02:00
listOf(
"com.ryderbelserion"
).forEach {
relocate(it, "libs.$it")
}
}
2024-06-15 07:06:32 +02:00
2024-07-12 02:00:03 +02:00
processResources {
inputs.properties("name" to rootProject.name)
inputs.properties("version" to project.version)
inputs.properties("group" to project.group)
inputs.properties("apiVersion" to libs.versions.minecraft.get())
inputs.properties("description" to project.properties["description"])
inputs.properties("authors" to project.properties["authors"])
2024-07-12 02:00:03 +02:00
inputs.properties("website" to project.properties["website"])
2024-06-15 07:06:32 +02:00
2024-07-12 02:00:03 +02:00
filesMatching("plugin.yml") {
expand(inputs.properties)
}
}
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)
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
}