So I need to add more boilerplate code, and even a factory, to just add some parameters. I thought using DI framework whould be easier than regular DI or avoiding DI, but I'm a little surprised of the complexity and the boilerplate added by hilt
Pablo
11/14/2024, 7:12 PM
it seems to be simple for this very reduced sample of code, but doing that in a big project whould imply a lot of interfaces and boilerplate lines
Pablo
11/14/2024, 7:27 PM
Probably that interface factory can be automatized by hilt, I don't understand why they are forcing users to create it manually
Pablo
11/14/2024, 7:31 PM
wow, I'm checking that you are forced to use the factory to create the objects, is not used automatically under the hood by hilt
Pablo
11/14/2024, 7:31 PM
I'm really negatively surprised
Pablo
11/18/2024, 8:55 AM
@ephemient what do you think about this option?
create a normal constructor and only inject the repository:
Copy code
@AndroidEntryPoint
class CustomClass(val name: String) {
@Inject lateinit var repository: Repository
}