Update Guice to 7.0.0 (#430)

Co-authored-by: Josua Parks <[email protected]>
This commit is contained in:
Jason PenillaandJosua Parks authored and GitHub committed 2024-06-11 19:58:24 -07:00
1 parent 5541935653
commit 2a2e76f491
10 files changed
+90 -38

No files matched your search

+30 -3
View File
@@ -1,11 +1,18 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("carbon.shadow-platform")
id("xyz.jpenilla.run-velocity")
}
val bstats: Configuration by configurations.creating
configurations.compileOnly {
extendsFrom(bstats)
}
dependencies {
implementation(projects.carbonchatCommon)
implementation(libs.bstatsVelocity)
bstats(libs.bstatsVelocity)
compileOnly(libs.velocityApi)
@@ -13,26 +20,46 @@ dependencies {
compileOnly(libs.miniplaceholders)
runtimeDownload(libs.mysql)
compileOnly("javax.inject:javax.inject:1")
}
gremlin {
defaultJarRelocatorDependencies.set(true)
}
runVelocityExtension.detectPluginJar = false
tasks {
val bStatsJar = register<ShadowJar>("bStatsShadowJar") {
archiveClassifier = "bStats"
configurations = listOf(bstats)
relocateDependency("org.bstats")
}
shadowJar {
archiveClassifier = "shadowJar"
relocateCloud()
standardRuntimeRelocations()
relocateDependency("com.google.inject.assistedinject")
relocateDependency("io.leangen.geantyref")
relocateGuice()
}
val prod = register<Zip>("productionJar") {
destinationDirectory.set(layout.buildDirectory.dir("libs"))
archiveFileName.set("carbonchat-velocity-${project.version}.jar")
from(zipTree(shadowJar.flatMap { it.archiveFile }))
from(zipTree(bStatsJar.flatMap { it.archiveFile })) {
exclude("META-INF/**")
}
}
carbonPlatform.productionJar = prod.flatMap { it.archiveFile }
writeDependencies {
standardRuntimeRelocations()
relocateDependency("com.google.inject.assistedinject")
relocateDependency("io.leangen.geantyref")
relocateGuice()
}
runVelocity {
velocityVersion(libs.versions.velocityApi.get())
pluginJars.from(prod)
downloadPlugins {
url("https://download.luckperms.net/1533/velocity/LuckPerms-Velocity-5.4.120.jar")
github("MiniPlaceholders", "MiniPlaceholders", libs.versions.miniplaceholders.get(), "MiniPlaceholders-Velocity-${libs.versions.miniplaceholders.get()}.jar")