Skip to content

Commit

Permalink
Update dependencies and use version catalog (#2652)
Browse files Browse the repository at this point in the history
  • Loading branch information
MinnDevelopment committed Apr 16, 2024
1 parent 6062ea4 commit 827f29b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 17 deletions.
31 changes: 15 additions & 16 deletions build.gradle.kts
Expand Up @@ -36,7 +36,7 @@ plugins {

id("io.codearte.nexus-staging") version "0.30.0"
id("de.marcphilipp.nexus-publish") version "0.4.0"
id("com.github.johnrengelman.shadow") version "7.1.2"
id("com.github.johnrengelman.shadow") version "8.1.1"
}

val javaVersion = JavaVersion.current()
Expand Down Expand Up @@ -97,33 +97,32 @@ dependencies {
/* ABI dependencies */

//Code safety
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
compileOnly("org.jetbrains:annotations:23.0.0")
compileOnly(libs.findbugs)
compileOnly(libs.jetbrains.annotations)

//Logger
api("org.slf4j:slf4j-api:1.7.36")
api(libs.slf4j)

//Web Connection Support
api("com.neovisionaries:nv-websocket-client:2.14")
api("com.squareup.okhttp3:okhttp:4.12.0")
api(libs.websocket.client)
api(libs.okhttp)

//Opus library support
api("club.minnced:opus-java:1.1.1")
api(libs.opus)

//Collections Utility
api("org.apache.commons:commons-collections4:4.4")
api(libs.commons.collections)

//we use this only together with opus-java
// if that dependency is excluded it also doesn't need jna anymore
// since jna is a transitive runtime dependency of opus-java we don't include it explicitly as dependency
compileOnly("net.java.dev.jna:jna:4.4.0")
compileOnly(libs.jna)

/* Internal dependencies */

//General Utility
implementation("net.sf.trove4j:trove4j:3.0.3")
implementation("com.fasterxml.jackson.core:jackson-core:2.16.0")
implementation("com.fasterxml.jackson.core:jackson-databind:2.16.0")
implementation(libs.trove4j)
implementation(libs.bundles.jackson)

//Sets the dependencies for the examples
configurations["examplesImplementation"].withDependencies {
Expand All @@ -132,10 +131,10 @@ dependencies {
addAll(configurations["compileOnly"].allDependencies)
}

testImplementation("org.junit.jupiter:junit-jupiter:5.10.1")
testImplementation("org.reflections:reflections:0.10.2")
testImplementation("org.mockito:mockito-core:5.8.0")
testImplementation("org.assertj:assertj-core:3.25.3")
testImplementation(libs.junit)
testImplementation(libs.reflections)
testImplementation(libs.mockito)
testImplementation(libs.assertj)
}

val compileJava: JavaCompile by tasks
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
26 changes: 26 additions & 0 deletions settings.gradle.kts
@@ -1 +1,27 @@
rootProject.name = "JDA"

dependencyResolutionManagement {
versionCatalogs {
create("libs") {
version("jackson", "2.16.0")
library("jackson-core", "com.fasterxml.jackson.core", "jackson-core").versionRef("jackson")
library("jackson-databind", "com.fasterxml.jackson.core", "jackson-databind").versionRef("jackson")
bundle("jackson", listOf("jackson-core", "jackson-databind"))

library("opus", "club.minnced", "opus-java" ).version("1.1.1")
library("findbugs", "com.google.code.findbugs", "jsr305" ).version("3.0.2")
library("websocket-client", "com.neovisionaries", "nv-websocket-client" ).version("2.14")
library("okhttp", "com.squareup.okhttp3", "okhttp" ).version("4.12.0")
library("jna", "net.java.dev.jna", "jna" ).version("5.14.0")
library("trove4j", "net.sf.trove4j", "core" ).version("3.1.0")
library("commons-collections", "org.apache.commons", "commons-collections4").version("4.4")
library("commons-lang3", "org.apache.commons", "commons-lang3" ).version("3.14.0")
library("assertj", "org.assertj", "assertj-core" ).version("3.25.3")
library("jetbrains-annotations", "org.jetbrains", "annotations" ).version("24.1.0")
library("junit", "org.junit.jupiter", "junit-jupiter" ).version("5.10.2")
library("mockito", "org.mockito", "mockito-core" ).version("5.11.0")
library("reflections", "org.reflections", "reflections" ).version("0.10.2")
library("slf4j", "org.slf4j", "slf4j-api" ).version("1.7.36")
}
}
}

0 comments on commit 827f29b

Please sign in to comment.