-
Notifications
You must be signed in to change notification settings - Fork 10
/
BUILD
142 lines (132 loc) · 4.03 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
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
package(default_visibility = ["//visibility:public"])
alias(
name = "google-options",
actual = "@maven//:com_github_pcj_google_options",
)
alias(
name = "guava",
actual = "@maven//:com_google_guava_guava",
)
alias(
name = "protobuf",
actual = "@maven//:com_google_protobuf_protobuf_java",
)
alias(
name = "protobuf_java_util",
actual = "@maven//:com_google_protobuf_protobuf_java_util",
)
alias(
name = "lanterna",
actual = "@maven//:com_googlecode_lanterna_lanterna",
)
alias(
name = "slf4j",
actual = "@maven//:org_slf4j_slf4j_simple",
)
alias(
name = "okhttp",
actual = "@maven//:com_squareup_okhttp3_okhttp"
)
alias(
name = "retrofit",
actual = "@maven//:com_squareup_retrofit2_retrofit"
)
alias(
name = "gson",
actual = "@maven//:com_google_code_gson_gson"
)
alias(
name = "activej_common",
actual = "@maven//:io_activej_activej_common"
)
alias(
name = "activej_eventloop",
actual = "@maven//:io_activej_activej_eventloop"
)
alias(
name = "activej_http",
actual = "@maven//:io_activej_activej_http"
)
alias(
name = "activej_promise",
actual = "@maven//:io_activej_activej_promise"
)
alias(
name = "caffeine",
actual = "@maven//:com_github_ben_manes_caffeine_caffeine",
)
alias(
name = "future_converter",
actual = "@maven//:net_javacrumbs_future_converter_future_converter_java8_guava",
)
alias(
name = "slf4j_nop",
actual = "@maven//:org_slf4j_slf4j_nop"
)
exports_files(["CLARO_VERSION.txt"])
################################################################################
# BEGIN: Setup AutoValue.
################################################################################
# Export the autovalue plugin as a simple java_library dep.
java_plugin(
name = "autovalue_plugin",
processor_class = "com.google.auto.value.processor.AutoValueProcessor",
deps = [
"@maven//:com_google_auto_value_auto_value",
],
)
java_library(
name = "autovalue",
exported_plugins = [
":autovalue_plugin",
],
neverlink = 1,
exports = [
"@maven//:com_google_auto_value_auto_value",
],
)
################################################################################
# END: Setup AutoValue.
################################################################################
################################################################################
# BEGIN: Setup Bootstrapping Claro Compiler.
################################################################################
java_binary(
name = "bootstrapping_claro_compiler_binary",
main_class = "com.claro.ClaroCompilerMain",
srcs = [":_dummy"], # java_binary() requires some source file, so giving a dummy file.
deps = [":bootstrapping_claro_compiler_import"],
)
genrule(
name = "_dummy",
outs = ["dummy.java"],
cmd = "echo 'public class dummy {}' > $(OUTS)",
)
java_import(
name = "bootstrapping_claro_compiler_import",
jars = [":bootstrapping_claro_compiler.jar"],
)
java_import(
name = "bootstrapping_claro_builtin_java_deps_import",
jars = [":bootstrapping_claro_builtin_java_deps_deploy.jar"],
)
genrule(
name = "bootstrapping_claro_compiler",
srcs = ["@bootstrapping_claro_compiler_tarfile//file"],
outs = [
"bootstrapping_claro_compiler.jar",
"bootstrapping_claro_builtin_java_deps_deploy.jar",
],
cmd = "tar -xpf $(location @bootstrapping_claro_compiler_tarfile//file) " +
"&& cat claro_compiler_binary_deploy.jar > $(location bootstrapping_claro_compiler.jar)" +
"&& cat claro_builtin_java_deps_deploy.jar > $(location bootstrapping_claro_builtin_java_deps_deploy.jar)",
)
################################################################################
# END: Setup Bootstrapping Claro Compiler.
################################################################################
genrule(
name = "empty_claro_src",
outs = ["empty.claro"],
# Currently claro doesn't accept empty src files so throw a no-op stmt in there.
cmd = "echo '_ = 1;' > $(OUTS)",
)