feat: 1.3.3 稳定版

This commit is contained in:
2024-03-24 13:36:27 +08:00
parent 86bd28e134
commit e2a8cc236e
4 changed files with 7 additions and 55 deletions

View File

@@ -1,12 +1,7 @@
@file:Suppress("VulnerableLibrariesLocal")
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
evaluationDependsOn(":core-common")
val shade = configurations.create("shade")
val shadeJava8 = configurations.create("shadeJava8")
dependencies {
api(project(":core-common")) { isTransitive = false }
compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT")
@@ -37,11 +32,8 @@ dependencies {
implementation("de.tr7zw:item-nbt-api:2.12.2")
// https://mvnrepository.com/artifact/com.zaxxer/HikariCP
implementation("com.zaxxer:HikariCP:4.0.3") { exclude(group = "org.slf4j") }
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib
shade("org.jetbrains.kotlin:kotlin-stdlib:1.9.23") { exclude(group = "org.jetbrains") }
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib-jdk8
shadeJava8("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.23") { exclude(group = "org.jetbrains") }
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.23") { exclude(group = "org.jetbrains") }
}
tasks {
@@ -54,23 +46,8 @@ tasks {
archiveBaseName = "HamsterCore-Bukkit"
}
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")
archiveClassifier = "Java8"
from(project.configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
from(processResources.get().outputs)
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)
}
}