dagger-plugin icon indicating copy to clipboard operation
dagger-plugin copied to clipboard

Hilt integration

Open jakoss opened this issue 4 years ago • 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

jakoss avatar Aug 12 '20 14:08 jakoss

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 🤔

thsaravana avatar Aug 20 '20 14:08 thsaravana

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

jakoss avatar Aug 20 '20 14:08 jakoss