Fix the common module being relocated due to adventure

Making a single distributable jar with adventure is fun
This commit is contained in:
Frank van der Heijden 2021-10-05 12:46:45 +02:00
parent f5636c082e
commit 15e3ba306c
No known key found for this signature in database
GPG key ID: B808721C2DD5B5B8
5 changed files with 47 additions and 12 deletions

View file

@ -76,6 +76,10 @@ subprojects {
relocate 'cloud.commandframework', dependencyDir + '.cloud'
relocate 'me.lucko.commodore', dependencyDir + '.commodore'
relocate 'io.leangen.geantyref', dependencyDir + '.typetoken'
relocate 'net.kyori.adventure', dependencyDir + '.adventure'
relocate 'net.kyori.examination', dependencyDir + '.examination'
relocate 'net.kyori.adventure.text.minimessage', dependencyDir + '.adventure.text.minimessage'
relocate 'dev.frankheijden.minecraftreflection', dependencyDir + '.minecraftreflection'
}
shadowJar.dependsOn checkstyleMain, checkstyleTest, test
@ -90,11 +94,14 @@ dependencies {
implementation project(path: ':Bukkit', configuration: 'shadow')
implementation project(path: ':Bungee', configuration: 'shadow')
implementation project(path: ':Velocity', configuration: 'shadow')
implementation("net.kyori:adventure-text-serializer-gson:${rootProject.adventureVersion}") {
exclude group: 'net.kyori', module: 'adventure-api'
exclude group: 'com.google.code.gson', module: 'gson'
}
}
shadowJar {
relocate 'org.apache.commons.codec', dependencyDir + '.codec'
relocate 'dev.frankheijden.minecraftreflection', dependencyDir + '.minecraftreflection'
relocate 'net.kyori.adventure.text.serializer.gson', dependencyDir + '.impl.adventure.text.serializer.gson'
archiveFileName = "${archiveBaseName.orNull}-${archiveVersion.orNull}.${archiveExtension.orNull}"
}