feat: 新增 Velocity 支持
This commit is contained in:
@@ -5,13 +5,11 @@ plugins {
|
||||
}
|
||||
|
||||
group = "cn.hamster3.mc.plugin"
|
||||
version = "1.4.5"
|
||||
version = "1.5.0"
|
||||
description = "将 HamsterBall 转换成 HamsterService 兼容的 API"
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = uri("https://maven.airgame.net/maven-public/")
|
||||
}
|
||||
maven("https://maven.airgame.net/maven-public/")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -20,13 +18,31 @@ dependencies {
|
||||
|
||||
compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT")
|
||||
compileOnly("net.md-5:bungeecord-api:1.20-R0.1-SNAPSHOT")
|
||||
compileOnly("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
|
||||
annotationProcessor("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
|
||||
|
||||
compileOnly("cn.hamster3.mc.plugin:core-bukkit:+")
|
||||
compileOnly("cn.hamster3.mc.plugin:ball-bukkit:+")
|
||||
|
||||
compileOnly("me.clip:placeholderapi:2.11.2")
|
||||
compileOnly("me.clip:placeholderapi:2.11.6")
|
||||
}
|
||||
|
||||
sourceSets.create("templates") {
|
||||
java {
|
||||
srcDir("src/main/templates")
|
||||
}
|
||||
}
|
||||
|
||||
val templateSource = file("src/main/templates")
|
||||
val templateDest = layout.buildDirectory.dir("generated/sources/templates")
|
||||
val generateTemplates = tasks.register<Copy>("generateTemplates") {
|
||||
from(templateSource)
|
||||
into(templateDest)
|
||||
expand(project.properties)
|
||||
}
|
||||
|
||||
sourceSets.main.get().java.srcDir(generateTemplates.map { it.outputs })
|
||||
|
||||
tasks {
|
||||
withType<JavaCompile>().configureEach {
|
||||
options.encoding = "UTF-8"
|
||||
@@ -36,8 +52,6 @@ tasks {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
withSourcesJar()
|
||||
}
|
||||
jar {
|
||||
@@ -45,9 +59,9 @@ tasks {
|
||||
destinationDirectory = rootProject.layout.buildDirectory
|
||||
}
|
||||
processResources {
|
||||
filesMatching(listOf("plugin.yml", "bungee.yml")) {
|
||||
filesMatching(listOf("plugin.yml", "bungee.yml", "update.yml")) {
|
||||
expand(project.properties)
|
||||
}
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user