Questions tagged [bazel-rules]

274 questions
0
votes
1 answer

What is the most efficient way to extract/collect files from a list of targets/providers in Bazel?

I'm writing some rules and learning Starlark as I progress. Assume I have my own provider: ModularResources = provider( doc = "Modular resources", fields = { "artifactId": "Former Maven artifact id (don't ask me why)", …
Gunnar
  • 2,264
  • 17
  • 31
-1
votes
1 answer

Getting a "Using type x from an indirect dependency" in java_test_suite even when x is declared under dependency

My CustomTest.java has this import: com.google.protobuf.Timestamp I'm using java_test_suite to run tests in my BUILD file like so: java_test_suite( name = "all-tests", srcs = glob(["src/test/java/**/*.java"]), runner = "junit5", …
90abyss
  • 7,037
  • 19
  • 63
  • 94
-1
votes
1 answer

Copy a directory to a new directory in Bazel

essentially all I want is cp -r src/ dist/, but for some reason I simply cannot get this to work. Currently I am trying: filegroup( name = "src_files", srcs = glob([ "src/**", ]), ) filegroup( name = "dist_files", srcs =…
Jon L
  • 27
  • 4
-1
votes
1 answer

Creating an air gapped version of bazel but getting an error

C:\Developers\examples-master\java-tutorial>bazel build --distdir=C:\Developers\bazel-tar //:ProjectRunner Starting local Bazel server and connecting to it... INFO: Repository remotejdk11_win instantiated at: no stack…
1 2 3
18
19