forked from jorunfa/kotlin-javalin-bazel-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
54 lines (48 loc) · 1.05 KB
/
BUILD
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
load("@rules_java//java:defs.bzl", "java_binary", "java_library", "java_test")
load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")
package(default_visibility = ["//visibility:public"])
java_binary(
name = "server",
data = [
],
main_class = "com.example.MainKt",
runtime_deps = [
":server_lib",
],
)
kt_jvm_library(
name = "server_lib",
srcs = glob(
include = [
"src/main/kotlin/**/*.kt",
],
),
deps = [
"@maven//:io_javalin_javalin",
"@maven//:org_slf4j_slf4j_simple",
],
)
java_library(
name = "java_test_deps",
testonly = True,
exports = [
"@maven//:io_javalin_javalin",
"@maven//:junit_junit",
"@maven//:org_assertj_assertj_core",
],
)
kt_jvm_library(
name = "kotlin_test_deps",
testonly = True,
srcs = glob(["src/test/kotlin/**/*.kt"]),
deps = [
":java_test_deps",
],
)
java_test(
name = "tests",
test_class = "com.example.HelloTest",
runtime_deps = [
":kotlin_test_deps",
],
)