
Some plugins, most notably owners-plugin, depend on prolog:common rule. Given that this rule transitively depends on gerrit-server:server rule, and this rule depends on virtually whole gerrit build graph, the final plugin artifact contains effectively the whole gerrit war file content. To fix that we expose prolog:common in plugin API. Moreover, adjust prolog_cafe_library to not transitively depend on prolog runtime library. We can do it, because gerrit-server already depends on it, so that it's included in gerrit war anyway. This change allows the owners-plugin to de-duplicate its size from 45 MB to 1.5 MB only. Change-Id: I8d7198a911c2da444c1822509988eda7d369af77
59 lines
1.2 KiB
Python
59 lines
1.2 KiB
Python
java_library(
|
|
name = "runtime",
|
|
data = ["//lib:LICENSE-prologcafe"],
|
|
visibility = ["//visibility:public"],
|
|
exports = ["@prolog_runtime//jar"],
|
|
)
|
|
|
|
java_library(
|
|
name = "runtime-neverlink",
|
|
data = ["//lib:LICENSE-prologcafe"],
|
|
visibility = ["//visibility:public"],
|
|
exports = ["@prolog_runtime//jar:neverlink"],
|
|
)
|
|
|
|
java_library(
|
|
name = "compiler",
|
|
data = ["//lib:LICENSE-prologcafe"],
|
|
visibility = ["//visibility:public"],
|
|
exports = ["@prolog_compiler//jar"],
|
|
runtime_deps = [
|
|
":io",
|
|
":runtime",
|
|
],
|
|
)
|
|
|
|
java_library(
|
|
name = "io",
|
|
data = ["//lib:LICENSE-prologcafe"],
|
|
exports = ["@prolog_io//jar"],
|
|
)
|
|
|
|
java_library(
|
|
name = "cafeteria",
|
|
data = ["//lib:LICENSE-prologcafe"],
|
|
visibility = ["//visibility:public"],
|
|
exports = ["@cafeteria//jar"],
|
|
runtime_deps = [
|
|
"io",
|
|
"runtime",
|
|
],
|
|
)
|
|
|
|
java_binary(
|
|
name = "compiler_bin",
|
|
main_class = "BuckPrologCompiler",
|
|
visibility = ["//visibility:public"],
|
|
runtime_deps = [":compiler_lib"],
|
|
)
|
|
|
|
java_library(
|
|
name = "compiler_lib",
|
|
srcs = ["java/BuckPrologCompiler.java"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":compiler",
|
|
":runtime",
|
|
],
|
|
)
|