build: 优化构建脚本
This commit is contained in:
@@ -55,10 +55,6 @@ subprojects {
|
||||
expand(map)
|
||||
}
|
||||
}
|
||||
shadowJar {
|
||||
relocate("de.tr7zw.changeme.nbtapi", "cn.hamster3.mc.plugin.core.lib.de.tr7zw.nbtapi")
|
||||
relocate("de.tr7zw.annotations", "cn.hamster3.mc.plugin.core.lib.de.tr7zw.nbtapi.annotations")
|
||||
}
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
|
@@ -54,6 +54,8 @@ tasks {
|
||||
shadowJar {
|
||||
from(shade.map { if (it.isDirectory) it else zipTree(it) })
|
||||
destinationDirectory = rootProject.layout.buildDirectory
|
||||
relocate("de.tr7zw.changeme.nbtapi", "cn.hamster3.mc.plugin.core.lib.de.tr7zw.nbtapi")
|
||||
relocate("de.tr7zw.annotations", "cn.hamster3.mc.plugin.core.lib.de.tr7zw.nbtapi.annotations")
|
||||
}
|
||||
val shadowJava8 = register<ShadowJar>("shadowJava8") {
|
||||
dependsOn(":core-common:build")
|
||||
|
@@ -60,8 +60,6 @@ tasks {
|
||||
from(jar.get().outputs)
|
||||
from(shadeJava8.map { if (it.isDirectory) it else zipTree(it) })
|
||||
destinationDirectory = rootProject.layout.buildDirectory
|
||||
relocate("de.tr7zw.changeme.nbtapi", "cn.hamster3.mc.plugin.core.lib.de.tr7zw.nbtapi")
|
||||
relocate("de.tr7zw.annotations", "cn.hamster3.mc.plugin.core.lib.de.tr7zw.nbtapi.annotations")
|
||||
}
|
||||
build {
|
||||
dependsOn(shadowJava8)
|
||||
|
Reference in New Issue
Block a user