c69f360714
To guess what build system is used, we create now .primary_build_tool file in the root of the project during the eclipse classpath generation. Change the working directory for GWT SDM session to be .gwt_work_dir. The reason for that Bazel doesn't allow to write to bazel-out. Change-Id: I984068350244ee9d66807e4bc8c6779b34a26bab
23 lines
617 B
Python
23 lines
617 B
Python
|
|
def _classpath_collector(ctx):
|
|
all = set()
|
|
for d in ctx.attr.deps:
|
|
if hasattr(d, 'java'):
|
|
all += d.java.transitive_runtime_deps
|
|
all += d.java.compilation_info.runtime_classpath
|
|
elif hasattr(d, 'files'):
|
|
all += d.files
|
|
|
|
as_strs = [c.path for c in all]
|
|
ctx.file_action(output= ctx.outputs.runtime,
|
|
content="\n".join(sorted(as_strs)))
|
|
|
|
classpath_collector = rule(
|
|
implementation = _classpath_collector,
|
|
attrs = {
|
|
"deps": attr.label_list(),
|
|
},
|
|
outputs={
|
|
"runtime": "%{name}.runtime_classpath"
|
|
})
|