Colton Idle
02/08/2023, 7:20 PMapp
gradle module which depends on service
. And service
inside has SomeServiceClass
. Would service
gradle module have a @Module and @Provides, providing the SomeServiceClass
to app
gradle module? Or is it more customary for the service
gradle module to declare what it provides?agrosner
02/09/2023, 1:11 AMColton Idle
02/09/2023, 2:34 AMagrosner
02/09/2023, 2:42 AMColton Idle
02/09/2023, 2:45 AM@Module
@InstallIn(SingletonComponent::class)
object MyNetworkGradleModule {
@JvmStatic
@Provides
fun provideCustomNameGen() : CustomNameGenServiceInterface {
return RealCustomNameGen()
}
}
RealCustomNameGen @Inject constructor()
then the injection works. but the second I try to write a module with a provides method, I just get the error message "cannot be provided without an @Provides-annotated method.
public abstract static class SingletonC implements App_GeneratedInjector,""
Hrmmm.