Skip to content

Commit

Permalink
Fix dependency conflicts (#2473)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImMorpheus authored Nov 12, 2023
1 parent 925b932 commit 8892083
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
22 changes: 19 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,17 @@ dependencies {
val junitVersion: String by project
val mockitoVersion: String by project
val pluginSpiVersion: String by project
val checkerVersion: String by project

// Directly tied to what's available from Minecraft
api("org.apache.logging.log4j:log4j-api:$log4jVersion")
api("com.google.code.gson:gson:$gsonVersion")

// Adventure
api(platform("net.kyori:adventure-bom:$adventureVersion"))
api("net.kyori:adventure-api")
api("net.kyori:adventure-api") {
exclude(group = "org.jetbrains", module = "annotations")
}
api("net.kyori:adventure-text-serializer-gson") {
exclude(group = "com.google.code.gson", module = "gson")
exclude(group = "net.kyori", module = "adventure-api")
Expand All @@ -67,16 +70,25 @@ dependencies {
exclude(group = "com.google.code.findbugs", module = "jsr305") // We don't want to use jsr305, use checkerframework
exclude(group = "javax.inject", module = "javax.inject")
exclude(group = "com.google.guava", module = "guava") // We use an older version than Guice does
exclude(group = "org.ow2.asm", module = "asm")
}

// High performance cache + guava - shaded guava
api("com.github.ben-manes.caffeine:caffeine:$caffeineVersion") {
exclude(group = "org.checkerframework", module = "checker-qual")
exclude(group = "com.google.errorprone", module = "error_prone_annotations")
exclude(group = "org.junit", module = "junit-bom")
exclude(group = "org.yaml", module = "snakeyaml")
exclude(group = "com.fasterxml.jackson", module = "jackson-bom")
exclude(group = "org.ow2.asm", module = "asm-bom")
}

// Plugin spi, includes plugin-meta
api("org.spongepowered:plugin-spi:$pluginSpiVersion")
api("org.spongepowered:plugin-spi:$pluginSpiVersion") {
exclude(group = "org.checkerframework", module = "checker-qual")
exclude(group = "com.google.code.gson", module = "gson")
exclude(group = "org.apache.logging.log4j", module = "log4j-api")
}

// Configurate
api(platform("org.spongepowered:configurate-bom:$configurateVersion"))
Expand Down Expand Up @@ -106,7 +118,11 @@ dependencies {
errorprone("com.google.errorprone:error_prone_core:$errorproneVersion")

// Math library
api("org.spongepowered:math:$mathVersion")
api("org.spongepowered:math:$mathVersion") {
exclude(group = "com.google.errorprone", module = "error_prone_annotations")
}

compileOnlyApi("org.checkerframework:checker-qual:$checkerVersion")

testImplementation(platform("org.junit:junit-bom:$junitVersion"))
testImplementation("org.junit.jupiter:junit-jupiter-api")
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ log4jVersion=2.19.0
mathVersion=2.0.1
mockitoVersion=4.8.0
pluginSpiVersion=0.3.0
checkerVersion=3.26.0

0 comments on commit 8892083

Please sign in to comment.