Add Gradle 7 version catalog

Signed-off-by: Graham <gpe@openrs2.org>
bzip2
Graham 4 years ago
parent 1a2f4bd520
commit 6498d39306
  1. 28
      archive/build.gradle.kts
  2. 9
      asm/build.gradle.kts
  3. 6
      buffer/build.gradle.kts
  4. 26
      build.gradle.kts
  5. 32
      buildSrc/src/main/kotlin/Versions.kt
  6. 8
      cache/build.gradle.kts
  7. 2
      cli/build.gradle.kts
  8. 2
      compress-cli/build.gradle.kts
  9. 6
      compress/build.gradle.kts
  10. 2
      conf/build.gradle.kts
  11. 2
      crc32/build.gradle.kts
  12. 11
      crypto/build.gradle.kts
  13. 8
      db/build.gradle.kts
  14. 6
      decompiler/build.gradle.kts
  15. 11
      deob-ast/build.gradle.kts
  16. 10
      deob-bytecode/build.gradle.kts
  17. 2
      deob/build.gradle.kts
  18. 2
      game/build.gradle.kts
  19. 64
      gradle/libs.versions.toml
  20. 6
      http/build.gradle.kts
  21. 2
      inject/build.gradle.kts
  22. 6
      json/build.gradle.kts
  23. 15
      net/build.gradle.kts
  24. 6
      patcher/build.gradle.kts
  25. 2
      protocol/build.gradle.kts
  26. 2
      settings.gradle.kts
  27. 2
      util/build.gradle.kts
  28. 8
      yaml/build.gradle.kts

@ -9,7 +9,7 @@ application {
} }
dependencies { dependencies {
api("com.github.ajalt.clikt:clikt:${Versions.clikt}") api(libs.clikt)
implementation(project(":buffer")) implementation(project(":buffer"))
implementation(project(":cache")) implementation(project(":cache"))
@ -22,21 +22,17 @@ dependencies {
implementation(project(":protocol")) implementation(project(":protocol"))
implementation(project(":util")) implementation(project(":util"))
implementation(project(":yaml")) implementation(project(":yaml"))
implementation("com.google.guava:guava:${Versions.guava}") implementation(libs.bootstrap)
implementation("com.jakewharton.byteunits:byteunits:${Versions.byteUnits}") implementation(libs.bundles.ktor)
implementation("com.zaxxer:HikariCP:${Versions.hikaricp}") implementation(libs.bundles.thymeleaf)
implementation("io.ktor:ktor-jackson:${Versions.ktor}") implementation(libs.byteUnits)
implementation("io.ktor:ktor-server-netty:${Versions.ktor}") implementation(libs.flyway)
implementation("io.ktor:ktor-thymeleaf:${Versions.ktor}") implementation(libs.guava)
implementation("io.ktor:ktor-webjars:${Versions.ktor}") implementation(libs.hikaricp)
implementation("org.flywaydb:flyway-core:${Versions.flyway}") implementation(libs.jdom)
implementation("org.jdom:jdom2:${Versions.jdom}") implementation(libs.jsoup)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.kotlinCoroutines}") implementation(libs.kotlin.coroutines.core)
implementation("org.jsoup:jsoup:${Versions.jsoup}") implementation(libs.postgres)
implementation("org.postgresql:postgresql:${Versions.postgres}")
implementation("org.thymeleaf:thymeleaf:${Versions.thymeleaf}")
implementation("org.thymeleaf.extras:thymeleaf-extras-java8time:${Versions.thymeleafJava8Time}")
implementation("org.webjars:bootstrap:${Versions.bootstrap}")
} }
publishing { publishing {

@ -5,12 +5,9 @@ plugins {
dependencies { dependencies {
api(project(":util")) api(project(":util"))
api("com.fasterxml.jackson.core:jackson-databind:${Versions.jackson}") api(libs.bundles.asm)
api("com.google.inject:guice:${Versions.guice}") api(libs.guice)
api("org.ow2.asm:asm:${Versions.asm}") api(libs.jackson.databind)
api("org.ow2.asm:asm-commons:${Versions.asm}")
api("org.ow2.asm:asm-tree:${Versions.asm}")
api("org.ow2.asm:asm-util:${Versions.asm}")
implementation(project(":compress")) implementation(project(":compress"))
implementation(project(":crypto")) implementation(project(":crypto"))

@ -4,10 +4,10 @@ plugins {
} }
dependencies { dependencies {
api("com.google.inject:guice:${Versions.guice}") api(libs.guice)
api("io.netty:netty-buffer:${Versions.netty}") api(libs.netty.buffer)
implementation("com.google.guava:guava:${Versions.guava}") implementation(libs.guava)
} }
publishing { publishing {

@ -119,18 +119,14 @@ configure(subprojects.filter { it.isFree }) {
val implementation by configurations val implementation by configurations
implementation(kotlin("reflect")) implementation(kotlin("reflect"))
implementation("com.michael-bull.kotlin-inline-logger:kotlin-inline-logger:${Versions.inlineLogger}") implementation(libs.inlineLogger)
val testImplementation by configurations val testImplementation by configurations
testImplementation(kotlin("test-junit5")) testImplementation(kotlin("test-junit5"))
testImplementation("org.junit.jupiter:junit-jupiter-api") { testImplementation(libs.junit.api)
version {
strictly(Versions.junit)
}
}
val testRuntimeOnly by configurations val testRuntimeOnly by configurations
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Versions.junit}") testRuntimeOnly(libs.junit.engine)
} }
} }
@ -167,18 +163,18 @@ configure(subprojects.filter { it.isFree }) {
} }
externalDocumentationLink { externalDocumentationLink {
url.set(URL("https://commons.apache.org/proper/commons-compress/javadocs/api-${Versions.commonsCompress}/")) url.set(URL("https://commons.apache.org/proper/commons-compress/javadocs/api-${libs.versions.commons.compress.get()}/"))
} }
externalDocumentationLink { externalDocumentationLink {
url.set(URL("https://guava.dev/releases/${Versions.guava}/api/docs/")) url.set(URL("https://guava.dev/releases/${libs.versions.guava.get()}/api/docs/"))
} }
externalDocumentationLink { externalDocumentationLink {
url.set(URL("https://google.github.io/guice/api-docs/${Versions.guice}/javadoc/")) url.set(URL("https://google.github.io/guice/api-docs/${libs.versions.guice.get()}/javadoc/"))
} }
val jacksonVersion = Versions.jackson.split(".") val jacksonVersion = libs.versions.jackson.get().split(".")
.take(2) .take(2)
.joinToString(".") .joinToString(".")
@ -203,15 +199,15 @@ configure(subprojects.filter { it.isFree }) {
} }
externalDocumentationLink { externalDocumentationLink {
url.set(URL("https://google.github.io/jimfs/releases/${Versions.jimfs}/api/docs/")) url.set(URL("https://google.github.io/jimfs/releases/${libs.versions.jimfs.get()}/api/docs/"))
} }
externalDocumentationLink { externalDocumentationLink {
url.set(URL("https://junit.org/junit5/docs/${Versions.junit}/api/")) url.set(URL("https://junit.org/junit5/docs/${libs.versions.junit.get()}/api/"))
} }
externalDocumentationLink { externalDocumentationLink {
val version = Versions.netty.split(".") val version = libs.versions.netty.get().split(".")
.take(2) .take(2)
.joinToString(".") .joinToString(".")
@ -225,7 +221,7 @@ configure(subprojects.filter { it.isFree }) {
plugins.withType<ApplicationPlugin> { plugins.withType<ApplicationPlugin> {
dependencies { dependencies {
val runtimeOnly by configurations val runtimeOnly by configurations
runtimeOnly("ch.qos.logback:logback-classic:${Versions.logback}") runtimeOnly(libs.logback)
} }
} }

@ -1,40 +1,8 @@
object Versions { object Versions {
const val asm = "9.1"
const val bootstrap = "4.6.0-1"
const val bouncyCastlePkix = "1.68"
const val bouncyCastleProvider = "1.68"
const val byteUnits = "0.9.1"
const val clikt = "3.1.0"
const val commonsCompress = "1.20"
const val dependencyLicenseReport = "1.16" const val dependencyLicenseReport = "1.16"
const val dokka = "1.4.30" const val dokka = "1.4.30"
const val fastutil = "8.5.4"
const val fernflower = "1.1.0"
const val flyway = "7.7.3"
const val guava = "30.1.1-jre"
const val guice = "5.0.1"
const val h2 = "1.4.200"
const val hikaricp = "4.0.3"
const val inlineLogger = "1.0.3"
const val jackson = "2.12.2"
const val javaParser = "3.20.2"
const val jdom = "2.0.6"
const val jgrapht = "1.5.1"
const val jimfs = "1.2"
const val jsoup = "1.13.1"
const val junit = "5.7.1"
const val kotlin = "1.4.32" const val kotlin = "1.4.32"
const val kotlinCoroutines = "1.4.3"
const val kotlinter = "3.4.0" const val kotlinter = "3.4.0"
const val ktor = "1.5.3"
const val logback = "1.2.3"
const val netty = "4.1.63.Final"
const val nettyIoUring = "0.0.5.Final"
const val openrs2Natives = "3.2.0"
const val postgres = "42.2.19"
const val shadowPlugin = "6.1.0" const val shadowPlugin = "6.1.0"
const val thymeleaf = "3.0.12.RELEASE"
const val thymeleafJava8Time = "3.0.4.RELEASE"
const val versionsPlugin = "0.38.0" const val versionsPlugin = "0.38.0"
const val xz = "1.9"
} }

@ -5,15 +5,15 @@ plugins {
dependencies { dependencies {
api(project(":crypto")) api(project(":crypto"))
api("com.google.inject:guice:${Versions.guice}") api(libs.fastutil)
api("io.netty:netty-buffer:${Versions.netty}") api(libs.guice)
api("it.unimi.dsi:fastutil:${Versions.fastutil}") api(libs.netty.buffer)
implementation(project(":buffer")) implementation(project(":buffer"))
implementation(project(":compress")) implementation(project(":compress"))
implementation(project(":util")) implementation(project(":util"))
testImplementation("com.google.jimfs:jimfs:${Versions.jimfs}") testImplementation(libs.jimfs)
} }
publishing { publishing {

@ -4,7 +4,7 @@ plugins {
} }
dependencies { dependencies {
api("com.github.ajalt.clikt:clikt:${Versions.clikt}") api(libs.clikt)
} }
publishing { publishing {

@ -9,7 +9,7 @@ application {
} }
dependencies { dependencies {
api("com.github.ajalt.clikt:clikt:${Versions.clikt}") api(libs.clikt)
implementation(project(":compress")) implementation(project(":compress"))
} }

@ -4,11 +4,11 @@ plugins {
} }
dependencies { dependencies {
api("org.tukaani:xz:${Versions.xz}") api(libs.xz)
implementation(project(":util")) implementation(project(":util"))
implementation("com.google.guava:guava:${Versions.guava}") api(libs.commons.compress)
implementation("org.apache.commons:commons-compress:${Versions.commonsCompress}") api(libs.guava)
} }
publishing { publishing {

@ -4,7 +4,7 @@ plugins {
} }
dependencies { dependencies {
api("com.google.inject:guice:${Versions.guice}") api(libs.guice)
implementation(project(":yaml")) implementation(project(":yaml"))
} }

@ -9,7 +9,7 @@ application {
} }
dependencies { dependencies {
api("com.github.ajalt.clikt:clikt:${Versions.clikt}") api(libs.clikt)
} }
publishing { publishing {

@ -4,16 +4,15 @@ plugins {
} }
dependencies { dependencies {
api("com.fasterxml.jackson.core:jackson-databind:${Versions.jackson}") api(libs.bundles.bouncyCastle)
api("com.google.inject:guice:${Versions.guice}") api(libs.guice)
api("io.netty:netty-buffer:${Versions.netty}") api(libs.jackson.databind)
api("org.bouncycastle:bcpkix-jdk15on:${Versions.bouncyCastlePkix}") api(libs.netty.buffer)
api("org.bouncycastle:bcprov-jdk15on:${Versions.bouncyCastleProvider}")
implementation(project(":util")) implementation(project(":util"))
testImplementation(project(":buffer")) testImplementation(project(":buffer"))
testImplementation("com.google.jimfs:jimfs:${Versions.jimfs}") testImplementation(libs.jimfs)
} }
publishing { publishing {

@ -4,12 +4,12 @@ plugins {
} }
dependencies { dependencies {
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.kotlinCoroutines}") api(libs.kotlin.coroutines.core)
implementation("com.google.guava:guava:${Versions.guava}") implementation(libs.guava)
testImplementation("com.h2database:h2:${Versions.h2}") testImplementation(libs.h2)
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:${Versions.kotlinCoroutines}") testImplementation(libs.kotlin.coroutines.test)
} }
publishing { publishing {

@ -11,11 +11,11 @@ application {
dependencies { dependencies {
api(project(":deob-util")) api(project(":deob-util"))
api("com.github.ajalt.clikt:clikt:${Versions.clikt}") api(libs.clikt)
api("com.google.inject:guice:${Versions.guice}") api(libs.guice)
implementation(project(":util")) implementation(project(":util"))
implementation("org.openrs2:fernflower:${Versions.fernflower}") implementation(libs.fernflower)
} }
publishing { publishing {

@ -10,15 +10,14 @@ application {
dependencies { dependencies {
api(project(":deob-util")) api(project(":deob-util"))
api("com.github.ajalt.clikt:clikt:${Versions.clikt}") api(libs.clikt)
api("com.google.inject:guice:${Versions.guice}") api(libs.guice)
implementation(project(":inject")) implementation(project(":inject"))
implementation(project(":util")) implementation(project(":util"))
implementation("com.github.javaparser:javaparser-symbol-solver-core:${Versions.javaParser}") implementation(libs.guava)
implementation("com.google.guava:guava:${Versions.guava}") implementation(libs.javaParser)
implementation("com.google.inject:guice:${Versions.guice}") implementation(libs.jdom)
implementation("org.jdom:jdom2:${Versions.jdom}")
} }
publishing { publishing {

@ -9,17 +9,17 @@ application {
} }
dependencies { dependencies {
api("com.github.ajalt.clikt:clikt:${Versions.clikt}") api(libs.clikt)
api("com.google.inject:guice:${Versions.guice}") api(libs.guice)
implementation(project(":deob-annotations")) implementation(project(":deob-annotations"))
implementation(project(":deob-util")) implementation(project(":deob-util"))
implementation(project(":inject")) implementation(project(":inject"))
implementation(project(":patcher")) implementation(project(":patcher"))
implementation(project(":yaml")) implementation(project(":yaml"))
implementation("com.google.guava:guava:${Versions.guava}") implementation(libs.fastutil)
implementation("it.unimi.dsi:fastutil:${Versions.fastutil}") implementation(libs.guava)
implementation("org.jgrapht:jgrapht-core:${Versions.jgrapht}") implementation(libs.jgrapht)
} }
publishing { publishing {

@ -10,7 +10,7 @@ application {
} }
dependencies { dependencies {
api("com.github.ajalt.clikt:clikt:${Versions.clikt}") api(libs.clikt)
implementation(project(":decompiler")) implementation(project(":decompiler"))
implementation(project(":deob-ast")) implementation(project(":deob-ast"))

@ -9,7 +9,7 @@ application {
} }
dependencies { dependencies {
api("com.github.ajalt.clikt:clikt:${Versions.clikt}") api(libs.clikt)
implementation(project(":inject")) implementation(project(":inject"))
} }

@ -0,0 +1,64 @@
[versions]
asm = "9.1"
commons-compress = "1.20"
guava = "30.1.1-jre"
guice = "5.0.1"
jackson = "2.12.2"
jimfs = "1.2"
junit = "5.7.1"
kotlin = "1.4.32"
kotlinCoroutines = "1.4.3"
ktor = "1.5.3"
netty = "4.1.63.Final"
nettyIoUring = "0.0.5.Final"
[libraries]
asm-commons = { module="org.ow2.asm:asm-commons", version.ref="asm" }
asm-core = { module="org.ow2.asm:asm", version.ref="asm" }
asm-tree = { module="org.ow2.asm:asm-tree", version.ref="asm" }
asm-util = { module="org.ow2.asm:asm-util", version.ref="asm" }
bootstrap = { module="org.webjars:bootstrap", version="4.6.0-1" }
bouncyCastle-pkix = { module="org.bouncycastle:bcpkix-jdk15on", version="1.68" }
bouncyCastle-provider = { module="org.bouncycastle:bcprov-jdk15on", version="1.68" }
byteUnits = { module="com.jakewharton.byteunits:byteunits", version="0.9.1" }
clikt = { module="com.github.ajalt.clikt:clikt", version="3.1.0" }
commons-compress = { module="org.apache.commons:commons-compress", version.ref="commons-compress" }
fastutil = { module="it.unimi.dsi:fastutil", version="8.5.4" }
fernflower = { module="org.openrs2:fernflower", version="1.1.0" }
flyway = { module="org.flywaydb:flyway-core", version="7.7.3" }
guava = { module="com.google.guava:guava", version.ref="guava" }
guice = { module="com.google.inject:guice", version.ref="guice" }
h2 = { module="com.h2database:h2", version="1.4.200" }
hikaricp = { module="com.zaxxer:HikariCP", version="4.0.3" }
inlineLogger = { module="com.michael-bull.kotlin-inline-logger:kotlin-inline-logger", version="1.0.3" }
jackson-databind = { module="com.fasterxml.jackson.core:jackson-databind", version.ref="jackson" }
jackson-kotlin = { module="com.fasterxml.jackson.module:jackson-module-kotlin", version.ref="jackson" }
jackson-yaml = { module="com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version.ref="jackson" }
javaParser = { module="com.github.javaparser:javaparser-symbol-solver-core", version="3.20.2" }
jdom = { module="org.jdom:jdom2", version="2.0.6" }
jgrapht = { module="org.jgrapht:jgrapht-core", version="1.5.1" }
jimfs = { module="com.google.jimfs:jimfs", version.ref="jimfs" }
jsoup = { module="org.jsoup:jsoup", version="1.13.1" }
junit-api = { module="org.junit.jupiter:junit-jupiter-api", version={ strictly="5.7.1" } }
junit-engine = { module="org.junit.jupiter:junit-jupiter-engine", version.ref="junit" }
kotlin-coroutines-core = { module="org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref="kotlinCoroutines" }
kotlin-coroutines-test = { module="org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref="kotlinCoroutines" }
ktor-jackson = { module="io.ktor:ktor-jackson", version.ref="ktor" }
ktor-server-netty = { module="io.ktor:ktor-server-netty", version.ref="ktor" }
ktor-thymeleaf = { module="io.ktor:ktor-thymeleaf", version.ref="ktor" }
ktor-webjars = { module="io.ktor:ktor-webjars", version.ref="ktor" }
logback = { module="ch.qos.logback:logback-classic", version="1.2.3" }
netty-buffer = { module="io.netty:netty-buffer", version.ref="netty" }
netty-codec = { module="io.netty:netty-codec", version.ref="netty" }
netty-transport = { module="io.netty:netty-transport", version.ref="netty" }
openrs2-natives = { module="org.openrs2:openrs2-natives-all", version="3.2.0" }
postgres = { module="org.postgresql:postgresql", version="42.2.19" }
thymeleaf-core = { module="org.thymeleaf:thymeleaf", version="3.0.12.RELEASE" }
thymeleaf-java8time = { module="org.thymeleaf.extras:thymeleaf-extras-java8time", version="3.0.4.RELEASE" }
xz = { module="org.tukaani:xz", version="1.9" }
[bundles]
asm = ["asm-core", "asm-commons", "asm-tree", "asm-util"]
bouncyCastle = ["bouncyCastle-pkix", "bouncyCastle-provider"]
ktor = ["ktor-jackson", "ktor-server-netty", "ktor-thymeleaf", "ktor-webjars"]
thymeleaf = ["thymeleaf-core", "thymeleaf-java8time"]

@ -4,10 +4,10 @@ plugins {
} }
dependencies { dependencies {
api("com.google.inject:guice:${Versions.guice}") api(libs.guice)
implementation("com.google.guava:guava:${Versions.guava}") implementation(libs.guava)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.kotlinCoroutines}") implementation(libs.kotlin.coroutines.core)
} }
publishing { publishing {

@ -4,7 +4,7 @@ plugins {
} }
dependencies { dependencies {
api("com.google.inject:guice:${Versions.guice}") api(libs.guice)
} }
publishing { publishing {

@ -4,10 +4,10 @@ plugins {
} }
dependencies { dependencies {
api("com.fasterxml.jackson.core:jackson-databind:${Versions.jackson}") api(libs.guice)
api("com.google.inject:guice:${Versions.guice}") api(libs.jackson.databind)
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:${Versions.jackson}") implementation(libs.jackson.kotlin)
} }
publishing { publishing {

@ -4,15 +4,16 @@ plugins {
} }
dependencies { dependencies {
api("com.google.inject:guice:${Versions.guice}") api(libs.guice)
api("io.netty:netty-transport:${Versions.netty}") api(libs.kotlin.coroutines.core)
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Versions.kotlinCoroutines}") api(libs.netty.transport)
implementation(project(":buffer")) implementation(project(":buffer"))
implementation("io.netty:netty-transport-native-epoll:${Versions.netty}:linux-aarch_64") implementation("io.netty.incubator:netty-incubator-transport-native-io_uring:${libs.versions.nettyIoUring.get()}:linux-aarch_64")
implementation("io.netty:netty-transport-native-epoll:${Versions.netty}:linux-x86_64") implementation("io.netty.incubator:netty-incubator-transport-native-io_uring:${libs.versions.nettyIoUring.get()}:linux-x86_64")
implementation("io.netty:netty-transport-native-kqueue:${Versions.netty}:osx-x86_64") implementation("io.netty:netty-transport-native-epoll:${libs.versions.netty.get()}:linux-aarch_64")
implementation("io.netty.incubator:netty-incubator-transport-native-io_uring:${Versions.nettyIoUring}:linux-x86_64") implementation("io.netty:netty-transport-native-epoll:${libs.versions.netty.get()}:linux-x86_64")
implementation("io.netty:netty-transport-native-kqueue:${libs.versions.netty.get()}:osx-x86_64")
} }
publishing { publishing {

@ -10,13 +10,13 @@ application {
dependencies { dependencies {
api(project(":asm")) api(project(":asm"))
api("com.github.ajalt.clikt:clikt:${Versions.clikt}") api(libs.clikt)
api("com.google.inject:guice:${Versions.guice}") api(libs.guice)
implementation(project(":conf")) implementation(project(":conf"))
implementation(project(":crypto")) implementation(project(":crypto"))
implementation(project(":inject")) implementation(project(":inject"))
implementation("org.openrs2:openrs2-natives-all:${Versions.openrs2Natives}") implementation(libs.openrs2.natives)
} }
publishing { publishing {

@ -5,7 +5,7 @@ plugins {
dependencies { dependencies {
api(project(":crypto")) api(project(":crypto"))
api("io.netty:netty-codec:${Versions.netty}") api(libs.netty.codec)
implementation(project(":buffer")) implementation(project(":buffer"))
} }

@ -10,6 +10,8 @@ dependencyResolutionManagement {
} }
} }
enableFeaturePreview("VERSION_CATALOGS")
include( include(
"all", "all",
"archive", "archive",

@ -4,7 +4,7 @@ plugins {
} }
dependencies { dependencies {
testImplementation("com.google.jimfs:jimfs:${Versions.jimfs}") testImplementation(libs.jimfs)
} }
publishing { publishing {

@ -4,11 +4,11 @@ plugins {
} }
dependencies { dependencies {
api("com.fasterxml.jackson.core:jackson-databind:${Versions.jackson}") api(libs.guice)
api("com.google.inject:guice:${Versions.guice}") api(libs.jackson.databind)
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${Versions.jackson}") implementation(libs.jackson.kotlin)
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:${Versions.jackson}") implementation(libs.jackson.yaml)
} }
publishing { publishing {

Loading…
Cancel
Save