Hello!
We currently build our codebase with a Java 11 toolchain but use the Jaebel plugin to make the byte code compatible with Java 8. We have a few test classes that need to run with Java 8 due to incompatibilities with Java 11.
I am aware that we can set a config setting in bazelrc to build with Java 8, but this will cause all dependencies of the target to be rebuilt with Java 8 as well. We want to build everything with Java 11 but just have the test run Java 8 at runtime.
java_test has the launcher field which seems like it may be applicable, but I am having trouble finding any documentation or examples on how to create a launcher. This would also not be an optimal way for us to do this, as the launcher must be a cc_binary and we have no other C++ code in our codebase. If this is the only option, could someone point me in the direction of how to create one?
Thank you!
Chris