Skip to content

Commit

Permalink
Remove universal jar and add bukkit/bungee jar for spigot resources, …
Browse files Browse the repository at this point in the history
…also reorganize project directory structure
  • Loading branch information
jpenilla committed Aug 28, 2022
1 parent fc7b78f commit 4cad4d4
Show file tree
Hide file tree
Showing 29 changed files with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ tasks.jar {
val platforms = setOf(
projects.minimotdBukkit,
projects.minimotdBungeecord,
projects.minimotdVelocity,
projects.minimotdFabric,
projects.minimotdSponge7,
projects.minimotdSponge8
).map { it.dependencyProject }

val universal = tasks.register<Jar>("universal") {
val dist = tasks.register<Jar>("bukkitAndBungeeJar") {
artifacts.add("archives", this)
archiveClassifier.set(null as String?)
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
Expand All @@ -27,5 +23,5 @@ val universal = tasks.register<Jar>("universal") {
}

miniMOTDPlatform {
jarTask.set(universal)
jarTask.set(dist)
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ tasks {
minecraftVersion("1.19.2")
}
shadowJar {
platformRelocation("bukkit", "xyz.jpenilla.minimotd.common")
commonRelocation("org.slf4j")
commonRelocation("io.leangen.geantyref")
commonRelocation("net.kyori")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies {

tasks {
shadowJar {
platformRelocation("bungee", "xyz.jpenilla.minimotd.common")
commonRelocation("io.leangen.geantyref")
commonRelocation("net.kyori")
commonRelocation("org.bstats")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ tasks {
configurations = listOf(shade)
commonConfiguration()
commonRelocation("io.leangen.geantyref")
platformRelocation("fabric", "xyz.jpenilla.minimotd.common")
}
remapJar {
archiveFileName.set("${project.name}-mc$minecraftVersion-${project.version}.jar")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ sponge {
tasks {
shadowJar {
configureForNativeAdventurePlatform()
platformRelocation("sponge8", "xyz.jpenilla.minimotd.common")
dependencies {
exclude(dependency("io.leangen.geantyref:geantyref"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ tasks {
shadowJar {
configureForNativeAdventurePlatform()
commonRelocation("io.leangen.geantyref")
platformRelocation("velocity", "xyz.jpenilla.minimotd.common")
commonRelocation("org.bstats")
}
}
Expand Down
19 changes: 13 additions & 6 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,23 @@ plugins {

rootProject.name = "MiniMOTD"

fun setup(name: String, dir: String) {
include(name)
project(":$name").projectDir = file(dir)
}

fun platform(name: String) = setup("minimotd-$name", "platform/$name")
fun dist(name: String) = setup("minimotd-$name", "dist/$name")

setup("minimotd-common", "common")

sequenceOf(
"common",
"bukkit",
"sponge8",
"sponge7",
"bungeecord",
"velocity",
"fabric",
"universal"
).forEach {
include("minimotd-$it")
project(":minimotd-$it").projectDir = file(it)
}
).forEach(::platform)

dist("bukkit-bungeecord")

0 comments on commit 4cad4d4

Please sign in to comment.