Skip to content

Commit

Permalink
Update shadowjar and gradle file
Browse files Browse the repository at this point in the history
  • Loading branch information
Syrent committed Aug 30, 2023
1 parent 2981984 commit 2c472b9
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
import io.papermc.hangarpublishplugin.model.Platforms
import org.jetbrains.gradle.ext.settings
import org.jetbrains.gradle.ext.taskTriggers
Expand All @@ -8,10 +7,10 @@ import java.util.concurrent.Executors
import java.io.ByteArrayOutputStream

plugins {
kotlin("jvm") version "1.9.0"
kotlin("jvm") version "1.9.10"
id("maven-publish")
id("java")
id("com.github.johnrengelman.shadow") version "7.1.2"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7"
id("org.screamingsandals.nms-mapper") version "1.4.5"
id("xyz.jpenilla.run-paper") version "2.1.0"
Expand Down Expand Up @@ -142,14 +141,6 @@ tasks {
folia.registerTask()
}

val relocate = task<ConfigureShadowRelocation>("relocateShadowJar") {
target = shadowJar.get()
prefix = "ir.syrent.velocityvanish"
this.target.apply {
relocate("net.kyori.", "net.kyori.")
}
}

compileJava {
options.encoding = Charsets.UTF_8.name()
}
Expand Down Expand Up @@ -186,9 +177,17 @@ tasks {

shadowJar {
dependsOn(extraDeps)
dependsOn(relocate)
archiveClassifier.set("")
exclude("META-INF/**")
from("LICENSE")
minimize()

relocate("io.papermc.lib", "ir.syrent.velocityvanish.dependencies.io.papermc.lib")
relocate("org.bstats", "ir.syrent.velocityvanish.dependencies.org.bstats")
relocate("com.google.code.gson", "ir.syrent.velocityvanish.dependencies.com.google.code.gson")
relocate("com.github.cryptomorin", "ir.syrent.velocityvanish.dependencies.com.github.cryptomorin")
relocate("cloud.commandframework", "ir.syrent.velocityvanish.dependencies.cloud.commandframework")
relocate("com.jeff_media", "ir.syrent.velocityvanish.dependencies.com.jeff_media")
}

build {
Expand Down

0 comments on commit 2c472b9

Please sign in to comment.