Skip to content

Commit

Permalink
Switched to Version Catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
PulseBeat02 committed Nov 7, 2024
1 parent 1e61a33 commit b7325be
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 42 deletions.
85 changes: 43 additions & 42 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,66 +33,66 @@ repositories {
maven("https://repo.codemc.io/repository/maven-releases/")
}

var runtimeDeps = listOf(
"net.kyori:adventure-api:4.17.0",
"net.kyori:adventure-platform-bukkit:4.3.4",
"net.kyori:adventure-text-minimessage:4.17.0",
"net.kyori:adventure-text-serializer-plain:4.17.0",
"net.kyori:adventure-text-serializer-legacy:4.17.0",
"team.unnamed:creative-api:1.7.3",
"team.unnamed:creative-serializer-minecraft:1.7.3",
"team.unnamed:creative-server:1.7.3",
"org.incendo:cloud-annotations:2.0.0",
"org.incendo:cloud-paper:2.0.0-beta.10",
"org.incendo:cloud-minecraft-extras:2.0.0-beta.10",
"me.lucko:commodore:2.2",
"org.jsoup:jsoup:1.18.1",
"fr.mrmicky:fastboard:2.1.3",
"com.github.stefvanschie.inventoryframework:IF:0.10.18",
"org.bstats:bstats-bukkit:3.1.0",
"org.hibernate.orm:hibernate-core:7.0.0.Beta1",
"com.mysql:mysql-connector-j:9.1.0",
"com.h2database:h2:2.3.232",
"org.postgresql:postgresql:42.7.4",
"org.xerial:sqlite-jdbc:3.46.1.3",
"net.bytebuddy:byte-buddy:1.15.10",
"net.bytebuddy:byte-buddy-agent:1.15.10"
);
val runtimeDeps = listOf(
libs.adventureApi,
libs.adventurePlatformBukkit,
libs.adventureTextMinimessage,
libs.adventureTextSerializerPlain,
libs.adventureTextSerializerLegacy,
libs.creativeApi,
libs.creativeSerializerMinecraft,
libs.creativeServer,
libs.cloudAnnotations,
libs.cloudPaper,
libs.cloudMinecraftExtras,
libs.commodore,
libs.jsoup,
libs.fastboard,
libs.inventoryFramework,
libs.bstatsBukkit,
libs.hibernateCore,
libs.mysqlConnector,
libs.h2,
libs.postgresql,
libs.sqliteJdbc,
libs.byteBuddy,
libs.byteBuddyAgent
)

dependencies {

// Annotation Processors
annotationProcessor("org.incendo:cloud-annotations:2.0.0")
annotationProcessor(libs.cloudAnnotations)

// Project Dependencies
implementation(project(":nms-api"))
runtimeOnly(project(":v1_21_R3", "reobf"))

// Provided Dependencies
compileOnly("org.spigotmc:spigot-api:1.21.3-R0.1-SNAPSHOT")
compileOnly("fastutil:fastutil:5.0.9")
compileOnly("io.netty:netty-all:4.1.97.Final")
compileOnly(libs.spigotApi)
compileOnly(libs.fastutil)
compileOnly(libs.nettyAll)
runtimeDeps.forEach(::compileOnly)

// Plugin Extensions
compileOnly("me.clip:placeholderapi:2.11.6")
compileOnly("com.comphenix.protocol:ProtocolLib:5.3.0")
compileOnly("LibsDisguises:LibsDisguises:10.0.44")
compileOnly("com.sk89q.worldedit:worldedit-core:7.3.7")
compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.3.7")
compileOnly("net.citizensnpcs:citizens-main:2.0.35-SNAPSHOT") {
compileOnly(libs.placeholderapi)
compileOnly(libs.protocolLib)
compileOnly(libs.libsDisguises)
compileOnly(libs.worldeditCore)
compileOnly(libs.worldeditBukkit)
compileOnly(libs.citizensMain) {
exclude(
group = "*",
module = "*"
)
}

// Testing Dependencies
testImplementation("team.unnamed:creative-api:1.7.3")
testImplementation("team.unnamed:creative-serializer-minecraft:1.7.3")
testImplementation("team.unnamed:creative-server:1.7.3")
testImplementation("org.jsoup:jsoup:1.18.1")
testImplementation("fastutil:fastutil:5.0.9")
testImplementation(libs.creativeApi)
testImplementation(libs.creativeSerializerMinecraft)
testImplementation(libs.creativeServer)
testImplementation(libs.jsoup)
testImplementation(libs.fastutil)
}

val targetJavaVersion = 21
Expand All @@ -116,8 +116,9 @@ val windows = System.getProperty("os.name").lowercase().contains("windows")
tasks {

bukkitPluginYaml {
val updatedLibraries = runtimeDeps.stream().map { it.get().toString() }.toList()
name = "MurderRun"
version = "1.21.3-v1.0.0"
version = "${project.version}"
description = "Pulse's MurderRun Plugin"
authors = listOf("PulseBeat_02")
apiVersion = "1.21"
Expand All @@ -129,7 +130,7 @@ tasks {
"Citizens",
"LibsDisguises",
"PlaceholderAPI")
libraries = runtimeDeps
libraries = updatedLibraries
}

withType<JavaCompile>().configureEach {
Expand Down
62 changes: 62 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[versions]
adventure = "4.17.0"
adventurePlatformBukkit = "4.3.4"
creativeApi = "1.7.3"
cloudAnnotations = "2.0.0"
cloudPaper = "2.0.0-beta.10"
cloudMinecraftExtras = "2.0.0-beta.10"
commodore = "2.2"
jsoup = "1.18.1"
fastboard = "2.1.3"
inventoryFramework = "0.10.18"
bstatsBukkit = "3.1.0"
hibernateCore = "7.0.0.Beta1"
mysqlConnector = "9.1.0"
h2 = "2.3.232"
postgresql = "42.7.4"
sqliteJdbc = "3.46.1.3"
byteBuddy = "1.15.10"
byteBuddyAgent = "1.15.10"
spigotApi = "1.21.3-R0.1-SNAPSHOT"
fastutil = "5.0.9"
nettyAll = "4.1.97.Final"
placeholderapi = "2.11.6"
protocolLib = "5.3.0"
libsDisguises = "10.0.44"
worldeditCore = "7.3.7"
worldeditBukkit = "7.3.7"
citizensMain = "2.0.35-SNAPSHOT"

[libraries]
adventureApi = { group = "net.kyori", name = "adventure-api", version.ref = "adventure" }
adventurePlatformBukkit = { group = "net.kyori", name = "adventure-platform-bukkit", version.ref = "adventurePlatformBukkit" }
adventureTextMinimessage = { group = "net.kyori", name = "adventure-text-minimessage", version.ref = "adventure" }
adventureTextSerializerPlain = { group = "net.kyori", name = "adventure-text-serializer-plain", version.ref = "adventure" }
adventureTextSerializerLegacy = { group = "net.kyori", name = "adventure-text-serializer-legacy", version.ref = "adventure" }
creativeApi = { group = "team.unnamed", name = "creative-api", version.ref = "creativeApi" }
creativeSerializerMinecraft = { group = "team.unnamed", name = "creative-serializer-minecraft", version.ref = "creativeApi" }
creativeServer = { group = "team.unnamed", name = "creative-server", version.ref = "creativeApi" }
cloudAnnotations = { group = "org.incendo", name = "cloud-annotations", version.ref = "cloudAnnotations" }
cloudPaper = { group = "org.incendo", name = "cloud-paper", version.ref = "cloudPaper" }
cloudMinecraftExtras = { group = "org.incendo", name = "cloud-minecraft-extras", version.ref = "cloudMinecraftExtras" }
commodore = { group = "me.lucko", name = "commodore", version.ref = "commodore" }
jsoup = { group = "org.jsoup", name = "jsoup", version.ref = "jsoup" }
fastboard = { group = "fr.mrmicky", name = "fastboard", version.ref = "fastboard" }
inventoryFramework = { group = "com.github.stefvanschie.inventoryframework", name = "IF", version.ref = "inventoryFramework" }
bstatsBukkit = { group = "org.bstats", name = "bstats-bukkit", version.ref = "bstatsBukkit" }
hibernateCore = { group = "org.hibernate.orm", name = "hibernate-core", version.ref = "hibernateCore" }
mysqlConnector = { group = "com.mysql", name = "mysql-connector-j", version.ref = "mysqlConnector" }
h2 = { group = "com.h2database", name = "h2", version.ref = "h2" }
postgresql = { group = "org.postgresql", name = "postgresql", version.ref = "postgresql" }
sqliteJdbc = { group = "org.xerial", name = "sqlite-jdbc", version.ref = "sqliteJdbc" }
byteBuddy = { group = "net.bytebuddy", name = "byte-buddy", version.ref = "byteBuddy" }
byteBuddyAgent = { group = "net.bytebuddy", name = "byte-buddy-agent", version.ref = "byteBuddyAgent" }
spigotApi = { group = "org.spigotmc", name = "spigot-api", version.ref = "spigotApi" }
fastutil = { group = "fastutil", name = "fastutil", version.ref = "fastutil" }
nettyAll = { group = "io.netty", name = "netty-all", version.ref = "nettyAll" }
placeholderapi = { group = "me.clip", name = "placeholderapi", version.ref = "placeholderapi" }
protocolLib = { group = "com.comphenix.protocol", name = "ProtocolLib", version.ref = "protocolLib" }
libsDisguises = { group = "LibsDisguises", name = "LibsDisguises", version.ref = "libsDisguises" }
worldeditCore = { group = "com.sk89q.worldedit", name = "worldedit-core", version.ref = "worldeditCore" }
worldeditBukkit = { group = "com.sk89q.worldedit", name = "worldedit-bukkit", version.ref = "worldeditBukkit" }
citizensMain = { group = "net.citizensnpcs", name = "citizens-main", version.ref = "citizensMain" }

0 comments on commit b7325be

Please sign in to comment.