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
| apply plugin: 'kotlin' | |
| dependencies { | |
| implementation Libraries.kotlin | |
| } |
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
| apply plugin: 'com.android.dynamic-feature' | |
| apply plugin: 'kotlin-android' | |
| apply plugin: 'kotlin-android-extensions' | |
| android { | |
| compileSdkVersion Versions.compileSdk | |
| defaultConfig { | |
| minSdkVersion Versions.minSdk | |
| targetSdkVersion Versions.targetSdk |
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 repositoryModule: Module = module { | |
| single { PostRepositoryImpl(cache = get(), remote = get()) as PostRepository } | |
| } |
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 App : Application() { | |
| override fun onCreate() { | |
| super.onCreate() | |
| startKoin { androidContext(this@App) } | |
| } | |
| } |
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
| private val loadFeature by lazy { Posts.init() } | |
| private fun injectFeature() = loadFeature | |
| class PostListActivity : AppCompatActivity() { | |
| private val vm: PostListViewModel by viewModel() | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_post_list) |
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
| buildscript { | |
| repositories { | |
| jcenter() | |
| } | |
| } | |
| plugins { | |
| id "io.gitlab.arturbosch.detekt" version "1.0.0-RC10" | |
| } |
NewerOlder