Madrapps/dagger-plugin

Hilt integration

Opened this issue · 2 comments

Great plugin you got there! I have one issue - in new project, based directly on Hilt, the Dagger window is empty:
image

I don't see any errors, projects build and runs just fine.

Tried on Android Studio 4.0.1 with Hilt 2.28.3-alpha

The plugin works based on the Dagger-Spi plugin. If Hilt is not supported, then I believe Hilt is doing something else, probably byte code manipulation. Our original goal was not for Android projects, but rather non-android projects that uses Dagger.
Also, seems Android Studio now has support for Dagger (navigation). Is Hilt supported as part of that?

So to support Hilt, I believe we need to change the underlying implementation, may be just for projects that uses Hilt. I will try using Hilt and see what the generated code looks like, and why Dagger Spi is not fetching the graph 🤔

Dagger will be supported in Android Studio 4.1 (in RC now) and Hilt will be supported in Android Studio 4.2 (Canary). But as i understand - this support will be for navigation only. Your plugin is better for a top-down overview of the whole graph