package keijumt.devandroid.di import android.app.Application import dagger.BindsInstance import dagger.Component import dagger.android.AndroidInjector import dagger.android.support.AndroidSupportInjectionModule import keijumt.devandroid.App import keijumt.devandroid.di.module.ActivityModule import keijumt.devandroid.di.module.AppModule import javax.inject.Singleton @Singleton @Component(modules = arrayOf( AndroidSupportInjectionModule::class, AppModule::class, ActivityModule::class )) /** * Component: Application 定義 */ interface AppComponent : AndroidInjector<App> { @Component.Builder interface Builder { @BindsInstance fun application(application: Application): Builder fun build(): AppComponent } override fun inject(application: App) }