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