Browse Source

Add Gradle 7 version catalog

Signed-off-by: Graham <gpe@openrs2.org>
pull/132/head
Graham 7 months ago
parent
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

28
archive/build.gradle.kts

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

9
asm/build.gradle.kts

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

6
buffer/build.gradle.kts

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

26
build.gradle.kts

@ -119,18 +119,14 @@ configure(subprojects.filter { it.isFree }) {
val implementation by configurations
implementation(kotlin("reflect"))
implementation("com.michael-bull.kotlin-inline-logger:kotlin-inline-logger:${Versions.inlineLogger}")
implementation(libs.inlineLogger)
val testImplementation by configurations
testImplementation(kotlin("test-junit5"))
testImplementation("org.junit.jupiter:junit-jupiter-api") {
version {
strictly(Versions.junit)
}
}
testImplementation(libs.junit.api)
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 {
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 {
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 {
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)
.joinToString(".")
@ -203,15 +199,15 @@ configure(subprojects.filter { it.isFree }) {
}
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 {
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 {
val version = Versions.netty.split(".")
val version = libs.versions.netty.get().split(".")
.take(2)
.joinToString(".")
@ -225,7 +221,7 @@ configure(subprojects.filter { it.isFree }) {
plugins.withType<ApplicationPlugin> {
dependencies {
val runtimeOnly by configurations
runtimeOnly("ch.qos.logback:logback-classic:${Versions.logback}")
runtimeOnly(libs.logback)
}
}

32
buildSrc/src/main/kotlin/Versions.kt

@ -1,40 +1,8 @@
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 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 kotlinCoroutines = "1.4.3"
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 thymeleaf = "3.0.12.RELEASE"
const val thymeleafJava8Time = "3.0.4.RELEASE"
const val versionsPlugin = "0.38.0"
const val xz = "1.9"
}

8
cache/build.gradle.kts

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

2
cli/build.gradle.kts

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

2
compress-cli/build.gradle.kts

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

6
compress/build.gradle.kts

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

2
conf/build.gradle.kts

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

2
crc32/build.gradle.kts

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

11
crypto/build.gradle.kts

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

8
db/build.gradle.kts

@ -4,12 +4,12 @@ plugins {
}
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("org.jetbrains.kotlinx:kotlinx-coroutines-test:${Versions.kotlinCoroutines}")
testImplementation(libs.h2)
testImplementation(libs.kotlin.coroutines.test)
}
publishing {

6
decompiler/build.gradle.kts

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

11
deob-ast/build.gradle.kts

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

10
deob-bytecode/build.gradle.kts

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

2
deob/build.gradle.kts

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

2
game/build.gradle.kts

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

64
gradle/libs.versions.toml

@ -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"]

6
http/build.gradle.kts

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

2
inject/build.gradle.kts

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

6
json/build.gradle.kts

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

15
net/build.gradle.kts

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

6
patcher/build.gradle.kts

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

2
protocol/build.gradle.kts

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

2
settings.gradle.kts

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

2
util/build.gradle.kts

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

8
yaml/build.gradle.kts

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

Loading…
Cancel
Save