63 lines
1.9 KiB
Text
63 lines
1.9 KiB
Text
load("@rules_jvm_external//:defs.bzl", "artifact")
|
|
load("@rules_java//java:java_library.bzl", "java_library")
|
|
load("@rules_java//java:java_binary.bzl", "java_binary")
|
|
load("@rules_jvm_external//:defs.bzl", "artifact", "java_plugin_artifact")
|
|
|
|
java_library(
|
|
name = "api",
|
|
srcs = glob(["api/main/java/**/*.java"]),
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//core/common",
|
|
artifact("site.lab0x13.scrow:commands-common"),
|
|
artifact("com.velocitypowered:velocity-api"),
|
|
artifact("site.lab0x13.scrow:commands-velocity"),
|
|
],
|
|
exports = [
|
|
"//core/common",
|
|
artifact("site.lab0x13.scrow:commands-common"),
|
|
artifact("site.lab0x13.scrow:commands-velocity"),
|
|
artifact("org.mongodb:bson"),
|
|
],
|
|
neverlink = True,
|
|
)
|
|
|
|
java_binary(
|
|
name = "_plugin",
|
|
srcs = glob(["plugin/main/java/**/*.java", "api/main/java/**/*.java"]),
|
|
create_executable = False,
|
|
deps = [
|
|
":api",
|
|
"//core/common",
|
|
artifact("site.lab0x13.scrow:commands-common"),
|
|
artifact("com.velocitypowered:velocity-api"),
|
|
artifact("com.google.inject:guice"),
|
|
artifact("io.nats:jnats"),
|
|
artifact("site.lab0x13.scrow:commands-velocity"),
|
|
artifact("org.mongodb:bson"),
|
|
artifact("org.postgresql:postgresql"),
|
|
artifact("com.google.code.gson:gson"),
|
|
],
|
|
plugins = [
|
|
java_plugin_artifact(
|
|
"com.velocitypowered:velocity-api",
|
|
"com.velocitypowered.api.plugin.ap.PluginAnnotationProcessor",
|
|
),
|
|
],
|
|
)
|
|
|
|
genrule(
|
|
name = "plugin",
|
|
srcs = [":_plugin_deploy.jar"],
|
|
outs = ["plugin.jar"],
|
|
cmd = "cp $< $@",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
load("//rules:publish_plugin.bzl", "publish_plugin")
|
|
publish_plugin(
|
|
name = "plugin-publish",
|
|
package = "core-velocity",
|
|
filename = "CoreVelocity.jar",
|
|
src = ":plugin",
|
|
)
|