Last active
April 9, 2018 02:33
-
-
Save vincent-paing/25431d09ccedbf2c49aa4658f0f0fa93 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val appModule = applicationContext { | |
bean<NetworkManager> { | |
NetworkManagerImpl(get()) | |
} | |
bean<PersistenceManager> { | |
PersistenceManagerImpl(get(), get()) | |
} | |
bean<DataManager> { | |
DataManagerImpl(get(), get(), get()) | |
} | |
bean<ErrorMessageFactory> { | |
ErrorMessageFactoryImpl(get()) | |
} | |
bean<DeviceIdManager> { | |
DeviceIdAndroidManager(get()) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyApp : Application() { | |
override fun onCreate() { | |
super.onCreate() | |
startKoin(this, listOf(appModule, persistenceModule, networkModule)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment