Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-06 00:00:47 +01:00
Move dependencies to gradle version catalog and clean up buildscripts
Dieser Commit ist enthalten in:
Ursprung
c7ba5255e3
Commit
e9526e0e23
@ -10,45 +10,32 @@ java {
|
|||||||
sourceSets["main"].java {
|
sourceSets["main"].java {
|
||||||
srcDir("src/ap/java")
|
srcDir("src/ap/java")
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets["main"].resources {
|
sourceSets["main"].resources {
|
||||||
srcDir("src/ap/resources")
|
srcDir("src/ap/resources")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val gsonVersion: String by project.extra
|
|
||||||
val guiceVersion: String by project.extra
|
|
||||||
val guavaVersion: String by project.extra
|
|
||||||
val adventureVersion: String by project.extra
|
|
||||||
val slf4jVersion: String by project.extra
|
|
||||||
val checkerFrameworkVersion: String by project.extra
|
|
||||||
val configurateVersion: String by project.extra
|
|
||||||
val caffeineVersion: String by project.extra
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("com.google.code.gson:gson:$gsonVersion")
|
api(libs.gson)
|
||||||
api("com.google.guava:guava:$guavaVersion")
|
api(libs.guava)
|
||||||
|
|
||||||
// DEPRECATED: Will be removed in Velocity Polymer
|
// DEPRECATED: Will be removed in Velocity Polymer
|
||||||
api("com.moandjiezana.toml:toml4j:0.7.2")
|
api("com.moandjiezana.toml:toml4j:0.7.2")
|
||||||
|
|
||||||
api(platform("net.kyori:adventure-bom:${adventureVersion}"))
|
api(platform(libs.adventure.bom))
|
||||||
api("net.kyori:adventure-api")
|
api("net.kyori:adventure-api")
|
||||||
api("net.kyori:adventure-text-serializer-gson")
|
api("net.kyori:adventure-text-serializer-gson")
|
||||||
api("net.kyori:adventure-text-serializer-legacy")
|
api("net.kyori:adventure-text-serializer-legacy")
|
||||||
api("net.kyori:adventure-text-serializer-plain")
|
api("net.kyori:adventure-text-serializer-plain")
|
||||||
api("net.kyori:adventure-text-minimessage")
|
api("net.kyori:adventure-text-minimessage")
|
||||||
|
|
||||||
api("org.slf4j:slf4j-api:$slf4jVersion")
|
api(libs.slf4j)
|
||||||
api("com.google.inject:guice:$guiceVersion")
|
api(libs.guice)
|
||||||
api("org.checkerframework:checker-qual:${checkerFrameworkVersion}")
|
api(libs.checker.qual)
|
||||||
api("com.velocitypowered:velocity-brigadier:1.0.0-SNAPSHOT")
|
api(libs.brigadier)
|
||||||
|
api(libs.bundles.configurate)
|
||||||
api("org.spongepowered:configurate-hocon:${configurateVersion}")
|
api(libs.caffeine)
|
||||||
api("org.spongepowered:configurate-yaml:${configurateVersion}")
|
|
||||||
api("org.spongepowered:configurate-gson:${configurateVersion}")
|
|
||||||
|
|
||||||
api("com.github.ben-manes.caffeine:caffeine:$caffeineVersion")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
@ -65,12 +52,12 @@ tasks {
|
|||||||
o.source = "8"
|
o.source = "8"
|
||||||
|
|
||||||
o.links(
|
o.links(
|
||||||
"https://www.slf4j.org/apidocs/",
|
"https://www.slf4j.org/apidocs/",
|
||||||
"https://guava.dev/releases/$guavaVersion/api/docs/",
|
"https://guava.dev/releases/${libs.guava.get().version}/api/docs/",
|
||||||
"https://google.github.io/guice/api-docs/$guiceVersion/javadoc/",
|
"https://google.github.io/guice/api-docs/${libs.guice.get().version}/javadoc/",
|
||||||
"https://docs.oracle.com/en/java/javase/11/docs/api/",
|
"https://docs.oracle.com/en/java/javase/11/docs/api/",
|
||||||
"https://jd.advntr.dev/api/$adventureVersion/",
|
"https://jd.advntr.dev/api/${libs.adventure.bom.get().version}/",
|
||||||
"https://javadoc.io/doc/com.github.ben-manes.caffeine/caffeine"
|
"https://javadoc.io/doc/com.github.ben-manes.caffeine/caffeine"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Disable the crazy super-strict doclint tool in Java 8
|
// Disable the crazy super-strict doclint tool in Java 8
|
||||||
|
@ -6,11 +6,9 @@ plugins {
|
|||||||
`java-library`
|
`java-library`
|
||||||
}
|
}
|
||||||
|
|
||||||
val junitVersion: String by project.extra
|
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = "com.velocitypowered"
|
group = "com.velocitypowered"
|
||||||
version = "3.2.0-SNAPSHOT"
|
version = rootProject.file("version").readLines().first()
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
@ -31,8 +29,9 @@ subprojects {
|
|||||||
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") // adventure
|
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") // adventure
|
||||||
maven("https://repo.papermc.io/repository/maven-public/")
|
maven("https://repo.papermc.io/repository/maven-public/")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:$junitVersion")
|
testImplementation(rootProject.libs.junit)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
@ -1,17 +1,13 @@
|
|||||||
|
@Suppress("DSL_SCOPE_VIOLATION") // fixed in Gradle 8.1
|
||||||
plugins {
|
plugins {
|
||||||
`kotlin-dsl`
|
`kotlin-dsl`
|
||||||
checkstyle
|
checkstyle
|
||||||
id("net.kyori.indra.publishing") version "2.0.6"
|
alias(libs.plugins.indra.publishing)
|
||||||
id("com.diffplug.spotless") version "6.12.0"
|
alias(libs.plugins.spotless)
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
maven("https://plugins.gradle.org/m2")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.12.0")
|
implementation("com.diffplug.spotless:spotless-plugin-gradle:${libs.plugins.spotless.get().version}")
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
|
11
buildSrc/settings.gradle.kts
Normale Datei
11
buildSrc/settings.gradle.kts
Normale Datei
@ -0,0 +1,11 @@
|
|||||||
|
dependencyResolutionManagement {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
versionCatalogs {
|
||||||
|
register("libs") {
|
||||||
|
from(files("../gradle/libs.versions.toml")) // include from parent project
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,26 +0,0 @@
|
|||||||
# API dependencies.
|
|
||||||
gsonVersion=2.10.1
|
|
||||||
junitVersion=5.9.0
|
|
||||||
slf4jVersion=1.7.30
|
|
||||||
adventureVersion=4.12.0
|
|
||||||
guavaVersion=25.1-jre
|
|
||||||
checkerFrameworkVersion=3.28.0
|
|
||||||
configurateVersion=3.7.3
|
|
||||||
guiceVersion=5.1.0
|
|
||||||
|
|
||||||
# Proxy dependencies.
|
|
||||||
log4jVersion=2.20.0
|
|
||||||
nettyVersion=4.1.90.Final
|
|
||||||
flareVersion=2.0.1
|
|
||||||
asyncHttpClientVersion=2.12.3
|
|
||||||
bstatsVersion=3.0.1
|
|
||||||
caffeineVersion=3.1.5
|
|
||||||
lmbdaVersion=2.0.0
|
|
||||||
nightConfigVersion=3.6.6
|
|
||||||
completableFuturesVersion=0.3.5
|
|
||||||
adventureFacetVersion=4.2.0
|
|
||||||
fastutilVersion=8.5.12
|
|
||||||
disruptorVersion=3.4.4
|
|
||||||
jlineVersion=3.23.0
|
|
||||||
terminalConsoleAppenderVersion=1.3.0
|
|
||||||
joptSimpleVersion=5.0.4
|
|
54
gradle/libs.versions.toml
Normale Datei
54
gradle/libs.versions.toml
Normale Datei
@ -0,0 +1,54 @@
|
|||||||
|
[versions]
|
||||||
|
configurate = "3.7.3"
|
||||||
|
flare = "2.0.1"
|
||||||
|
log4j = "2.20.0"
|
||||||
|
netty = "4.1.90.Final"
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
indra-publishing = "net.kyori.indra.publishing:2.0.6"
|
||||||
|
shadow = "com.github.johnrengelman.shadow:8.1.0"
|
||||||
|
spotless = "com.diffplug.spotless:6.12.0"
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
adventure-bom = "net.kyori:adventure-bom:4.12.0"
|
||||||
|
adventure-facet = "net.kyori:adventure-platform-facet:4.2.0"
|
||||||
|
asynchttpclient = "org.asynchttpclient:async-http-client:2.12.3"
|
||||||
|
brigadier = "com.velocitypowered:velocity-brigadier:1.0.0-SNAPSHOT"
|
||||||
|
bstats = "org.bstats:bstats-base:3.0.1"
|
||||||
|
caffeine = "com.github.ben-manes.caffeine:caffeine:3.1.5"
|
||||||
|
checker-qual = "org.checkerframework:checker-qual:3.28.0"
|
||||||
|
completablefutures = "com.spotify:completable-futures:0.3.5"
|
||||||
|
configurate-hocon = { module = "org.spongepowered:configurate-hocon", version.ref = "configurate" }
|
||||||
|
configurate-yaml = { module = "org.spongepowered:configurate-yaml", version.ref = "configurate" }
|
||||||
|
configurate-gson = { module = "org.spongepowered:configurate-gson", version.ref = "configurate" }
|
||||||
|
disruptor = "com.lmax:disruptor:3.4.4"
|
||||||
|
fastutil = "it.unimi.dsi:fastutil:8.5.12"
|
||||||
|
flare-core = { module = "space.vectrix.flare:flare", version.ref = "flare" }
|
||||||
|
flare-fastutil = { module = "space.vectrix.flare:flare-fastutil", version.ref = "flare" }
|
||||||
|
jline = "org.jline:jline-terminal-jansi:3.23.0"
|
||||||
|
jopt = "net.sf.jopt-simple:jopt-simple:5.0.4"
|
||||||
|
junit = "org.junit.jupiter:junit-jupiter:5.9.0"
|
||||||
|
guava = "com.google.guava:guava:25.1-jre"
|
||||||
|
gson = "com.google.code.gson:gson:2.10.1"
|
||||||
|
guice = "com.google.inject:guice:5.1.0"
|
||||||
|
lmbda = "org.lanternpowered:lmbda:2.0.0"
|
||||||
|
log4j-api = { module = "org.apache.logging.log4j:log4j-api", version.ref = "log4j" }
|
||||||
|
log4j-core = { module = "org.apache.logging.log4j:log4j-core", version.ref = "log4j" }
|
||||||
|
log4j-slf4j-impl = { module = "org.apache.logging.log4j:log4j-slf4j-impl", version.ref = "log4j" }
|
||||||
|
log4j-iostreams = { module = "org.apache.logging.log4j:log4j-iostreams", version.ref = "log4j" }
|
||||||
|
log4j-jul = { module = "org.apache.logging.log4j:log4j-jul", version.ref = "log4j" }
|
||||||
|
mockito = "org.mockito:mockito-core:5.2.0"
|
||||||
|
netty-codec = { module = "io.netty:netty-codec", version.ref = "netty" }
|
||||||
|
netty-codec-haproxy = { module = "io.netty:netty-codec-haproxy", version.ref = "netty" }
|
||||||
|
netty-codec-http = { module = "io.netty:netty-codec-http", version.ref = "netty" }
|
||||||
|
netty-handler = { module = "io.netty:netty-handler", version.ref = "netty" }
|
||||||
|
netty-transport-native-epoll = { module = "io.netty:netty-transport-native-epoll", version.ref = "netty" }
|
||||||
|
nightconfig = "com.electronwill.night-config:toml:3.6.6"
|
||||||
|
slf4j = "org.slf4j:slf4j-api:1.7.30"
|
||||||
|
spotbugs-annotations = "com.github.spotbugs:spotbugs-annotations:4.7.3"
|
||||||
|
terminalconsoleappender = "net.minecrell:terminalconsoleappender:1.3.0"
|
||||||
|
|
||||||
|
[bundles]
|
||||||
|
configurate = ["configurate-hocon", "configurate-yaml", "configurate-gson"]
|
||||||
|
flare = ["flare-core", "flare-fastutil"]
|
||||||
|
log4j = ["log4j-api", "log4j-core", "log4j-slf4j-impl", "log4j-iostreams", "log4j-jul"]
|
@ -3,12 +3,8 @@ plugins {
|
|||||||
`maven-publish`
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
val guavaVersion: String by project.extra
|
|
||||||
val nettyVersion: String by project.extra
|
|
||||||
val checkerFrameworkVersion: String by project.extra
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.google.guava:guava:${guavaVersion}")
|
implementation(libs.guava)
|
||||||
implementation("io.netty:netty-handler:${nettyVersion}")
|
implementation(libs.netty.handler)
|
||||||
implementation("org.checkerframework:checker-qual:${checkerFrameworkVersion}")
|
implementation(libs.checker.qual)
|
||||||
}
|
}
|
@ -1,9 +1,10 @@
|
|||||||
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
|
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
|
||||||
|
|
||||||
|
@Suppress("DSL_SCOPE_VIOLATION") // fixed in Gradle 8.1
|
||||||
plugins {
|
plugins {
|
||||||
application
|
application
|
||||||
`set-manifest-impl-version`
|
`set-manifest-impl-version`
|
||||||
id("com.github.johnrengelman.shadow") version "8.1.0"
|
alias(libs.plugins.shadow)
|
||||||
}
|
}
|
||||||
|
|
||||||
application {
|
application {
|
||||||
@ -88,65 +89,33 @@ tasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val adventureVersion: String by project.extra
|
|
||||||
val adventureFacetVersion: String by project.extra
|
|
||||||
val asyncHttpClientVersion: String by project.extra
|
|
||||||
val bstatsVersion: String by project.extra
|
|
||||||
val completableFuturesVersion: String by project.extra
|
|
||||||
val disruptorVersion: String by project.extra
|
|
||||||
val fastutilVersion: String by project.extra
|
|
||||||
val flareVersion: String by project.extra
|
|
||||||
val jlineVersion: String by project.extra
|
|
||||||
val joptSimpleVersion: String by project.extra
|
|
||||||
val lmbdaVersion: String by project.extra
|
|
||||||
val log4jVersion: String by project.extra
|
|
||||||
val nettyVersion: String by project.extra
|
|
||||||
val nightConfigVersion: String by project.extra
|
|
||||||
val semver4jVersion: String by project.extra
|
|
||||||
val terminalConsoleAppenderVersion: String by project.extra
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":velocity-api"))
|
implementation(project(":velocity-api"))
|
||||||
implementation(project(":velocity-native"))
|
implementation(project(":velocity-native"))
|
||||||
|
|
||||||
implementation("io.netty:netty-codec:${nettyVersion}")
|
implementation(libs.bundles.log4j)
|
||||||
implementation("io.netty:netty-codec-haproxy:${nettyVersion}")
|
implementation(libs.netty.codec)
|
||||||
implementation("io.netty:netty-codec-http:${nettyVersion}")
|
implementation(libs.netty.codec.haproxy)
|
||||||
implementation("io.netty:netty-handler:${nettyVersion}")
|
implementation(libs.netty.codec.http)
|
||||||
implementation("io.netty:netty-transport-native-epoll:${nettyVersion}")
|
implementation(libs.netty.handler)
|
||||||
implementation("io.netty:netty-transport-native-epoll:${nettyVersion}:linux-x86_64")
|
implementation(libs.netty.transport.native.epoll)
|
||||||
implementation("io.netty:netty-transport-native-epoll:${nettyVersion}:linux-aarch_64")
|
implementation(variantOf(libs.netty.transport.native.epoll) { classifier("linux-x86_64") })
|
||||||
|
implementation(variantOf(libs.netty.transport.native.epoll) { classifier("linux-aarch_64") })
|
||||||
|
|
||||||
implementation("org.apache.logging.log4j:log4j-api:${log4jVersion}")
|
implementation(libs.jopt)
|
||||||
implementation("org.apache.logging.log4j:log4j-core:${log4jVersion}")
|
implementation(libs.terminalconsoleappender)
|
||||||
implementation("org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}")
|
runtimeOnly(libs.jline)
|
||||||
implementation("org.apache.logging.log4j:log4j-iostreams:${log4jVersion}")
|
runtimeOnly(libs.disruptor)
|
||||||
implementation("org.apache.logging.log4j:log4j-jul:${log4jVersion}")
|
implementation(libs.fastutil)
|
||||||
|
implementation(platform("net.kyori:adventure-bom:4.12.0"))
|
||||||
implementation("net.sf.jopt-simple:jopt-simple:$joptSimpleVersion") // command-line options
|
|
||||||
implementation("net.minecrell:terminalconsoleappender:$terminalConsoleAppenderVersion")
|
|
||||||
runtimeOnly("org.jline:jline-terminal-jansi:$jlineVersion") // Needed for JLine
|
|
||||||
runtimeOnly("com.lmax:disruptor:$disruptorVersion") // Async loggers
|
|
||||||
|
|
||||||
implementation("it.unimi.dsi:fastutil-core:$fastutilVersion")
|
|
||||||
|
|
||||||
implementation(platform("net.kyori:adventure-bom:$adventureVersion"))
|
|
||||||
implementation("net.kyori:adventure-nbt")
|
implementation("net.kyori:adventure-nbt")
|
||||||
implementation("net.kyori:adventure-platform-facet:$adventureFacetVersion")
|
implementation(libs.adventure.facet)
|
||||||
|
implementation(libs.asynchttpclient)
|
||||||
implementation("org.asynchttpclient:async-http-client:$asyncHttpClientVersion")
|
implementation(libs.completablefutures)
|
||||||
|
implementation(libs.nightconfig)
|
||||||
implementation("com.spotify:completable-futures:$completableFuturesVersion")
|
implementation(libs.bstats)
|
||||||
|
implementation(libs.lmbda)
|
||||||
implementation("com.electronwill.night-config:toml:$nightConfigVersion")
|
implementation(libs.bundles.flare)
|
||||||
|
compileOnly(libs.spotbugs.annotations)
|
||||||
implementation("org.bstats:bstats-base:$bstatsVersion")
|
testImplementation(libs.mockito)
|
||||||
implementation("org.lanternpowered:lmbda:$lmbdaVersion")
|
|
||||||
|
|
||||||
implementation("space.vectrix.flare:flare:$flareVersion")
|
|
||||||
implementation("space.vectrix.flare:flare-fastutil:$flareVersion")
|
|
||||||
|
|
||||||
compileOnly("com.github.spotbugs:spotbugs-annotations:4.7.3")
|
|
||||||
|
|
||||||
testImplementation("org.mockito:mockito-core:3.+")
|
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,15 @@
|
|||||||
pluginManagement {
|
|
||||||
repositories {
|
|
||||||
gradlePluginPortal()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.4.0"
|
id("org.gradle.toolchains.foojay-resolver-convention") version "0.4.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = "velocity"
|
rootProject.name = "velocity"
|
||||||
include(
|
|
||||||
"api",
|
sequenceOf(
|
||||||
"proxy",
|
"api",
|
||||||
"native"
|
"proxy",
|
||||||
)
|
"native",
|
||||||
findProject(":api")?.name = "velocity-api"
|
).forEach {
|
||||||
findProject(":proxy")?.name = "velocity-proxy"
|
val project = ":velocity-$it"
|
||||||
findProject(":native")?.name = "velocity-native"
|
include(project)
|
||||||
|
project(project).projectDir = file(it)
|
||||||
|
}
|
||||||
|
1
version
Normale Datei
1
version
Normale Datei
@ -0,0 +1 @@
|
|||||||
|
3.2.0-SNAPSHOT
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren