mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2024-11-21 11:45:11 +01:00
re-work build script
This commit is contained in:
parent
b5669201e9
commit
07bae23126
@ -1,11 +1,8 @@
|
||||
plugins {
|
||||
alias(libs.plugins.paperweight)
|
||||
alias(libs.plugins.runPaper)
|
||||
alias(libs.plugins.minotaur)
|
||||
alias(libs.plugins.hangar)
|
||||
alias(libs.plugins.shadow)
|
||||
|
||||
`paper-plugin`
|
||||
`java-plugin`
|
||||
}
|
||||
|
||||
val buildNumber: String? = System.getenv("BUILD_NUMBER")
|
||||
@ -16,77 +13,11 @@ val isSnapshot = true
|
||||
|
||||
val content: String = rootProject.file("CHANGELOG.md").readText(Charsets.UTF_8)
|
||||
|
||||
dependencies {
|
||||
paperweight.paperDevBundle(libs.versions.paper)
|
||||
|
||||
implementation(libs.vital.paper)
|
||||
|
||||
compileOnly(libs.placeholderapi)
|
||||
|
||||
compileOnly(libs.oraxen)
|
||||
|
||||
compileOnly(libs.vault)
|
||||
|
||||
compileOnly(fileTree("libs").include("*.jar"))
|
||||
}
|
||||
|
||||
paperweight {
|
||||
reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION
|
||||
subprojects.filter { it.name != "api" }.forEach {
|
||||
it.project.version = rootProject.version
|
||||
}
|
||||
|
||||
tasks {
|
||||
runServer {
|
||||
jvmArgs("-Dnet.kyori.ansi.colorLevel=truecolor")
|
||||
|
||||
defaultCharacterEncoding = Charsets.UTF_8.name()
|
||||
|
||||
downloadPlugins {
|
||||
url("https://github.com/EssentialsX/Essentials/releases/download/2.20.1/EssentialsX-2.20.1.jar")
|
||||
|
||||
url("https://ci.lucko.me/job/TinyVault/lastSuccessfulBuild/artifact/build/libs/Vault.jar")
|
||||
|
||||
url("https://download.luckperms.net/1544/bukkit/loader/LuckPerms-Bukkit-5.4.131.jar")
|
||||
}
|
||||
|
||||
minecraftVersion(libs.versions.minecraft.get())
|
||||
}
|
||||
|
||||
assemble {
|
||||
dependsOn(reobfJar)
|
||||
|
||||
doLast {
|
||||
copy {
|
||||
from(reobfJar.get())
|
||||
into(rootProject.projectDir.resolve("jars"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveBaseName.set(rootProject.name)
|
||||
archiveClassifier.set("")
|
||||
|
||||
listOf(
|
||||
"com.ryderbelserion"
|
||||
).forEach {
|
||||
relocate(it, "libs.$it")
|
||||
}
|
||||
}
|
||||
|
||||
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"])
|
||||
inputs.properties("website" to project.properties["website"])
|
||||
|
||||
filesMatching("plugin.yml") {
|
||||
expand(inputs.properties)
|
||||
}
|
||||
}
|
||||
|
||||
modrinth {
|
||||
token.set(System.getenv("MODRINTH_TOKEN"))
|
||||
|
||||
|
@ -9,6 +9,7 @@ repositories {
|
||||
|
||||
maven("https://repo.codemc.io/repository/maven-public")
|
||||
|
||||
maven("https://repo.crazycrew.us/libraries")
|
||||
maven("https://repo.crazycrew.us/releases")
|
||||
|
||||
maven("https://repo.oraxen.com/releases")
|
||||
|
@ -5,7 +5,5 @@ plugins {
|
||||
repositories {
|
||||
maven("https://repo.papermc.io/repository/maven-public")
|
||||
|
||||
maven("https://repo.triumphteam.dev/snapshots")
|
||||
|
||||
maven("https://maven.enginehub.org/repo")
|
||||
}
|
@ -31,7 +31,7 @@ vault = "1.7.1"
|
||||
triumph-cmd = "2.0.0-ALPHA-10"
|
||||
jetbrains = "24.1.0"
|
||||
adventure = "4.17.0"
|
||||
vital = "2.0.1"
|
||||
vital-paper = "0.0.2"
|
||||
|
||||
[libraries]
|
||||
velocity = { module = "com.velocitypowered:velocity-api", version.ref = "velocity" }
|
||||
@ -53,8 +53,7 @@ oraxen = { module = "io.th0rgal:oraxen", version.ref = "oraxen" }
|
||||
|
||||
# Libraries
|
||||
triumph-cmds = { module = "dev.triumphteam:triumph-cmd-bukkit", version.ref = "triumph-cmd" }
|
||||
vital-core = { module = "com.ryderbelserion.vital:core", version.ref = "vital" }
|
||||
vital-paper = { module = "com.ryderbelserion.vital:paper", version.ref = "vital" }
|
||||
vital-paper = { module = "com.ryderbelserion.vital:paper", version.ref = "vital-paper" }
|
||||
jetbrains = { module = "org.jetbrains:annotations", version.ref = "jetbrains" }
|
||||
|
||||
[bundles]
|
||||
|
81
paper/build.gradle.kts
Normal file
81
paper/build.gradle.kts
Normal file
@ -0,0 +1,81 @@
|
||||
plugins {
|
||||
alias(libs.plugins.paperweight)
|
||||
alias(libs.plugins.runPaper)
|
||||
alias(libs.plugins.shadow)
|
||||
|
||||
`paper-plugin`
|
||||
}
|
||||
|
||||
dependencies {
|
||||
paperweight.paperDevBundle(libs.versions.paper)
|
||||
|
||||
implementation(libs.vital.paper) {
|
||||
exclude("org.yaml")
|
||||
}
|
||||
|
||||
compileOnly(libs.placeholderapi)
|
||||
|
||||
compileOnly(libs.oraxen)
|
||||
|
||||
compileOnly(libs.vault)
|
||||
|
||||
compileOnly(fileTree("libs").include("*.jar"))
|
||||
}
|
||||
|
||||
paperweight {
|
||||
reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION
|
||||
}
|
||||
|
||||
tasks {
|
||||
runServer {
|
||||
jvmArgs("-Dnet.kyori.ansi.colorLevel=truecolor")
|
||||
|
||||
defaultCharacterEncoding = Charsets.UTF_8.name()
|
||||
|
||||
downloadPlugins {
|
||||
url("https://github.com/EssentialsX/Essentials/releases/download/2.20.1/EssentialsX-2.20.1.jar")
|
||||
|
||||
url("https://ci.lucko.me/job/TinyVault/lastSuccessfulBuild/artifact/build/libs/Vault.jar")
|
||||
|
||||
url("https://download.luckperms.net/1544/bukkit/loader/LuckPerms-Bukkit-5.4.131.jar")
|
||||
}
|
||||
|
||||
minecraftVersion(libs.versions.minecraft.get())
|
||||
}
|
||||
|
||||
assemble {
|
||||
dependsOn(reobfJar)
|
||||
|
||||
doLast {
|
||||
copy {
|
||||
from(reobfJar.get())
|
||||
into(rootProject.projectDir.resolve("jars"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveBaseName.set(rootProject.name)
|
||||
archiveClassifier.set("")
|
||||
|
||||
listOf(
|
||||
"com.ryderbelserion"
|
||||
).forEach {
|
||||
relocate(it, "libs.$it")
|
||||
}
|
||||
}
|
||||
|
||||
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"])
|
||||
inputs.properties("website" to project.properties["website"])
|
||||
|
||||
filesMatching("plugin.yml") {
|
||||
expand(inputs.properties)
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.badbones69.crazyauctions.api.enums.misc;
|
||||
|
||||
import com.badbones69.crazyauctions.CrazyAuctions;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.persistence.PersistentDataType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public enum Keys {
|
||||
|
||||
auction_item("auction_item", PersistentDataType.BOOLEAN);
|
||||
|
||||
private final CrazyAuctions plugin = CrazyAuctions.getPlugin();
|
||||
|
||||
private final String NamespacedKey;
|
||||
private final PersistentDataType type;
|
||||
|
||||
Keys(@NotNull final String NamespacedKey, @NotNull final PersistentDataType type) {
|
||||
this.NamespacedKey = NamespacedKey;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public @NotNull final NamespacedKey getNamespacedKey() {
|
||||
return new NamespacedKey(this.plugin, this.plugin.getName().toLowerCase() + "_" + this.NamespacedKey);
|
||||
}
|
||||
|
||||
public @NotNull final PersistentDataType getType() {
|
||||
return this.type;
|
||||
}
|
||||
}
|
@ -1 +1,3 @@
|
||||
rootProject.name = "CrazyAuctions"
|
||||
rootProject.name = "CrazyAuctions"
|
||||
|
||||
include("paper")
|
Loading…
Reference in New Issue
Block a user