generated from gutmox/vertx-boost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
76 lines (70 loc) · 1.96 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
load("@io_bazel_rules_docker//java:image.bzl", "java_image")
load(
"@io_bazel_rules_docker//container:container.bzl",
"container_image",
"container_pull",
"container_push",
)
java_library(
name = "all-external-targets",
srcs = glob(["**/src/main/java/**/*.java"]),
resources = glob(["**/src/main/resources/**"]),
visibility = ["//visibility:public"],
deps = [
"@maven//:io_vertx_vertx_core",
"@maven//:io_vertx_vertx_rx_java2",
"@maven//:io_vertx_vertx_redis_client",
"@maven//:io_vertx_vertx_web",
"@maven//:io_reactivex_rxjava2_rxjava",
],
)
java_library(
name = "units-tests-deps",
srcs = glob(["**/src/test/java/**/*.java"]),
resources = glob(["**/src/test/resources/**"]),
visibility = ["//visibility:public"],
deps = [
":all-external-targets",
"@maven_test//:org_assertj_assertj_core",
"@maven_test//:org_junit_jupiter_junit_jupiter_api",
"@maven_test//:org_junit_jupiter_junit_jupiter_engine",
"@maven_test//:org_junit_platform_junit_platform_console",
],
)
java_test(
name = "tests",
srcs = glob([
"*.java",
]),
args = ["--select-package=com.gutmox"],
main_class = "org.junit.platform.console.ConsoleLauncher",
use_testrunner = False,
visibility = ["//visibility:public"],
runtime_deps = [
":units-tests-deps",
],
)
java_binary(
name = "service",
main_class = "io.vertx.core.Launcher",
args = ["run com.gutmox.MainVerticle"],
deploy_manifest_lines = ["Main-Verticle: com.gutmox.MainVerticle"],
visibility = ["//visibility:public"],
runtime_deps = [":all-external-targets"],
)
container_image(
name = "container",
base = "@openjdk//image",
cmd = [
"java",
"-jar",
"service_deploy.jar",
],
env = {
"TZ": "Europe/Madrid",
"VERTX_CONFIG_PATH": "/config.yaml",
},
files = [
":service_deploy.jar",
],
)