mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 22:15:45 +00:00
dependency catalog & relocations
This commit is contained in:
1 parent
407de5479e
commit
6637830e86
9 files changed
+298
-209
No files matched your search
@@ -1,33 +0,0 @@
|
||||
package net.draycia.carbon
|
||||
|
||||
// Misc
|
||||
const val CHECKSTYLE_VER = "8.34"
|
||||
const val CHECKER_QUAL_VER = "3.13.0"
|
||||
const val GUAVA_VER = "26.0-jre"
|
||||
const val STYLECHECK_VER = "0.1-SNAPSHOT"
|
||||
const val MOONSHINE_VER = "0.2.4-SNAPSHOT"
|
||||
const val CLOUD_VER = "1.5.0-SNAPSHOT"
|
||||
const val CONFIGURATE_VER = "4.1.1-SNAPSHOT"
|
||||
|
||||
// Kyori
|
||||
const val ADVENTURE_VER = "4.7.0"
|
||||
const val ADVENTURE_PLATFORM_VER = "4.0.0-SNAPSHOT"
|
||||
const val MINIMESSAGE_VER = "4.1.0-SNAPSHOT"
|
||||
const val KYORI_EVENT_API_VER = "3.0.0"
|
||||
const val KYORI_REGISTRY_VER = "1.0.0-SNAPSHOT"
|
||||
const val BSTATS_VER = "2.2.1"
|
||||
|
||||
// Common
|
||||
const val LETTUCE_CORE_VER = "6.0.0.M1"
|
||||
const val IDB_CORE_VER = "1.0.0-SNAPSHOT"
|
||||
const val HIKARI_VER = "2.4.1"
|
||||
const val GSON_VER = "2.8.0"
|
||||
|
||||
// Bukkit
|
||||
const val PAPER_API_VER = "1.16.5-R0.1-SNAPSHOT"
|
||||
const val SNAKEYAML_VER = "1.27"
|
||||
|
||||
// Plugins
|
||||
const val LUCKPERMS_API_VER = "5.1"
|
||||
const val PLACEHOLDER_API_VER = "2.10.9"
|
||||
const val VAULT_VER = "1.7"
|
||||
@@ -0,0 +1,47 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
/**
|
||||
* Relocate a package into the `net.draycia.carbon.libs` namespace.
|
||||
*/
|
||||
fun ShadowJar.relocateDependency(pkg: String) {
|
||||
relocate(pkg, "net.draycia.carbon.libs.$pkg")
|
||||
}
|
||||
|
||||
/**
|
||||
* Relocates dependencies which we bundle and relocate on all platforms.
|
||||
*/
|
||||
fun ShadowJar.standardRelocations() {
|
||||
relocateDependency("org.bstats")
|
||||
relocateDependency("net.kyori.adventure.text.minimessage")
|
||||
relocateDependency("net.kyori.adventure.serializer.configurate4")
|
||||
relocateDependency("net.kyori.event")
|
||||
relocateDependency("net.kyori.registry")
|
||||
relocateDependency("cloud.commandframework")
|
||||
relocateDependency("org.spongepowered.configurate")
|
||||
relocateDependency("com.typesafe.config")
|
||||
relocateDependency("com.google.common")
|
||||
relocateDependency("com.google.thirdparty.publicsuffix")
|
||||
relocateDependency("com.proximyst.moonshine")
|
||||
relocateDependency("it.unimi.dsi.fastutil")
|
||||
}
|
||||
|
||||
fun ShadowJar.configureShadow() {
|
||||
minimize()
|
||||
|
||||
standardRelocations()
|
||||
|
||||
doLast {
|
||||
val archive = archiveFile.get().asFile
|
||||
val libs = project.rootProject.buildDir.resolve("libs")
|
||||
libs.mkdirs()
|
||||
archive.copyTo(libs.resolve(archive.name), overwrite = true)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// not needed at runtime
|
||||
exclude(dependency("com.google.code.findbugs:jsr305"))
|
||||
exclude(dependency("org.checkerframework:checker-qual"))
|
||||
exclude(dependency("com.google.errorprone:error_prone_annotations"))
|
||||
exclude(dependency("com.google.j2objc:j2objc-annotations"))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user