Skip to content

Commit

Permalink
build now depends on jar, moved everything to shadow conventions from…
Browse files Browse the repository at this point in the history
… shadowJar task
  • Loading branch information
Dawsson committed Jul 1, 2024
1 parent f98030e commit a8e40a9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
17 changes: 17 additions & 0 deletions buildSrc/src/main/kotlin/pp.shadow-convention.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

/*
* This file was generated by the Gradle 'init' task.
*/

plugins {
id("com.github.johnrengelman.shadow")
}

tasks {
val shadowJar = named<ShadowJar>("shadowJar") {
archiveClassifier.set("")
archiveFileName.set("PluginPortal-${project.version}.jar")


minimize()
relocate("com.google.gson", "gg.flyte.pluginportal.libs.gson")
relocate("org.bstats", "gg.flyte.pluginportal.libs.bstats")
}
named("build") {
dependsOn(shadowJar)
}
}
11 changes: 2 additions & 9 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("pp.kotlin-library-conventions")
id("pp.shadow-convention")
Expand Down Expand Up @@ -45,15 +47,6 @@ tasks {
)
}

shadowJar {
archiveClassifier.set("")
archiveFileName.set("PluginPortal-${project.version}.jar")


minimize()
relocate("com.google.gson", "gg.flyte.pluginportal.libs.gson")
relocate("org.bstats", "gg.flyte.pluginportal.libs.bstats")
}
}

// Source: https://github.com/ViaVersion/ViaVersion/blob/dc503cd613f5cf00a6f11b78e52b1a76a42acf91/universal/build.gradle.kts
Expand Down

0 comments on commit a8e40a9

Please sign in to comment.