Skip to content

Commit

Permalink
Migrate dependencies to gradle version catalogue
Browse files Browse the repository at this point in the history
  • Loading branch information
booky10 committed Jul 21, 2023
1 parent 6ccb1f9 commit 0577051
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 14 deletions.
24 changes: 10 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ plugins {
id("java-library")
id("maven-publish")

id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
id("xyz.jpenilla.run-paper") version "1.0.6"
id("com.github.johnrengelman.shadow") version "8.1.1"
alias(libs.plugins.pluginyml.bukkit)
alias(libs.plugins.runpaper)
alias(libs.plugins.shadow)
}

group = "dev.booky"
Expand All @@ -22,24 +22,20 @@ repositories {
maven("https://repo.papermc.io/repository/maven-public/")
}

val cloudCoreVersion = "1.0.1-SNAPSHOT"

dependencies {
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")

implementation("org.bstats:bstats-bukkit:3.0.2")
compileOnly(libs.paperapi)

// need to be published to maven local manually
compileOnlyApi("dev.booky:cloudcore:$cloudCoreVersion")
compileOnlyApi(libs.cloudcore)
implementation(libs.bstats)

// testserver dependency plugins
plugin("dev.booky:cloudcore:$cloudCoreVersion:all")
plugin("dev.jorel:commandapi-bukkit-plugin:9.0.3")
plugin(variantOf(libs.cloudcore) { classifier("all") })
plugin(libs.commandapi.plugin)
}

java {
withSourcesJar()
toolchain{
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
vendor.set(JvmVendorSpec.ADOPTIUM)
}
Expand All @@ -66,7 +62,7 @@ bukkit {

tasks {
runServer {
minecraftVersion("1.20.1")
minecraftVersion(libs.versions.minecraft.get())
pluginJars.from(plugin.resolve())
}

Expand Down
21 changes: 21 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[plugins]
pluginyml-bukkit = "net.minecrell.plugin-yml.bukkit:0.6.0"
runpaper = "xyz.jpenilla.run-paper:2.1.0"
shadow = "com.github.johnrengelman.shadow:8.1.1"

[versions]
minecraft = "1.20.1"
paperapi = "1.20.1-R0.1-SNAPSHOT"

cloudcore = "1.0.1-SNAPSHOT"

bstats = "3.0.2"
commandapi = "9.0.3"

[libraries]
paperapi = { module = "io.papermc.paper:paper-api", version.ref = "paperapi" }

cloudcore = { module = "dev.booky:cloudcore", version.ref = "cloudcore" }

bstats = { module = "org.bstats:bstats-bukkit", version.ref = "bstats" }
commandapi-plugin = { module = "dev.jorel:commandapi-bukkit-plugin", version.ref = "commandapi" }

0 comments on commit 0577051

Please sign in to comment.