I'm using IntelliJ, Bazel, Kotlin and Dagger2 in my project. Everything comiles just fine and works fine, but there is one big problem with this combination. IntelliJ doesn't see classes generated by Dagger. I can manually go to the _javac directory of a library and mark it as Generated Files Directory. In this case IntelliJ will see generated classes. This approach is very inconvenient as there are many _javac directories with generated files - I can't mark all of them manually.
By digging in into dagger Bazel toolchain, it seems that it is exporting java_plugin which is used to generate classes. How to let IntelliJ know about classes generated by the java_plugin? I think this problem should be also actual for users of AutoValue, for example, but I didn't try it yet.