Remove universal jar and add bukkit/bungee jar for spigot resources, also reorganize project directory structure

This commit is contained in:
Jason Penilla committed 2022-08-28 13:41:48 -07:00
1 parent fc7b78f7a8
commit 4cad4d461b
29 files changed
+17 -15

No files matched your search

@@ -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
@@ -27,5 +23,5 @@ val universal = tasks.register<Jar>("universal") {
}
miniMOTDPlatform {
jarTask.set(universal)
jarTask.set(dist)
}
@@ -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")
@@ -12,6 +12,7 @@ dependencies {
tasks {
shadowJar {
platformRelocation("bungee", "xyz.jpenilla.minimotd.common")
commonRelocation("io.leangen.geantyref")
commonRelocation("net.kyori")
commonRelocation("org.bstats")
@@ -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")
File renamed without changes.
@@ -41,7 +41,6 @@ sponge {
tasks {
shadowJar {
configureForNativeAdventurePlatform()
platformRelocation("sponge8", "xyz.jpenilla.minimotd.common")
dependencies {
exclude(dependency("io.leangen.geantyref:geantyref"))
}
@@ -14,7 +14,6 @@ tasks {
shadowJar {
configureForNativeAdventurePlatform()
commonRelocation("io.leangen.geantyref")
platformRelocation("velocity", "xyz.jpenilla.minimotd.common")
commonRelocation("org.bstats")
}
}
+13 -6
View File
@@ -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")