1

I'm trying to use VS Code to write Java programs which are built Bazel. Most of vs code extensions don't know about Bazel. Therefore code complete works only for the .java files understand the same folder.

I came up.with this idea of generating Eclipse's .project and .classpath out of Bazel java_* targets. I manually created these files and code completion worked perfectly.

So now the question boils down to: how can I automatically generate .project and .classpath files in the same diretore of BUILD file?

Igor Gatis
  • 4,648
  • 10
  • 43
  • 66
  • 1
    Is there an option for them to be in a different folder? I strongly suggest looking how IntelliJ solved it with an aspect – Ittai Jul 11 '18 at 17:14

1 Answers1

3

Sounds like they already decided not support it: https://github.com/bazelbuild/bazel/issues/3376

Igor Gatis
  • 4,648
  • 10
  • 43
  • 66
  • Also check out https://stackoverflow.com/questions/47764221/how-to-write-files-to-current-directory-instead-of-bazel-out/47872013#47872013 – Jin Jul 11 '18 at 19:18