Query Java classpath for build targets #18769
-
Hi! I am new to Bazel and I am looking into integrate a third party tool as a rule (or extension?), so that it can be used in Bazel workspaces which have been configured appropriately. This tool requires information about the complete runtime classpath required to compile a given Java target, including the JDK source and target compatibility. Is there an API or a query which can be executed to obtain this information, including the paths in the local file system to any external jar files and the directory containing the class files produced for dependent Java targets? Also, I would like to identify which source files represent production source files and which are test sources. I am sorry if I am not using the proper Bazel terminology here. I am still trying to learn about the build system... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I think you can introduce the external tool with an external repository (Read https://bazel.build/docs/external for more), and write a custom build rule to create actions using the tool with necessary information. |
Beta Was this translation helpful? Give feedback.
I think you can introduce the external tool with an external repository (Read https://bazel.build/docs/external for more), and write a custom build rule to create actions using the tool with necessary information.