This file contains 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
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER) | |
@Retention(value = RUNTIME) | |
@MapKey | |
internal annotation class FragmentKey(val value: KClass<out Fragment>) |
This file contains 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
@Module | |
abstract class AppModule { | |
@Binds | |
abstract fun bindApplication(app: CustomApplication): Application | |
@ContributesAndroidInjector(modules = [NavHostModule::class]) | |
abstract fun mainActivityInjector(): MainActivity | |
@Module |
This file contains 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
@Singleton | |
@Component( | |
modules = [ | |
AndroidSupportInjectionModule::class, | |
AppModule::class | |
] | |
) | |
interface ApplicationComponent : AndroidInjector<CustomApplication> { | |
@Component.Builder |
This file contains 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.application' | |
apply from: "${rootProject.projectDir}/flavors.gradle" | |
android { | |
// other config... | |
with flavorConfig | |
} |
This file contains 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
ext.flavorConfig = { // 1 | |
flavorDimensions "pricing" | |
productFlavors { | |
free { | |
dimension "pricing" | |
ext.myApplicationIdSuffix = '.free' // 2 | |
} | |
paid { | |
dimension "pricing" |
This file contains 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.feature' | |
// apply plugin: 'com.android.library' | |
// Might be this ^ if you're not interested in Google Play Instant: https://stackoverflow.com/questions/44361335/why-use-the-new-android-feature-plugin-over-the-library-plugin | |
android { | |
// other config... | |
flavorDimensions "pricing" | |
productFlavors { | |
free { |
This file contains 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.feature' | |
// apply plugin: 'com.android.library' | |
// Might be this ^ if you're not interested in Google Play Instant: https://stackoverflow.com/questions/44361335/why-use-the-new-android-feature-plugin-over-the-library-plugin | |
android { | |
// other config... | |
flavorDimensions "pricing" | |
productFlavors { | |
free { |
This file contains 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.application' | |
android { | |
// other config... | |
flavorDimensions "pricing" | |
productFlavors { | |
free { | |
dimension "pricing" | |
applicationIdSuffix = '.free' |
This file contains 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
abstract class BaseReactiveUseCase(threadExecutor: ThreadExecutor, | |
postExecutionThread: PostExecutionThread) { | |
protected val threadExecutorScheduler: Scheduler = Schedulers.from(threadExecutor) | |
protected val postExecutionThreadScheduler: Scheduler = postExecutionThread.scheduler | |
private val disposables = CompositeDisposable() | |
open fun dispose() { |