42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
@file:Suppress("VulnerableLibrariesLocal")
|
|
|
|
evaluationDependsOn(":ball-common")
|
|
|
|
dependencies {
|
|
api(project(":ball-common")) { isTransitive = false }
|
|
compileOnly("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
|
|
annotationProcessor("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
|
|
compileOnly("cn.hamster3.mc.plugin:core-common:+")
|
|
}
|
|
|
|
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 })
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
withSourcesJar()
|
|
}
|
|
|
|
tasks {
|
|
withType<Jar> {
|
|
archiveBaseName = "HamsterBall-Velocity"
|
|
}
|
|
shadowJar {
|
|
destinationDirectory = rootProject.layout.buildDirectory
|
|
}
|
|
}
|