Madrapps / dagger-plugin

Plugin that supports easy usage of Dagger 2 library in IntelliJ iDEA or Android Studio
Apache License 2.0
30 stars 9 forks source link

Hilt integration #28

Open jakoss opened 4 years ago

jakoss commented 4 years ago

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

thsaravana commented 4 years ago

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 🤔

jakoss commented 4 years ago

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