-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Dagger dependency injection #110
Comments
neverlink and testonly also need to be added |
happy to accept a PR to fix this up. Sorry it isn't working currently. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried to use the annotation processor support from #93 to use Dagger but I got the error
java.lang.ClassNotFoundException: com.google.common.collect.Multimap
from the annotation processor when compiling.My config:
This generates the following rules in
java/com/google/dagger/BUILD
: (adjusted for brevity)However, this doesn't work as the annotation processor depends on the dagger compiler, which in turn has dependencies. In other words,
:dagger_compiler_plugin
should depend on:dagger_compiler
, not//external:jar/com/google/dagger/dagger_compiler
. It's also missinggenerates_api = True
. The correct rules are:Workaround
processorClasses
setting from dependencies.yaml to avoid the incorrect plugin definition.:dagger_with_compiler
where needed.It's probably also possible to reuse the Bazel BUILD files from the Dagger repository, but I haven't tried this yet.
The text was updated successfully, but these errors were encountered: