Interoperation with Hilt - Ability to get rid of kapt in most modules
See original GitHub issueREADME clearly states that Anvil is not needed with Hilt, since Hilt already includes all Anvil’s features.
However, Anvil has one huge advantage over Hilt: It does not use kapt, which makes it much lighter on the build speed.
Would it be possible to have Anvil’s ContributesTo interop with Hilt’s InstallIn? Most modules in our project only use @Module and @Inject. If Anvil would support that, we could get rid of Hilt annotation processor in most modules and only rely on lighter Anvil.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Hilt in multi-module apps - Android Developers
Declare an @EntryPoint interface in the app module (or in any other module that can be processed by Hilt) with the dependencies that...
Read more >Migrating to Hilt - Dagger
As your migration continues, you should be able to remove these methods and have calling code use the Hilt EntryPoints API directly.
Read more >Space-by-Time Modular Decomposition Effectively Describes ...
The modular control hypothesis suggests that motor commands are built from precoded modules whose specific combined recruitment can allow ...
Read more >Unintended Behaviour | Unload / loadModules in Hilt
The idea is simple, I want to throw away all my memory caches, related to the user, when the user logs out. I...
Read more >utilization so as to maximize:productivity, by relieving ... - ERIC
competency-based teacher education programsa most difficult task. ... instructional modules. WK: And the project gave us an opportunity to have a program.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

There are no plans right now to improve interop. However, you might be able to use Anvil to some part. You could use Anvil’s
ContributesToand then use[@MergeModules](https://github.com/square/anvil/blob/main/annotations/src/main/java/com/squareup/anvil/annotations/compat/MergeModules.kt)and this module youInstallInin Hilt’s graph. You can do the same with[@MergeInterfaces](https://github.com/square/anvil/blob/main/annotations/src/main/java/com/squareup/anvil/annotations/compat/MergeInterfaces.kt). I’ve never tested it myself, but it could work.No, there’s no way except for you to create your own Kotlin compiler plugin and modify the source code (similar to what Anvil does in the compiler backend).