67 lines
1.9 KiB
Plaintext
67 lines
1.9 KiB
Plaintext
@file:Suppress("VulnerableLibrariesLocal")
|
|
|
|
evaluationDependsOn(":core-common")
|
|
evaluationDependsOn(":core-relocate-lettuce")
|
|
|
|
val shade = configurations.create("shade")
|
|
|
|
dependencies {
|
|
api(project(":core-common")) { isTransitive = false }
|
|
compileOnly("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
|
|
annotationProcessor("com.velocitypowered:velocity-api:3.3.0-SNAPSHOT")
|
|
|
|
compileOnlyApi("net.kyori:adventure-platform-api:4.3.2") { isTransitive = false }
|
|
|
|
implementation("com.zaxxer:HikariCP:5.1.0") { isTransitive = false }
|
|
api("redis.clients:jedis:5.1.4") {
|
|
exclude(group = "com.google.code.gson")
|
|
exclude(group = "org.slf4j")
|
|
}
|
|
compileOnlyApi("io.lettuce:lettuce-core:6.7.1.RELEASE") {
|
|
exclude(group = "org.slf4j")
|
|
exclude(group = "io.netty")
|
|
}
|
|
shade(project(":core-relocate-lettuce"))
|
|
|
|
// https://mvnrepository.com/artifact/com.mysql/mysql-connector-j
|
|
runtimeOnly("com.mysql:mysql-connector-j:8.4.0")
|
|
}
|
|
|
|
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(rootProject.properties)
|
|
}
|
|
|
|
sourceSets.main.get().java.srcDir(generateTemplates.map { it.outputs })
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
withSourcesJar()
|
|
}
|
|
|
|
tasks {
|
|
withType<Jar> {
|
|
archiveBaseName = "HamsterCore-Velocity"
|
|
}
|
|
shadowJar {
|
|
dependsOn(":core-relocate-lettuce:shadowJar")
|
|
val task = project(":core-relocate-lettuce").tasks.shadowJar.get()
|
|
from(task.outputs.files.map {
|
|
if (it.isDirectory) it else zipTree(
|
|
it
|
|
)
|
|
})
|
|
destinationDirectory = rootProject.layout.buildDirectory
|
|
}
|
|
}
|