2018-03-28 04:47:00 +11:00
|
|
|
/* Copyright 2018 charlag
|
|
|
|
*
|
|
|
|
* This file is a part of Tusky.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
|
|
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Tusky is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
|
|
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
|
|
* Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with Tusky; if not,
|
|
|
|
* see <http://www.gnu.org/licenses>. */
|
|
|
|
|
|
|
|
package com.keylesspalace.tusky.di
|
|
|
|
|
|
|
|
import com.keylesspalace.tusky.TuskyApplication
|
|
|
|
import dagger.BindsInstance
|
|
|
|
import dagger.Component
|
|
|
|
import dagger.android.AndroidInjectionModule
|
|
|
|
import javax.inject.Singleton
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by charlag on 3/21/18.
|
|
|
|
*/
|
|
|
|
|
|
|
|
@Singleton
|
|
|
|
@Component(modules = [
|
|
|
|
AppModule::class,
|
|
|
|
NetworkModule::class,
|
|
|
|
AndroidInjectionModule::class,
|
2018-04-14 06:37:21 +10:00
|
|
|
ActivitiesModule::class,
|
2018-04-23 01:20:01 +10:00
|
|
|
ServicesModule::class,
|
2018-06-18 21:26:18 +10:00
|
|
|
BroadcastReceiverModule::class,
|
|
|
|
ViewModelModule::class
|
2018-03-28 04:47:00 +11:00
|
|
|
])
|
|
|
|
interface AppComponent {
|
|
|
|
@Component.Builder
|
|
|
|
interface Builder {
|
|
|
|
@BindsInstance
|
|
|
|
fun application(tuskyApp: TuskyApplication): Builder
|
|
|
|
|
|
|
|
fun build(): AppComponent
|
|
|
|
}
|
|
|
|
|
|
|
|
fun inject(app: TuskyApplication)
|
|
|
|
}
|