-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWHISK.BL
More file actions
87 lines (62 loc) · 3.78 KB
/
WHISK.BL
File metadata and controls
87 lines (62 loc) · 3.78 KB
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
77
78
79
80
81
82
83
84
85
86
87
import whisk,examples
# Declare goals and rules that can be used from other BL files in this project
export main,whisk,unit_tests,integration_tests,test
# Define goals that can be called
whisk = build_jar(
archives=main,
files= rglob(pattern='**', root='src/main/resources'),
main_class='org.whisk.MainKt')
main = kotlin_compile(
compiler= kotlin_compiler_deps,
srcs = [main_srcs, grammar],
exported_cp=[log4j2_api, log4j2_core, implementation_deps, antlr4_runtime, whisk_protobuf_lib],
cp=[kotlin_compiler_deps, antlr4_compiler, checkstyle_deps, ktlint_deps, mybatis_generator_core, h2_db_mvn],
kapt_processors=[dagger_compiler])
main_srcs = glob('src/main/kotlin/**.kt')
run_lint = kt_lint(linter=ktlint_deps, srcs=main_srcs, ignore_errors=true)
whisk_protobuf_lib = java_compile(
srcs = protobuf_gen,
exported_cp = protobuf_java
)
unit_tests = kotlin_test(
compiler= kotlin_compiler_deps,
srcs=[glob('src/test/kotlin/**.kt')],
cp=[main, test_deps, junit4],
friend_paths=main)
kotlin_compiler_deps = maven_library(artifacts=[
'org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50',
'org.jetbrains.kotlin:kotlin-annotation-processing-embeddable:1.3.50'])
integration_tests = build_examples
test = [unit_tests, run_lint, integration_tests]
# Non-exposed goals that help building up the dependency graph
grammar = antlr_gen(tool=antlr4_compiler, srcs=glob('src/main/antlr/**.g4'), arguments = '-visitor')
protobuf_gen = protocol_compile(dist=protoc, srcs=glob('src/main/proto/**.proto'), imports='src/main/proto')
protoc = [on_windows(protoc_windows), on_linux(protoc_linux)]
protoc_linux = remote_file(url='https://github.com/protocolbuffers/protobuf/releases/download/v3.10.0/protoc-3.10.0-linux-x86_64.zip')
protoc_windows = remote_file(url='https://github.com/protocolbuffers/protobuf/releases/download/v3.10.0/protoc-3.10.0-win64.zip')
antlr4_runtime = prebuilt_jar('lib/antlr4-runtime-4.7.2.jar')
junit4 = remote_file(url='http://central.maven.org/maven2/junit/junit/4.12/junit-4.12.jar')
log4j2_api = remote_file(url='http://central.maven.org/maven2/org/apache/logging/log4j/log4j-api/2.12.1/log4j-api-2.12.1.jar')
log4j2_core = remote_file(url='http://central.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.12.1/log4j-core-2.12.1.jar')
dagger_compiler = maven_library(artifacts=['com.google.dagger:dagger-compiler:2.22.1'])
checkstyle_deps = maven_library(artifacts='com.puppycrawl.tools:checkstyle:8.25')
antlr4_compiler = maven_library(artifacts=['org.antlr:antlr4:4.7.2'])
protobuf_java = maven_library(artifacts='com.google.protobuf:protobuf-java:3.10.0')
implementation_deps = maven_library(
artifacts=['org.apache.maven:maven-resolver-provider:3.6.1',
'org.apache.maven.resolver:maven-resolver-transport-http:1.4.0',
'org.apache.maven.resolver:maven-resolver-connector-basic:1.4.0',
'com.google.dagger:dagger:2.24',
'org.jetbrains.kotlin:kotlin-reflect:1.3.50',
'org.jetbrains.kotlin:kotlin-stdlib:1.3.50',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.50',
'org.apache.logging.log4j:log4j-iostreams:2.12.1',
'org.apache.logging.log4j:log4j-slf4j-impl:2.12.1',
'org.apache.ant:ant-junit:1.10.6',
'org.ow2.asm:asm:7.2',
'com.github.javaparser:javaparser-core:3.15.0'])
test_deps = maven_library(artifacts=['org.assertj:assertj-core:3.13.2'])
ktlint_deps = maven_library(artifacts='com.pinterest:ktlint:0.35.0')
mybatis_generator_core = maven_library(artifacts='org.mybatis.generator:mybatis-generator-core:1.3.7')
# sonarlint_core = maven_library(artifacts='org.sonarsource.sonarlint.core:sonarlint-core:4.6.0.2652')
h2_db_mvn = maven_library(artifacts='com.h2database:h2:1.4.200')