Skip to content

Commit

Permalink
build system improvement & update adventure
Browse files Browse the repository at this point in the history
  • Loading branch information
ham1255 committed Dec 23, 2024
1 parent c48f762 commit 8cce36a
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 83 deletions.
6 changes: 3 additions & 3 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import java.io.ByteArrayOutputStream
plugins {
`java-library`
`maven-publish`
id("net.kyori.blossom") version "1.2.0"
alias(libs.plugins.net.kyori.blossom)

}

dependencies {
api(libs.guava)
api(libs.jedis)
api(libs.okhttp)
api(libs.configurate)
api(libs.configurateV3)
api(libs.caffeine)
api(libs.adventure.api)
api(libs.adventure.gson)
Expand Down Expand Up @@ -50,7 +50,7 @@ tasks {
options.use()
options.isDocFilesSubDirs = true
val jedisVersion = libs.jedis.get().version
val configurateVersion = libs.configurate.get().version
val configurateVersion = libs.configurateV3.get().version
val guavaVersion = libs.guava.get().version
val adventureVersion = libs.adventure.plain.get().version
options.links(
Expand Down
36 changes: 36 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[versions]
guava = "31.1-jre"
jedis = "5.2.0"
okhttp = "2.7.5"
configurateV3 = "3.7.3"
caffeine = "3.1.8"
adventure = "4.18.0"
adventure-bungeecord-platform = "4.3.4"
acf = "e2005dd62d"
bungeecordApi = "1.21-R0.1-SNAPSHOT"
velocity = "3.4.0-SNAPSHOT"

[plugins]
net-kyori-blossom = { id = "net.kyori.blossom", version = "1.2.0" }

[libraries]
guava = { module = "com.google.guava:guava", version.ref = "guava" }
jedis = { module = "redis.clients:jedis", version.ref = "jedis" }
okhttp = { module = "com.squareup.okhttp:okhttp", version.ref = "okhttp" }
configurateV3 = { module = "org.spongepowered:configurate-yaml", version.ref = "configurateV3" }
caffeine = { module = "com.github.ben-manes.caffeine:caffeine", version.ref = "caffeine" }

adventure-api = { module = "net.kyori:adventure-api", version.ref = "adventure" }
adventure-gson = { module = "net.kyori:adventure-text-serializer-gson", version.ref = "adventure" }
adventure-legacy = { module = "net.kyori:adventure-text-serializer-legacy", version.ref = "adventure" }
adventure-plain = { module = "net.kyori:adventure-text-serializer-plain", version.ref = "adventure" }
adventure-miniMessage = { module = "net.kyori:adventure-text-minimessage", version.ref = "adventure" }

acf-core = { module = "com.github.ProxioDev.commands:acf-core", version.ref = "acf" }
acf-bungeecord = { module = "com.github.ProxioDev.commands:acf-bungee", version.ref = "acf" }
acf-velocity = { module = "com.github.ProxioDev.commands:acf-velocity", version.ref = "acf" }

platform-bungeecord = { module = "net.md-5:bungeecord-api", version.ref = "bungeecordApi" }
adventure-platforms-bungeecord = { module = "net.kyori:adventure-platform-bungeecord", version.ref = "adventure-bungeecord-platform" }

platform-velocity = { module = "com.velocitypowered:velocity-api", version.ref = "velocity" }
96 changes: 16 additions & 80 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@file:Suppress("UnstableApiUsage")
pluginManagement {
repositories {
gradlePluginPortal()
Expand All @@ -6,90 +7,25 @@ pluginManagement {

rootProject.name = "ValioBungee"

include(":RedisBungee-API")
project(":RedisBungee-API").projectDir = file("api")

include(":RedisBungee-Commands")
project(":RedisBungee-Commands").projectDir = file("commands")

include(":RedisBungee-Velocity")
project(":RedisBungee-Velocity").projectDir = file("proxies/velocity")

include(":RedisBungee-Bungee")
project(":RedisBungee-Bungee").projectDir = file("proxies/bungeecord/bungeecord-api")

include(":RedisBungee-Proxy-Bungee")
project(":RedisBungee-Proxy-Bungee").projectDir = file("proxies/bungeecord")

include(":RedisBungee-Velocity")
project(":RedisBungee-Velocity").projectDir = file("proxies/velocity/velocity-api")

include(":RedisBungee-Proxy-Velocity")
project(":RedisBungee-Proxy-Velocity").projectDir = file("proxies/velocity")


fun configureProject(name: String, path: String) {
include(name)
project(name).projectDir = file(path)
}

configureProject(":RedisBungee-API", "api")
configureProject(":RedisBungee-Commands", "commands")
configureProject(":RedisBungee-Velocity", "proxies/velocity")
configureProject(":RedisBungee-Bungee", "proxies/bungeecord/bungeecord-api")
configureProject(":RedisBungee-Proxy-Bungee", "proxies/bungeecord")
configureProject(":RedisBungee-Velocity", "proxies/velocity/velocity-api")
configureProject(":RedisBungee-Proxy-Velocity", "proxies/velocity")

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven {
name = "PaperMC"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
maven {
// hosts the bungeecord apis
name = "sonatype"
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
}

maven {
url = uri("https://jitpack.io")
}

maven("https://repo.papermc.io/repository/maven-public/")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://jitpack.io")
}
versionCatalogs {
val jedisVersion = "5.2.0"
val configurateVersion = "3.7.3"
val guavaVersion = "31.1-jre"
val okHttpVersion = "2.7.5"
val caffeineVersion = "3.1.8"
val adventureVersion = "4.17.0"
val acf = "e2005dd62d" // use our own fork 'same upstream with jitpack file only'
val bungeecordApiVersion = "1.21-R0.1-SNAPSHOT"
val velocityVersion = "3.4.0-SNAPSHOT";


create("libs") {

library("guava", "com.google.guava:guava:$guavaVersion")
library("jedis", "redis.clients:jedis:$jedisVersion")
library("okhttp", "com.squareup.okhttp:okhttp:$okHttpVersion")
library("configurate", "org.spongepowered:configurate-yaml:$configurateVersion")
library("caffeine", "com.github.ben-manes.caffeine:caffeine:$caffeineVersion")

library("adventure-api", "net.kyori:adventure-api:$adventureVersion")
library("adventure-gson", "net.kyori:adventure-text-serializer-gson:$adventureVersion")
library("adventure-legacy", "net.kyori:adventure-text-serializer-legacy:$adventureVersion")
library("adventure-plain", "net.kyori:adventure-text-serializer-plain:$adventureVersion")
library("adventure-miniMessage", "net.kyori:adventure-text-minimessage:$adventureVersion")

library("acf-core", "com.github.ProxioDev.commands:acf-core:$acf")
library("acf-bungeecord", "com.github.ProxioDev.commands:acf-bungee:$acf")
library("acf-velocity", "com.github.ProxioDev.commands:acf-velocity:$acf")

library("platform-bungeecord","net.md-5:bungeecord-api:$bungeecordApiVersion")
library("adventure-platforms-bungeecord", "net.kyori:adventure-platform-bungeecord:4.3.2")

library("platform-velocity", "com.velocitypowered:velocity-api:$velocityVersion")




}


}


}

0 comments on commit 8cce36a

Please sign in to comment.