├── effects-core
├── compiler
│ ├── .gitignore
│ └── src
│ │ ├── main
│ │ ├── resources
│ │ │ ├── META-INF
│ │ │ │ └── services
│ │ │ │ │ └── com.google.devtools.ksp.processing.SymbolProcessorProvider
│ │ │ └── com
│ │ │ │ └── uandcode
│ │ │ │ └── effects
│ │ │ │ └── core
│ │ │ │ └── compiler
│ │ │ │ └── MetadataTemplate.kt
│ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── effects
│ │ │ └── core
│ │ │ └── compiler
│ │ │ ├── CoreMetadataGenerator.kt
│ │ │ └── CoreSymbolProcessorProvider.kt
│ │ └── test
│ │ └── java
│ │ ├── interface2_package
│ │ └── CompiledEffect2.kt
│ │ ├── interface1_package
│ │ └── CompiledEffect1.kt
│ │ ├── implementation_package
│ │ └── CompiledEffectImpl.kt
│ │ └── com
│ │ └── uandcode
│ │ └── effects
│ │ └── core
│ │ └── compiler
│ │ ├── InterfaceTest.kt
│ │ └── AbstractClassTest.kt
├── compose
│ ├── .gitignore
│ └── build.gradle.kts
├── runtime
│ ├── .gitignore
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── effects
│ │ │ └── core
│ │ │ └── runtime
│ │ │ └── RuntimeProxyConfiguration.kt
│ └── build.gradle.kts
├── annotations
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── uandcode
│ │ └── effects
│ │ └── core
│ │ └── annotations
│ │ └── EffectMetadata.kt
├── essentials
│ ├── .gitignore
│ ├── src
│ │ ├── main
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── uandcode
│ │ │ │ └── effects
│ │ │ │ └── core
│ │ │ │ ├── exceptions
│ │ │ │ ├── ControllerAlreadyStartedException.kt
│ │ │ │ └── EffectNotFoundException.kt
│ │ │ │ ├── EffectProxyMarker.kt
│ │ │ │ ├── internal
│ │ │ │ ├── scopes
│ │ │ │ │ ├── HasManagedResourceStores.kt
│ │ │ │ │ ├── GlobalEffectScope.kt
│ │ │ │ │ └── EmptyEffectScope.kt
│ │ │ │ └── observers
│ │ │ │ │ └── SimpleCommandObserver.kt
│ │ │ │ └── GeneratedProxyEffectStoreProvider.kt
│ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── effects
│ │ │ └── core
│ │ │ ├── internal
│ │ │ └── AnnotationBasedProxyEffectStoreProviderTest.kt
│ │ │ └── ManagedInterfacesTest.kt
│ └── build.gradle.kts
├── kspcontract
│ ├── .gitignore
│ └── build.gradle.kts
├── lifecycle
│ ├── .gitignore
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── effects
│ │ │ └── core
│ │ │ └── lifecycle
│ │ │ └── EffectLifecycleDelegate.kt
│ └── build.gradle.kts
├── testing
│ ├── ksp
│ │ ├── .gitignore
│ │ ├── build.gradle.kts
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── effects
│ │ │ └── core
│ │ │ └── testing
│ │ │ └── ksp
│ │ │ ├── InputFile.kt
│ │ │ └── OutputFile.kt
│ ├── mocks
│ │ ├── .gitignore
│ │ ├── build.gradle.kts
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── effects
│ │ │ └── core
│ │ │ └── testing
│ │ │ └── mocks
│ │ │ ├── EffectWithDefaultTarget.kt
│ │ │ ├── EffectWithOverriddenClose.kt
│ │ │ ├── EffectWithTarget.kt
│ │ │ ├── CombinedEffect.kt
│ │ │ ├── EffectWithDefaultMethod.kt
│ │ │ ├── MultipleSimpleEffects.kt
│ │ │ └── CombinedEffectWithTarget.kt
│ ├── compose
│ │ ├── .gitignore
│ │ ├── build.gradle.kts
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── effects
│ │ │ └── core
│ │ │ └── compose
│ │ │ └── testing
│ │ │ ├── TestComposition.kt
│ │ │ ├── TestElement.kt
│ │ │ └── TestGroup.kt
│ └── lifecycle
│ │ ├── .gitignore
│ │ └── build.gradle.kts
├── compiler-common
│ ├── .gitignore
│ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── effects
│ │ │ └── compiler
│ │ │ └── common
│ │ │ ├── api
│ │ │ ├── data
│ │ │ │ ├── HasDependencies.kt
│ │ │ │ └── GeneratedProxy.kt
│ │ │ ├── AbstractKspException.kt
│ │ │ └── ProcessingMode.kt
│ │ │ ├── exceptions
│ │ │ ├── UnitCommandWithReturnTypeException.kt
│ │ │ ├── NonUnitCleanUpFunctionException.kt
│ │ │ ├── CleanUpFunctionHasArgumentsException.kt
│ │ │ ├── NestedClassException.kt
│ │ │ ├── ClassIsAbstractException.kt
│ │ │ ├── InvalidClassTypeException.kt
│ │ │ ├── NestedInterfaceException.kt
│ │ │ ├── ClassWithTypeParametersException.kt
│ │ │ ├── TargetInterfaceIsNotSpecifiedException.kt
│ │ │ ├── ClassDoesNotImplementInterfaceException.kt
│ │ │ ├── InterfaceNotFoundException.kt
│ │ │ ├── InterfaceWithTypeParametersException.kt
│ │ │ └── InternalKspExceptions.kt
│ │ │ └── generators
│ │ │ └── DefaultMetadataGenerator.kt
│ └── build.gradle.kts
└── kspcontract-api
│ ├── .gitignore
│ ├── src
│ └── main
│ │ └── java
│ │ └── com
│ │ └── uandcode
│ │ └── effects
│ │ └── stub
│ │ └── api
│ │ ├── ProxyDependency.kt
│ │ └── InvalidEffectSetupException.kt
│ └── build.gradle.kts
├── effects-hilt
├── compiler
│ ├── .gitignore
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ ├── META-INF
│ │ │ │ └── services
│ │ │ │ │ └── com.google.devtools.ksp.processing.SymbolProcessorProvider
│ │ │ └── com
│ │ │ │ └── uandcode
│ │ │ │ └── effects
│ │ │ │ └── hilt
│ │ │ │ └── compiler
│ │ │ │ ├── HiltMetadataTemplate.kt
│ │ │ │ └── HiltImplementationModuleTemplate.kt
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── effects
│ │ │ └── hilt
│ │ │ └── compiler
│ │ │ ├── HiltSymbolProcessorProvider.kt
│ │ │ └── exceptions
│ │ │ └── InvalidHiltComponentException.kt
│ └── build.gradle.kts
├── compose
│ ├── .gitignore
│ ├── consumer-rules.pro
│ ├── src
│ │ └── main
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle.kts
│ └── proguard-rules.pro
├── annotations
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── uandcode
│ │ └── effects
│ │ └── hilt
│ │ └── annotations
│ │ └── HiltEffectMetadata.kt
├── compiler-test
│ ├── .gitignore
│ ├── consumer-rules.pro
│ ├── src
│ │ ├── main
│ │ │ └── AndroidManifest.xml
│ │ └── test
│ │ │ └── java
│ │ │ ├── interface1_package
│ │ │ └── CompiledEffect1.kt
│ │ │ ├── interface2_package
│ │ │ └── CompiledEffect2.kt
│ │ │ ├── implementation_package
│ │ │ └── CompiledEffectImpl.kt
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── effects
│ │ │ └── hilt
│ │ │ └── compiler
│ │ │ └── InterfaceTest.kt
│ └── build.gradle.kts
└── essentials
│ ├── .gitignore
│ ├── consumer-rules.pro
│ ├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ └── com
│ │ └── uandcode
│ │ └── effects
│ │ └── hilt
│ │ └── internal
│ │ ├── qualifiers
│ │ ├── ActivityQualifier.kt
│ │ ├── FragmentQualifier.kt
│ │ ├── SingletonQualifier.kt
│ │ ├── ViewModelQualifier.kt
│ │ └── ActivityRetainedQualifier.kt
│ │ ├── InternalRegisteredEffect.kt
│ │ └── HiltViewModelEffectScope.kt
│ ├── build.gradle.kts
│ └── proguard-rules.pro
├── effects-koin
├── compiler
│ ├── .gitignore
│ ├── src
│ │ └── main
│ │ │ ├── resources
│ │ │ ├── META-INF
│ │ │ │ └── services
│ │ │ │ │ └── com.google.devtools.ksp.processing.SymbolProcessorProvider
│ │ │ └── com
│ │ │ │ └── uandcode
│ │ │ │ └── effects
│ │ │ │ └── koin
│ │ │ │ └── compiler
│ │ │ │ └── KoinMetadataTemplate.kt
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── effects
│ │ │ └── koin
│ │ │ └── compiler
│ │ │ ├── exception
│ │ │ └── ScopeAnnotationConflictException.kt
│ │ │ ├── data
│ │ │ └── KoinParsedEffect.kt
│ │ │ └── KoinSymbolProcessorProvider.kt
│ └── build.gradle.kts
├── compose
│ ├── .gitignore
│ └── build.gradle.kts
├── annotations
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── uandcode
│ │ └── effects
│ │ └── koin
│ │ └── annotations
│ │ ├── InstallEffectToNamedScope.kt
│ │ ├── InstallEffectToClassScope.kt
│ │ └── KoinEffectMetadata.kt
├── essentials
│ ├── .gitignore
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── effects
│ │ │ └── koin
│ │ │ ├── internal
│ │ │ └── ConstructorArg.kt
│ │ │ ├── exceptions
│ │ │ └── DuplicateEffectScopeException.kt
│ │ │ └── KoinEffectScopeBuilder.kt
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── uandcode
│ │ └── effects
│ │ └── koin
│ │ └── lifecycle
│ │ └── mocks
│ │ ├── KoinComponentLifecycleOwner.kt
│ │ └── AndroidScopeComponentLifecycleOwner.kt
└── kspcontract
│ ├── .gitignore
│ ├── src
│ └── main
│ │ └── java
│ │ ├── org
│ │ └── koin
│ │ │ └── android
│ │ │ └── scope
│ │ │ └── AndroidScopeComponent.kt
│ │ └── com
│ │ └── uandcode
│ │ └── effects
│ │ └── koin
│ │ └── kspcontract
│ │ └── AnnotationBasedKoinEffectExtension.kt
│ └── build.gradle.kts
├── app-examples
├── core
│ ├── app-singlemodule
│ │ ├── .gitignore
│ │ └── src
│ │ │ └── main
│ │ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── values
│ │ │ │ ├── themes.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── colors.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ └── drawable
│ │ │ │ ├── ic_delete.xml
│ │ │ │ ├── ic_favorite.xml
│ │ │ │ └── ic_favorite_not.xml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── example
│ │ │ └── core
│ │ │ └── singlemodule
│ │ │ ├── effects
│ │ │ ├── toasts
│ │ │ │ ├── Toasts.kt
│ │ │ │ └── AndroidToasts.kt
│ │ │ ├── dialogs
│ │ │ │ ├── Dialogs.kt
│ │ │ │ └── AlertDialogConfig.kt
│ │ │ ├── navigation
│ │ │ │ ├── Router.kt
│ │ │ │ └── ComposeRouter.kt
│ │ │ └── resources
│ │ │ │ ├── Resources.kt
│ │ │ │ └── AndroidResources.kt
│ │ │ ├── domain
│ │ │ ├── Cat.kt
│ │ │ └── CatsRepository.kt
│ │ │ ├── AppRoutes.kt
│ │ │ ├── presentation
│ │ │ ├── details
│ │ │ │ └── CatDetailsAction.kt
│ │ │ └── list
│ │ │ │ └── CatsAction.kt
│ │ │ ├── App.kt
│ │ │ └── di
│ │ │ └── Singletons.kt
│ └── app-multimodule
│ │ ├── app
│ │ ├── .gitignore
│ │ └── src
│ │ │ └── main
│ │ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── themes.xml
│ │ │ │ └── colors.xml
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ └── drawable
│ │ │ │ ├── ic_delete.xml
│ │ │ │ ├── ic_favorite.xml
│ │ │ │ └── ic_favorite_not.xml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── example
│ │ │ └── core
│ │ │ └── multimodule
│ │ │ └── app
│ │ │ ├── navigation
│ │ │ └── AppRoutes.kt
│ │ │ ├── AndroidResources.kt
│ │ │ └── data
│ │ │ └── Cat.kt
│ │ ├── feature-list
│ │ ├── .gitignore
│ │ ├── consumer-rules.pro
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── uandcode
│ │ │ │ └── example
│ │ │ │ └── core
│ │ │ │ └── multimodule
│ │ │ │ └── features
│ │ │ │ └── list
│ │ │ │ ├── CatsRouter.kt
│ │ │ │ ├── domain
│ │ │ │ ├── Cat.kt
│ │ │ │ └── CatListRepository.kt
│ │ │ │ ├── CatsAction.kt
│ │ │ │ └── CatsListDependencyContainer.kt
│ │ │ └── res
│ │ │ └── values
│ │ │ └── strings.xml
│ │ ├── effect-interfaces
│ │ ├── .gitignore
│ │ ├── build.gradle.kts
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── example
│ │ │ └── core
│ │ │ └── multimodule
│ │ │ └── effects
│ │ │ └── api
│ │ │ ├── Toasts.kt
│ │ │ ├── Resources.kt
│ │ │ ├── Dialogs.kt
│ │ │ └── AlertDialogConfig.kt
│ │ ├── feature-details
│ │ ├── .gitignore
│ │ ├── consumer-rules.pro
│ │ └── src
│ │ │ └── main
│ │ │ ├── res
│ │ │ └── values
│ │ │ │ └── strings.xml
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── example
│ │ │ └── core
│ │ │ └── multimodule
│ │ │ └── features
│ │ │ └── details
│ │ │ ├── CatDetailsRouter.kt
│ │ │ ├── CatDetailsAction.kt
│ │ │ └── domain
│ │ │ ├── Cat.kt
│ │ │ └── CatDetailsRepository.kt
│ │ ├── compose-components
│ │ ├── .gitignore
│ │ ├── consumer-rules.pro
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ ├── ic_delete.xml
│ │ │ │ ├── ic_favorite.xml
│ │ │ │ └── ic_favorite_not.xml
│ │ │ │ └── values
│ │ │ │ └── colors.xml
│ │ └── build.gradle.kts
│ │ ├── effect-impl-toasts
│ │ ├── .gitignore
│ │ ├── consumer-rules.pro
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── uandcode
│ │ │ │ └── example
│ │ │ │ └── core
│ │ │ │ └── multimodule
│ │ │ │ └── effects
│ │ │ │ └── toasts
│ │ │ │ └── AndroidToasts.kt
│ │ └── build.gradle.kts
│ │ ├── effect-impl-dialogs-android
│ │ ├── .gitignore
│ │ ├── consumer-rules.pro
│ │ ├── src
│ │ │ └── main
│ │ │ │ └── AndroidManifest.xml
│ │ └── build.gradle.kts
│ │ └── effect-impl-dialogs-compose
│ │ ├── .gitignore
│ │ ├── consumer-rules.pro
│ │ ├── src
│ │ └── main
│ │ │ └── AndroidManifest.xml
│ │ └── build.gradle.kts
├── hilt
│ ├── app-singlemodule
│ │ ├── .gitignore
│ │ └── src
│ │ │ └── main
│ │ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── values
│ │ │ │ ├── themes.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── colors.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ └── drawable
│ │ │ │ ├── ic_delete.xml
│ │ │ │ ├── ic_favorite.xml
│ │ │ │ └── ic_favorite_not.xml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── example
│ │ │ └── hilt
│ │ │ └── singlemodule
│ │ │ ├── effects
│ │ │ ├── toasts
│ │ │ │ ├── Toasts.kt
│ │ │ │ └── AndroidToasts.kt
│ │ │ ├── dialogs
│ │ │ │ ├── Dialogs.kt
│ │ │ │ └── AlertDialogConfig.kt
│ │ │ ├── navigation
│ │ │ │ ├── Router.kt
│ │ │ │ └── ComposeRouter.kt
│ │ │ └── resources
│ │ │ │ ├── Resources.kt
│ │ │ │ └── AndroidResources.kt
│ │ │ ├── App.kt
│ │ │ ├── domain
│ │ │ ├── Cat.kt
│ │ │ └── CatsRepository.kt
│ │ │ ├── AppRoutes.kt
│ │ │ ├── presentation
│ │ │ ├── details
│ │ │ │ └── CatDetailsAction.kt
│ │ │ └── list
│ │ │ │ └── CatsAction.kt
│ │ │ └── di
│ │ │ ├── ResourcesModule.kt
│ │ │ └── RepositoriesModule.kt
│ └── app-multimodule
│ │ ├── app
│ │ ├── .gitignore
│ │ └── src
│ │ │ └── main
│ │ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ ├── themes.xml
│ │ │ │ └── colors.xml
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.webp
│ │ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ └── drawable
│ │ │ │ ├── ic_delete.xml
│ │ │ │ ├── ic_favorite.xml
│ │ │ │ └── ic_favorite_not.xml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── example
│ │ │ └── hilt
│ │ │ └── multimodule
│ │ │ └── app
│ │ │ ├── App.kt
│ │ │ ├── navigation
│ │ │ └── AppRoutes.kt
│ │ │ ├── di
│ │ │ └── ResourcesModule.kt
│ │ │ ├── data
│ │ │ └── Cat.kt
│ │ │ └── AndroidResources.kt
│ │ ├── feature-list
│ │ ├── .gitignore
│ │ ├── consumer-rules.pro
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── uandcode
│ │ │ │ └── example
│ │ │ │ └── hilt
│ │ │ │ └── multimodule
│ │ │ │ └── features
│ │ │ │ └── list
│ │ │ │ ├── CatsRouter.kt
│ │ │ │ ├── domain
│ │ │ │ ├── Cat.kt
│ │ │ │ └── CatListRepository.kt
│ │ │ │ └── CatsAction.kt
│ │ │ └── res
│ │ │ └── values
│ │ │ └── strings.xml
│ │ ├── effect-interfaces
│ │ ├── .gitignore
│ │ ├── build.gradle.kts
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── example
│ │ │ └── hilt
│ │ │ └── multimodule
│ │ │ └── effects
│ │ │ └── api
│ │ │ ├── Toasts.kt
│ │ │ ├── Resources.kt
│ │ │ ├── Dialogs.kt
│ │ │ └── AlertDialogConfig.kt
│ │ ├── feature-details
│ │ ├── .gitignore
│ │ ├── consumer-rules.pro
│ │ └── src
│ │ │ └── main
│ │ │ ├── res
│ │ │ └── values
│ │ │ │ └── strings.xml
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── example
│ │ │ └── hilt
│ │ │ └── multimodule
│ │ │ └── features
│ │ │ └── details
│ │ │ ├── CatDetailsRouter.kt
│ │ │ ├── CatDetailsAction.kt
│ │ │ └── domain
│ │ │ ├── Cat.kt
│ │ │ └── CatDetailsRepository.kt
│ │ ├── compose-components
│ │ ├── .gitignore
│ │ ├── consumer-rules.pro
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ ├── ic_delete.xml
│ │ │ │ ├── ic_favorite.xml
│ │ │ │ └── ic_favorite_not.xml
│ │ │ │ └── values
│ │ │ │ └── colors.xml
│ │ └── build.gradle.kts
│ │ ├── effect-impl-toasts
│ │ ├── .gitignore
│ │ ├── consumer-rules.pro
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── uandcode
│ │ │ │ └── example
│ │ │ │ └── hilt
│ │ │ │ └── multimodule
│ │ │ │ └── effects
│ │ │ │ └── toasts
│ │ │ │ └── AndroidToasts.kt
│ │ └── build.gradle.kts
│ │ ├── effect-impl-dialogs-android
│ │ ├── .gitignore
│ │ ├── consumer-rules.pro
│ │ ├── src
│ │ │ └── main
│ │ │ │ └── AndroidManifest.xml
│ │ └── build.gradle.kts
│ │ └── effect-impl-dialogs-compose
│ │ ├── .gitignore
│ │ ├── consumer-rules.pro
│ │ └── src
│ │ └── main
│ │ └── AndroidManifest.xml
└── koin
│ ├── app-singlemodule
│ ├── .gitignore
│ └── src
│ │ └── main
│ │ ├── res
│ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── values
│ │ │ ├── themes.xml
│ │ │ ├── strings.xml
│ │ │ └── colors.xml
│ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ └── drawable
│ │ │ ├── ic_delete.xml
│ │ │ ├── ic_favorite.xml
│ │ │ └── ic_favorite_not.xml
│ │ └── java
│ │ └── com
│ │ └── uandcode
│ │ └── example
│ │ └── koin
│ │ └── singlemodule
│ │ ├── effects
│ │ ├── toasts
│ │ │ ├── Toasts.kt
│ │ │ └── AndroidToasts.kt
│ │ ├── dialogs
│ │ │ ├── Dialogs.kt
│ │ │ └── AlertDialogConfig.kt
│ │ ├── navigation
│ │ │ ├── Router.kt
│ │ │ └── ComposeRouter.kt
│ │ └── resources
│ │ │ ├── Resources.kt
│ │ │ └── AndroidResources.kt
│ │ ├── domain
│ │ ├── Cat.kt
│ │ └── CatsRepository.kt
│ │ ├── AppRoutes.kt
│ │ ├── presentation
│ │ ├── details
│ │ │ └── CatDetailsAction.kt
│ │ └── list
│ │ │ └── CatsAction.kt
│ │ └── di
│ │ ├── ViewModelsModule.kt
│ │ └── SingletonsModule.kt
│ └── app-multimodule
│ ├── app
│ ├── .gitignore
│ └── src
│ │ └── main
│ │ ├── res
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── themes.xml
│ │ │ └── colors.xml
│ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ └── drawable
│ │ │ ├── ic_delete.xml
│ │ │ ├── ic_favorite.xml
│ │ │ └── ic_favorite_not.xml
│ │ └── java
│ │ └── com
│ │ └── uandcode
│ │ └── example
│ │ └── koin
│ │ └── multimodule
│ │ └── app
│ │ ├── navigation
│ │ └── AppRoutes.kt
│ │ ├── AndroidResources.kt
│ │ ├── di
│ │ └── ViewModelsModule.kt
│ │ └── data
│ │ └── Cat.kt
│ ├── feature-list
│ ├── .gitignore
│ ├── consumer-rules.pro
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── uandcode
│ │ │ └── example
│ │ │ └── koin
│ │ │ └── multimodule
│ │ │ └── features
│ │ │ └── list
│ │ │ ├── CatsRouter.kt
│ │ │ ├── domain
│ │ │ ├── Cat.kt
│ │ │ └── CatListRepository.kt
│ │ │ ├── CatsAction.kt
│ │ │ └── CatsListDependencyContainer.kt
│ │ └── res
│ │ └── values
│ │ └── strings.xml
│ ├── effect-interfaces
│ ├── .gitignore
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── uandcode
│ │ └── example
│ │ └── koin
│ │ └── multimodule
│ │ └── effects
│ │ └── api
│ │ ├── Toasts.kt
│ │ ├── Resources.kt
│ │ ├── Dialogs.kt
│ │ └── AlertDialogConfig.kt
│ ├── feature-details
│ ├── .gitignore
│ ├── consumer-rules.pro
│ └── src
│ │ └── main
│ │ ├── res
│ │ └── values
│ │ │ └── strings.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ └── com
│ │ └── uandcode
│ │ └── example
│ │ └── koin
│ │ └── multimodule
│ │ └── features
│ │ └── details
│ │ ├── CatDetailsRouter.kt
│ │ ├── CatDetailsAction.kt
│ │ └── domain
│ │ ├── Cat.kt
│ │ └── CatDetailsRepository.kt
│ ├── compose-components
│ ├── .gitignore
│ ├── consumer-rules.pro
│ ├── src
│ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ └── res
│ │ │ ├── drawable
│ │ │ ├── ic_delete.xml
│ │ │ ├── ic_favorite.xml
│ │ │ └── ic_favorite_not.xml
│ │ │ └── values
│ │ │ └── colors.xml
│ └── build.gradle.kts
│ ├── effect-impl-toasts
│ ├── .gitignore
│ ├── consumer-rules.pro
│ ├── src
│ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── uandcode
│ │ │ └── example
│ │ │ └── koin
│ │ │ └── multimodule
│ │ │ └── effects
│ │ │ └── toasts
│ │ │ └── AndroidToasts.kt
│ └── build.gradle.kts
│ ├── effect-impl-dialogs-android
│ ├── .gitignore
│ ├── consumer-rules.pro
│ ├── src
│ │ └── main
│ │ │ └── AndroidManifest.xml
│ └── build.gradle.kts
│ └── effect-impl-dialogs-compose
│ ├── .gitignore
│ ├── consumer-rules.pro
│ ├── src
│ └── main
│ │ └── AndroidManifest.xml
│ └── build.gradle.kts
├── docs
└── pic1.png
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitmodules
└── .gitignore
/effects-core/compiler/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-core/compose/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-core/runtime/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-hilt/compiler/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-hilt/compose/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-koin/compiler/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-koin/compose/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-core/annotations/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-core/essentials/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-core/kspcontract/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-core/lifecycle/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-core/testing/ksp/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-core/testing/mocks/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-hilt/annotations/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-hilt/compiler-test/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-hilt/compose/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/effects-hilt/essentials/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-hilt/essentials/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/effects-koin/annotations/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-koin/essentials/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-koin/kspcontract/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-core/compiler-common/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-core/kspcontract-api/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-core/testing/compose/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-core/testing/lifecycle/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/effects-hilt/compiler-test/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-list/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-list/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-list/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-interfaces/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-details/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-details/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-list/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-interfaces/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-details/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-details/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-list/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-interfaces/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-details/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-details/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-list/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/compose-components/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/compose-components/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-impl-toasts/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-impl-toasts/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/compose-components/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/compose-components/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-impl-toasts/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-impl-toasts/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/compose-components/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/compose-components/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-impl-toasts/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-impl-toasts/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-impl-dialogs-android/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-impl-dialogs-compose/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-impl-dialogs-android/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-impl-dialogs-compose/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-impl-dialogs-android/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-impl-dialogs-compose/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-impl-dialogs-android/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-impl-dialogs-compose/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-impl-dialogs-android/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-impl-dialogs-compose/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-impl-dialogs-android/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-impl-dialogs-compose/consumer-rules.pro:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/pic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/docs/pic1.png
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-interfaces/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | }
4 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-interfaces/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | }
4 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-interfaces/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | }
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "kotlin-compile-testing"]
2 | path = kotlin-compile-testing
3 | url = git@github.com:romychab/kotlin-compile-testing.git
4 |
--------------------------------------------------------------------------------
/effects-core/testing/lifecycle/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | }
4 |
5 | dependencies {
6 | api(libs.lifecycle.jvm)
7 | }
8 |
--------------------------------------------------------------------------------
/effects-hilt/compose/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/effects-core/compiler/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider:
--------------------------------------------------------------------------------
1 | com.uandcode.effects.core.compiler.CoreSymbolProcessorProvider
2 |
--------------------------------------------------------------------------------
/effects-hilt/compiler-test/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/effects-hilt/compiler/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider:
--------------------------------------------------------------------------------
1 | com.uandcode.effects.hilt.compiler.HiltSymbolProcessorProvider
2 |
--------------------------------------------------------------------------------
/effects-hilt/essentials/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/effects-koin/compiler/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider:
--------------------------------------------------------------------------------
1 | com.uandcode.effects.koin.compiler.KoinSymbolProcessorProvider
2 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-details/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Go Back
4 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-details/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Go Back
4 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-details/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Go Back
4 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Hilt App
3 |
4 | Go Back
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-list/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Hilt App
3 |
4 | Go Back
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-list/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Hilt App
3 |
4 | Go Back
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-list/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-details/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-details/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-details/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/compose-components/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-impl-toasts/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-singlemodule/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-singlemodule/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-singlemodule/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/compose-components/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-impl-toasts/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-singlemodule/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-singlemodule/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-singlemodule/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/compose-components/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-impl-toasts/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-singlemodule/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-singlemodule/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-singlemodule/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-multimodule/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-multimodule/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-impl-dialogs-android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-impl-dialogs-compose/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-singlemodule/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-singlemodule/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-impl-dialogs-android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-impl-dialogs-compose/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-singlemodule/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-singlemodule/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-multimodule/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-multimodule/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-impl-dialogs-android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-impl-dialogs-compose/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-singlemodule/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-singlemodule/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-multimodule/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-multimodule/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-multimodule/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-singlemodule/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-singlemodule/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-singlemodule/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-singlemodule/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-multimodule/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-multimodule/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-multimodule/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-singlemodule/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-singlemodule/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-singlemodule/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-singlemodule/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-singlemodule/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-singlemodule/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-singlemodule/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-singlemodule/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/effects-core/testing/ksp/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.ksp)
4 | }
5 |
6 | dependencies {
7 | api(libs.ksp.testing)
8 | api(libs.junit)
9 | }
10 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-multimodule/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-multimodule/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-multimodule/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-multimodule/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-singlemodule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-singlemodule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-multimodule/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-multimodule/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-multimodule/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-multimodule/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-singlemodule/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/core/app-multimodule/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/romychab/effects-hilt-plugin/HEAD/app-examples/koin/app-multimodule/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/effects/toasts/Toasts.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule.effects.toasts
2 |
3 | interface Toasts {
4 | fun toast(message: String)
5 | }
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/effects/toasts/Toasts.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.effects.toasts
2 |
3 | interface Toasts {
4 | fun toast(message: String)
5 | }
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/effects/toasts/Toasts.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.effects.toasts
2 |
3 | interface Toasts {
4 | fun toast(message: String)
5 | }
6 |
--------------------------------------------------------------------------------
/effects-koin/kspcontract/src/main/java/org/koin/android/scope/AndroidScopeComponent.kt:
--------------------------------------------------------------------------------
1 | package org.koin.android.scope
2 |
3 | import org.koin.core.scope.Scope
4 |
5 | public interface AndroidScopeComponent {
6 | public val scope: Scope
7 | }
8 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-interfaces/src/main/java/com/uandcode/example/core/multimodule/effects/api/Toasts.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.effects.api
2 |
3 | public interface Toasts {
4 | public fun toast(message: String)
5 | }
6 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-details/src/main/java/com/uandcode/example/core/multimodule/features/details/CatDetailsRouter.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.features.details
2 |
3 | interface CatDetailsRouter {
4 | fun goBack()
5 | }
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-interfaces/src/main/java/com/uandcode/example/hilt/multimodule/effects/api/Toasts.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.effects.api
2 |
3 | public interface Toasts {
4 | public fun toast(message: String)
5 | }
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-details/src/main/java/com/uandcode/example/hilt/multimodule/features/details/CatDetailsRouter.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.features.details
2 |
3 | interface CatDetailsRouter {
4 | fun goBack()
5 | }
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-interfaces/src/main/java/com/uandcode/example/koin/multimodule/effects/api/Toasts.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.effects.api
2 |
3 | public interface Toasts {
4 | public fun toast(message: String)
5 | }
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-details/src/main/java/com/uandcode/example/koin/multimodule/features/details/CatDetailsRouter.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.features.details
2 |
3 | interface CatDetailsRouter {
4 | fun goBack()
5 | }
6 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-interfaces/src/main/java/com/uandcode/example/core/multimodule/effects/api/Resources.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.effects.api
2 |
3 | public interface Resources {
4 | public fun getString(resId: Int): String
5 | }
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-interfaces/src/main/java/com/uandcode/example/hilt/multimodule/effects/api/Resources.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.effects.api
2 |
3 | public interface Resources {
4 | public fun getString(resId: Int): String
5 | }
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-interfaces/src/main/java/com/uandcode/example/koin/multimodule/effects/api/Resources.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.effects.api
2 |
3 | public interface Resources {
4 | public fun getString(resId: Int): String
5 | }
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/App.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule
2 |
3 | import android.app.Application
4 | import dagger.hilt.android.HiltAndroidApp
5 |
6 | @HiltAndroidApp
7 | class App : Application()
--------------------------------------------------------------------------------
/effects-core/compiler/src/test/java/interface2_package/CompiledEffect2.kt:
--------------------------------------------------------------------------------
1 | package interface2_package
2 |
3 | import implementation_package.CompiledEffectImpl
4 |
5 | /**
6 | * @see CompiledEffectImpl
7 | */
8 | interface CompiledEffect2 {
9 | fun runEffect2(input2: Int)
10 | }
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/effects/dialogs/Dialogs.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule.effects.dialogs
2 |
3 | interface Dialogs {
4 |
5 | suspend fun showAlertDialog(config: AlertDialogConfig): Boolean
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/java/com/uandcode/example/hilt/multimodule/app/App.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.app
2 |
3 | import android.app.Application
4 | import dagger.hilt.android.HiltAndroidApp
5 |
6 | @HiltAndroidApp
7 | class App : Application()
8 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/effects/dialogs/Dialogs.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.effects.dialogs
2 |
3 | interface Dialogs {
4 |
5 | suspend fun showAlertDialog(config: AlertDialogConfig): Boolean
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/effects/dialogs/Dialogs.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.effects.dialogs
2 |
3 | interface Dialogs {
4 |
5 | suspend fun showAlertDialog(config: AlertDialogConfig): Boolean
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/effects-core/compiler/src/test/java/interface1_package/CompiledEffect1.kt:
--------------------------------------------------------------------------------
1 | package interface1_package
2 |
3 | import implementation_package.CompiledEffectImpl
4 |
5 | /**
6 | * @see CompiledEffectImpl
7 | */
8 | interface CompiledEffect1 {
9 | fun runEffect1(input1: String)
10 | }
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Sep 03 18:25:20 EEST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/effects-core/annotations/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | }
5 |
6 | publishConfig {
7 | artifactId = "effects2-core-annotations"
8 | description = "Effects Core Library - Annotations."
9 | }
10 |
--------------------------------------------------------------------------------
/effects-hilt/annotations/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | }
5 |
6 | publishConfig {
7 | artifactId = "effects2-hilt-annotations"
8 | description = "Effects Hilt Plugin (annotations)"
9 | }
10 |
--------------------------------------------------------------------------------
/effects-koin/annotations/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | }
5 |
6 | publishConfig {
7 | artifactId = "effects2-koin-annotations"
8 | description = "Effects Koin Plugin (annotations)"
9 | }
10 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/effects/navigation/Router.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule.effects.navigation
2 |
3 | interface Router {
4 |
5 | fun launchDetails(catId: Long)
6 |
7 | fun goBack()
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/effects/navigation/Router.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.effects.navigation
2 |
3 | interface Router {
4 |
5 | fun launchDetails(catId: Long)
6 |
7 | fun goBack()
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/effects/navigation/Router.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.effects.navigation
2 |
3 | interface Router {
4 |
5 | fun launchDetails(catId: Long)
6 |
7 | fun goBack()
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/effects-hilt/compiler-test/src/test/java/interface1_package/CompiledEffect1.kt:
--------------------------------------------------------------------------------
1 | package interface1_package
2 |
3 | import implementation_package.CompiledEffectImpl
4 |
5 | /**
6 | * @see CompiledEffectImpl
7 | */
8 | interface CompiledEffect1 {
9 | fun runEffect1(input1: String)
10 | }
11 |
--------------------------------------------------------------------------------
/effects-hilt/compiler-test/src/test/java/interface2_package/CompiledEffect2.kt:
--------------------------------------------------------------------------------
1 | package interface2_package
2 |
3 | import implementation_package.CompiledEffectImpl
4 |
5 | /**
6 | * @see CompiledEffectImpl
7 | */
8 | interface CompiledEffect2 {
9 | fun runEffect2(input2: Int)
10 | }
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-interfaces/src/main/java/com/uandcode/example/core/multimodule/effects/api/Dialogs.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.effects.api
2 |
3 | public interface Dialogs {
4 | public suspend fun showAlertDialog(config: AlertDialogConfig): Boolean
5 | }
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-interfaces/src/main/java/com/uandcode/example/hilt/multimodule/effects/api/Dialogs.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.effects.api
2 |
3 | public interface Dialogs {
4 | public suspend fun showAlertDialog(config: AlertDialogConfig): Boolean
5 | }
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-interfaces/src/main/java/com/uandcode/example/koin/multimodule/effects/api/Dialogs.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.effects.api
2 |
3 | public interface Dialogs {
4 | public suspend fun showAlertDialog(config: AlertDialogConfig): Boolean
5 | }
6 |
--------------------------------------------------------------------------------
/effects-core/kspcontract-api/src/main/java/com/uandcode/effects/stub/api/ProxyDependency.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.stub.api
2 |
3 | /**
4 | * For internal usage.
5 | *
6 | * This is a marker of any dependency that is required by a proxy implementation.
7 | */
8 | public interface ProxyDependency
9 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/domain/Cat.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule.domain
2 |
3 | data class Cat(
4 | val id: Long,
5 | val name: String,
6 | val image: String,
7 | val details: String,
8 | val isLiked: Boolean,
9 | )
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/domain/Cat.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.domain
2 |
3 | data class Cat(
4 | val id: Long,
5 | val name: String,
6 | val image: String,
7 | val details: String,
8 | val isLiked: Boolean,
9 | )
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/domain/Cat.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.domain
2 |
3 | data class Cat(
4 | val id: Long,
5 | val name: String,
6 | val image: String,
7 | val details: String,
8 | val isLiked: Boolean,
9 | )
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/api/data/HasDependencies.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.api.data
2 |
3 | import com.google.devtools.ksp.processing.Dependencies
4 |
5 | public interface HasDependencies {
6 | public val dependencies: Dependencies
7 | }
--------------------------------------------------------------------------------
/effects-core/essentials/src/main/java/com/uandcode/effects/core/exceptions/ControllerAlreadyStartedException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.exceptions
2 |
3 | public class ControllerAlreadyStartedException : Exception(
4 | "Can't create a bound controller, because the controller is already started."
5 | )
6 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/effects/resources/Resources.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule.effects.resources
2 |
3 | import androidx.annotation.StringRes
4 |
5 | interface Resources {
6 |
7 | fun getString(@StringRes id: Int): String
8 |
9 | }
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/effects/resources/Resources.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.effects.resources
2 |
3 | import androidx.annotation.StringRes
4 |
5 | interface Resources {
6 |
7 | fun getString(@StringRes id: Int): String
8 |
9 | }
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/effects/resources/Resources.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.effects.resources
2 |
3 | import androidx.annotation.StringRes
4 |
5 | interface Resources {
6 |
7 | fun getString(@StringRes id: Int): String
8 |
9 | }
--------------------------------------------------------------------------------
/effects-core/testing/ksp/src/main/java/com/uandcode/effects/core/testing/ksp/InputFile.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.testing.ksp
2 |
3 | import org.intellij.lang.annotations.Language
4 |
5 | public data class InputFile(
6 | @Language("kotlin") val content: String,
7 | val name: String = "Input.kt",
8 | )
9 |
--------------------------------------------------------------------------------
/effects-core/essentials/src/main/java/com/uandcode/effects/core/EffectProxyMarker.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core
2 |
3 | /**
4 | * Each generated proxy class must implement this interface
5 | * to indicate that it is an implementation of effect interface
6 | */
7 | public interface EffectProxyMarker : AutoCloseable
8 |
--------------------------------------------------------------------------------
/effects-core/testing/ksp/src/main/java/com/uandcode/effects/core/testing/ksp/OutputFile.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.testing.ksp
2 |
3 | import org.intellij.lang.annotations.Language
4 |
5 | public data class OutputFile(
6 | @Language("kotlin")
7 | val content: String,
8 | val name: String,
9 | )
10 |
--------------------------------------------------------------------------------
/effects-core/testing/mocks/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.ksp)
4 | }
5 |
6 | dependencies {
7 | implementation(projects.effectsCore.essentials)
8 | implementation(projects.effectsCore.annotations)
9 | ksp(projects.effectsCore.compiler)
10 | }
11 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-list/src/main/java/com/uandcode/example/core/multimodule/features/list/CatsRouter.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.features.list
2 |
3 | import com.uandcode.example.core.multimodule.features.list.domain.Cat
4 |
5 | interface CatsRouter {
6 | fun launchDetails(cat: Cat)
7 | }
8 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/AppRoutes.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule
2 |
3 | import kotlinx.serialization.Serializable
4 |
5 | @Serializable
6 | data object CatsRoute
7 |
8 | @Serializable
9 | data class CatDetailsRoute(
10 | val catId: Long,
11 | )
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-list/src/main/java/com/uandcode/example/hilt/multimodule/features/list/CatsRouter.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.features.list
2 |
3 | import com.uandcode.example.hilt.multimodule.features.list.domain.Cat
4 |
5 | interface CatsRouter {
6 | fun launchDetails(cat: Cat)
7 | }
8 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/AppRoutes.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule
2 |
3 | import kotlinx.serialization.Serializable
4 |
5 | @Serializable
6 | data object CatsRoute
7 |
8 | @Serializable
9 | data class CatDetailsRoute(
10 | val catId: Long,
11 | )
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-list/src/main/java/com/uandcode/example/koin/multimodule/features/list/CatsRouter.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.features.list
2 |
3 | import com.uandcode.example.koin.multimodule.features.list.domain.Cat
4 |
5 | interface CatsRouter {
6 | fun launchDetails(cat: Cat)
7 | }
8 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/AppRoutes.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule
2 |
3 | import kotlinx.serialization.Serializable
4 |
5 | @Serializable
6 | data object CatsRoute
7 |
8 | @Serializable
9 | data class CatDetailsRoute(
10 | val catId: Long,
11 | )
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/presentation/details/CatDetailsAction.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule.presentation.details
2 |
3 | sealed class CatDetailsAction {
4 | data object ToggleLike : CatDetailsAction()
5 | data object GoBack : CatDetailsAction()
6 | }
7 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/presentation/details/CatDetailsAction.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.presentation.details
2 |
3 | sealed class CatDetailsAction {
4 | data object ToggleLike : CatDetailsAction()
5 | data object GoBack : CatDetailsAction()
6 | }
7 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/presentation/details/CatDetailsAction.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.presentation.details
2 |
3 | sealed class CatDetailsAction {
4 | data object ToggleLike : CatDetailsAction()
5 | data object GoBack : CatDetailsAction()
6 | }
7 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-details/src/main/java/com/uandcode/example/core/multimodule/features/details/CatDetailsAction.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.features.details
2 |
3 | sealed class CatDetailsAction {
4 | data object ToggleLike : CatDetailsAction()
5 | data object GoBack : CatDetailsAction()
6 | }
7 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-details/src/main/java/com/uandcode/example/hilt/multimodule/features/details/CatDetailsAction.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.features.details
2 |
3 | sealed class CatDetailsAction {
4 | data object ToggleLike : CatDetailsAction()
5 | data object GoBack : CatDetailsAction()
6 | }
7 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-details/src/main/java/com/uandcode/example/koin/multimodule/features/details/CatDetailsAction.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.features.details
2 |
3 | sealed class CatDetailsAction {
4 | data object ToggleLike : CatDetailsAction()
5 | data object GoBack : CatDetailsAction()
6 | }
7 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/effects/dialogs/AlertDialogConfig.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule.effects.dialogs
2 |
3 | data class AlertDialogConfig(
4 | val title: String,
5 | val message: String,
6 | val positiveButton: String,
7 | val negativeButton: String,
8 | )
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/effects/dialogs/AlertDialogConfig.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.effects.dialogs
2 |
3 | data class AlertDialogConfig(
4 | val title: String,
5 | val message: String,
6 | val positiveButton: String,
7 | val negativeButton: String,
8 | )
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/effects/dialogs/AlertDialogConfig.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.effects.dialogs
2 |
3 | data class AlertDialogConfig(
4 | val title: String,
5 | val message: String,
6 | val positiveButton: String,
7 | val negativeButton: String,
8 | )
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-interfaces/src/main/java/com/uandcode/example/core/multimodule/effects/api/AlertDialogConfig.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.effects.api
2 |
3 | public data class AlertDialogConfig(
4 | val title: String,
5 | val message: String,
6 | val positiveButton: String,
7 | val negativeButton: String,
8 | )
9 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-interfaces/src/main/java/com/uandcode/example/hilt/multimodule/effects/api/AlertDialogConfig.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.effects.api
2 |
3 | public data class AlertDialogConfig(
4 | val title: String,
5 | val message: String,
6 | val positiveButton: String,
7 | val negativeButton: String,
8 | )
9 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-interfaces/src/main/java/com/uandcode/example/koin/multimodule/effects/api/AlertDialogConfig.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.effects.api
2 |
3 | public data class AlertDialogConfig(
4 | val title: String,
5 | val message: String,
6 | val positiveButton: String,
7 | val negativeButton: String,
8 | )
9 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/java/com/uandcode/example/core/multimodule/app/navigation/AppRoutes.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.app.navigation
2 |
3 | import kotlinx.serialization.Serializable
4 |
5 | @Serializable
6 | data object CatsRoute
7 |
8 | @Serializable
9 | data class CatDetailsRoute(
10 | val catId: Long,
11 | )
12 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/java/com/uandcode/example/hilt/multimodule/app/navigation/AppRoutes.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.app.navigation
2 |
3 | import kotlinx.serialization.Serializable
4 |
5 | @Serializable
6 | data object CatsRoute
7 |
8 | @Serializable
9 | data class CatDetailsRoute(
10 | val catId: Long,
11 | )
12 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/java/com/uandcode/example/koin/multimodule/app/navigation/AppRoutes.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.app.navigation
2 |
3 | import kotlinx.serialization.Serializable
4 |
5 | @Serializable
6 | data object CatsRoute
7 |
8 | @Serializable
9 | data class CatDetailsRoute(
10 | val catId: Long,
11 | )
12 |
--------------------------------------------------------------------------------
/effects-core/compiler/src/main/resources/com/uandcode/effects/core/compiler/MetadataTemplate.kt:
--------------------------------------------------------------------------------
1 | %PACKAGE_STATEMENT%
2 |
3 | import com.uandcode.effects.core.annotations.EffectMetadata
4 |
5 | @EffectMetadata(
6 | interfaceClassNames = %EFFECT_INTERFACE_CLASSNAMES%,
7 | implementationClassName = "%EFFECT_IMPL_CLASSNAME%",
8 | )
9 | public class %CLASSNAME%
10 |
--------------------------------------------------------------------------------
/effects-hilt/essentials/src/main/java/com/uandcode/effects/hilt/internal/qualifiers/ActivityQualifier.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.hilt.internal.qualifiers
2 |
3 | import com.uandcode.effects.core.EffectScope
4 |
5 | internal class ActivityQualifier(
6 | scope: EffectScope
7 | ) : AbstractInternalQualifier(scope) {
8 | override val priority: Int = 2
9 | }
10 |
--------------------------------------------------------------------------------
/effects-hilt/essentials/src/main/java/com/uandcode/effects/hilt/internal/qualifiers/FragmentQualifier.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.hilt.internal.qualifiers
2 |
3 | import com.uandcode.effects.core.EffectScope
4 |
5 | internal class FragmentQualifier(
6 | scope: EffectScope
7 | ) : AbstractInternalQualifier(scope) {
8 | override val priority: Int = 3
9 | }
10 |
--------------------------------------------------------------------------------
/effects-hilt/essentials/src/main/java/com/uandcode/effects/hilt/internal/qualifiers/SingletonQualifier.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.hilt.internal.qualifiers
2 |
3 | import com.uandcode.effects.core.EffectScope
4 |
5 | internal class SingletonQualifier(
6 | scope: EffectScope
7 | ) : AbstractInternalQualifier(scope) {
8 | override val priority: Int = 0
9 | }
10 |
--------------------------------------------------------------------------------
/effects-hilt/essentials/src/main/java/com/uandcode/effects/hilt/internal/qualifiers/ViewModelQualifier.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.hilt.internal.qualifiers
2 |
3 | import com.uandcode.effects.core.EffectScope
4 |
5 | internal class ViewModelQualifier(
6 | scope: EffectScope
7 | ) : AbstractInternalQualifier(scope) {
8 | override val priority: Int = 2
9 | }
10 |
--------------------------------------------------------------------------------
/effects-hilt/essentials/src/main/java/com/uandcode/effects/hilt/internal/qualifiers/ActivityRetainedQualifier.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.hilt.internal.qualifiers
2 |
3 | import com.uandcode.effects.core.EffectScope
4 |
5 | internal class ActivityRetainedQualifier(
6 | scope: EffectScope
7 | ) : AbstractInternalQualifier(scope) {
8 | override val priority: Int = 1
9 | }
10 |
--------------------------------------------------------------------------------
/effects-core/essentials/src/main/java/com/uandcode/effects/core/internal/scopes/HasManagedResourceStores.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.internal.scopes
2 |
3 | import com.uandcode.effects.core.internal.ObservableResourceStore
4 | import kotlin.reflect.KClass
5 |
6 | internal interface HasManagedResourceStores {
7 | fun getResourceStore(interfaceClass: KClass<*>): ObservableResourceStore<*>?
8 | }
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-details/src/main/java/com/uandcode/example/core/multimodule/features/details/domain/Cat.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.features.details.domain
2 |
3 | import androidx.compose.runtime.Immutable
4 |
5 | @Immutable
6 | interface Cat {
7 | val name: String
8 | val details: String
9 | val image: String
10 | val isLiked: Boolean
11 | }
12 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-details/src/main/java/com/uandcode/example/hilt/multimodule/features/details/domain/Cat.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.features.details.domain
2 |
3 | import androidx.compose.runtime.Immutable
4 |
5 | @Immutable
6 | interface Cat {
7 | val name: String
8 | val details: String
9 | val image: String
10 | val isLiked: Boolean
11 | }
12 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-details/src/main/java/com/uandcode/example/koin/multimodule/features/details/domain/Cat.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.features.details.domain
2 |
3 | import androidx.compose.runtime.Immutable
4 |
5 | @Immutable
6 | interface Cat {
7 | val name: String
8 | val details: String
9 | val image: String
10 | val isLiked: Boolean
11 | }
12 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-list/src/main/java/com/uandcode/example/core/multimodule/features/list/domain/Cat.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.features.list.domain
2 |
3 | import androidx.compose.runtime.Immutable
4 |
5 | @Immutable
6 | interface Cat {
7 | val id: Long
8 | val name: String
9 | val details: String
10 | val image: String
11 | val isLiked: Boolean
12 | }
13 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-list/src/main/java/com/uandcode/example/hilt/multimodule/features/list/domain/Cat.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.features.list.domain
2 |
3 | import androidx.compose.runtime.Immutable
4 |
5 | @Immutable
6 | interface Cat {
7 | val id: Long
8 | val name: String
9 | val details: String
10 | val image: String
11 | val isLiked: Boolean
12 | }
13 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-list/src/main/java/com/uandcode/example/koin/multimodule/features/list/domain/Cat.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.features.list.domain
2 |
3 | import androidx.compose.runtime.Immutable
4 |
5 | @Immutable
6 | interface Cat {
7 | val id: Long
8 | val name: String
9 | val details: String
10 | val image: String
11 | val isLiked: Boolean
12 | }
13 |
--------------------------------------------------------------------------------
/effects-koin/compiler/src/main/resources/com/uandcode/effects/koin/compiler/KoinMetadataTemplate.kt:
--------------------------------------------------------------------------------
1 | %PACKAGE_STATEMENT%
2 |
3 | import com.uandcode.effects.koin.annotations.KoinEffectMetadata
4 |
5 | @KoinEffectMetadata(
6 | interfaceClassNames = %EFFECT_INTERFACE_CLASSNAMES%,
7 | implementationClassName = "%EFFECT_IMPL_CLASSNAME%",
8 | koinScope = "%EFFECT_KOIN_SCOPE%"
9 | )
10 | public class %CLASSNAME%
11 |
--------------------------------------------------------------------------------
/effects-core/kspcontract-api/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | }
5 |
6 | publishConfig {
7 | artifactId = "effects2-core-kspcontract-api"
8 | description = "Effects Core Library - APIs used both by internal KSP contract and by other core effect libraries"
9 | }
10 |
11 | dependencies {
12 | api(libs.coroutines.core)
13 | }
14 |
--------------------------------------------------------------------------------
/effects-core/kspcontract/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | }
5 |
6 | publishConfig {
7 | artifactId = "effects2-core-kspcontract"
8 | description = "Effects Core Library - Internal KSP contract for accessing auto-generated code"
9 | }
10 |
11 | dependencies {
12 | implementation(projects.effectsCore.kspcontractApi)
13 | }
14 |
--------------------------------------------------------------------------------
/effects-core/essentials/src/main/java/com/uandcode/effects/core/exceptions/EffectNotFoundException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.exceptions
2 |
3 | import com.uandcode.effects.stub.api.ProxyConfiguration
4 | import kotlin.reflect.KClass
5 |
6 | public class EffectNotFoundException(
7 | effect: KClass<*>,
8 | proxyConfiguration: ProxyConfiguration,
9 | ) : Exception(proxyConfiguration.effectNotFoundMessage(effect))
10 |
--------------------------------------------------------------------------------
/effects-core/testing/compose/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.compose)
4 | }
5 |
6 | dependencies {
7 | api(projects.effectsCore.testing.lifecycle)
8 |
9 | implementation(libs.junit)
10 | implementation(libs.compose.runtime)
11 | implementation(libs.lifecycle.runtime.compose)
12 |
13 | api(libs.coroutines.test)
14 | api(libs.flowtest)
15 | }
16 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-list/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Delete
4 | Are you sure you want to delete the cat?
5 | Cat has been deleted
6 | Yes
7 | No
8 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-list/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Delete
4 | Are you sure you want to delete the cat?
5 | Cat has been deleted
6 | Yes
7 | No
8 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-list/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Delete
4 | Are you sure you want to delete the cat?
5 | Cat has been deleted
6 | Yes
7 | No
8 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/drawable/ic_delete.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/drawable/ic_delete.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/drawable/ic_delete.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/api/AbstractKspException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.api
2 |
3 | import com.google.devtools.ksp.symbol.KSNode
4 |
5 | /**
6 | * Base class for all exceptions thrown by the KSP processor.
7 | */
8 | public abstract class AbstractEffectKspException(
9 | message: String,
10 | internal val node: KSNode,
11 | ) : Exception(message)
12 |
--------------------------------------------------------------------------------
/effects-hilt/compiler/src/main/resources/com/uandcode/effects/hilt/compiler/HiltMetadataTemplate.kt:
--------------------------------------------------------------------------------
1 | %PACKAGE_STATEMENT%
2 |
3 | import com.uandcode.effects.hilt.annotations.HiltEffectMetadata
4 |
5 | @HiltEffectMetadata(
6 | interfaceClassNames = %EFFECT_INTERFACE_CLASSNAMES%,
7 | implementationClassName = "%EFFECT_IMPL_CLASSNAME%",
8 | hiltComponentClassName = "%HILT_COMPONENT_CLASSNAME%",
9 | )
10 | public class %CLASSNAME%
11 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/drawable/ic_delete.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-details/src/main/java/com/uandcode/example/core/multimodule/features/details/domain/CatDetailsRepository.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.features.details.domain
2 |
3 | import com.elveum.container.Container
4 | import kotlinx.coroutines.flow.Flow
5 |
6 | interface CatDetailsRepository {
7 | fun getById(id: Long): Flow>
8 | suspend fun toggleLike(cat: Cat)
9 | }
10 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/drawable/ic_delete.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-details/src/main/java/com/uandcode/example/hilt/multimodule/features/details/domain/CatDetailsRepository.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.features.details.domain
2 |
3 | import com.elveum.container.Container
4 | import kotlinx.coroutines.flow.Flow
5 |
6 | interface CatDetailsRepository {
7 | fun getById(id: Long): Flow>
8 | suspend fun toggleLike(cat: Cat)
9 | }
10 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/drawable/ic_delete.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-details/src/main/java/com/uandcode/example/koin/multimodule/features/details/domain/CatDetailsRepository.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.features.details.domain
2 |
3 | import com.elveum.container.Container
4 | import kotlinx.coroutines.flow.Flow
5 |
6 | interface CatDetailsRepository {
7 | fun getById(id: Long): Flow>
8 | suspend fun toggleLike(cat: Cat)
9 | }
10 |
--------------------------------------------------------------------------------
/effects-koin/kspcontract/src/main/java/com/uandcode/effects/koin/kspcontract/AnnotationBasedKoinEffectExtension.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.koin.kspcontract
2 |
3 | import org.koin.core.KoinApplication
4 |
5 | public object AnnotationBasedKoinEffectExtension {
6 |
7 | public fun installGeneratedEffects(application: KoinApplication) {
8 | throw IllegalStateException("Auto-generated implementation not found")
9 | }
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/compose-components/src/main/res/drawable/ic_delete.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/presentation/list/CatsAction.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule.presentation.list
2 |
3 | import com.uandcode.example.core.singlemodule.domain.Cat
4 |
5 | sealed class CatsAction {
6 | data class Toggle(val cat: Cat) : CatsAction()
7 | data class Delete(val cat: Cat) : CatsAction()
8 | data class ShowDetails(val cat: Cat) : CatsAction()
9 | }
10 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/compose-components/src/main/res/drawable/ic_delete.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/presentation/list/CatsAction.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.presentation.list
2 |
3 | import com.uandcode.example.hilt.singlemodule.domain.Cat
4 |
5 | sealed class CatsAction {
6 | data class Toggle(val cat: Cat) : CatsAction()
7 | data class Delete(val cat: Cat) : CatsAction()
8 | data class ShowDetails(val cat: Cat) : CatsAction()
9 | }
10 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/compose-components/src/main/res/drawable/ic_delete.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/presentation/list/CatsAction.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.presentation.list
2 |
3 | import com.uandcode.example.koin.singlemodule.domain.Cat
4 |
5 | sealed class CatsAction {
6 | data class Toggle(val cat: Cat) : CatsAction()
7 | data class Delete(val cat: Cat) : CatsAction()
8 | data class ShowDetails(val cat: Cat) : CatsAction()
9 | }
10 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-list/src/main/java/com/uandcode/example/core/multimodule/features/list/domain/CatListRepository.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.features.list.domain
2 |
3 | import com.elveum.container.Container
4 | import kotlinx.coroutines.flow.Flow
5 |
6 | interface CatListRepository {
7 | fun getCats(): Flow>>
8 | suspend fun toggleLike(cat: Cat)
9 | suspend fun deleteCat(cat: Cat)
10 | }
11 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/domain/CatsRepository.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule.domain
2 |
3 | import com.elveum.container.Container
4 | import kotlinx.coroutines.flow.Flow
5 |
6 | interface CatsRepository {
7 | suspend fun deleteCat(cat: Cat)
8 | suspend fun toggleLike(cat: Cat)
9 | fun getById(id: Long): Flow>
10 | fun getCats(): Flow>>
11 | }
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-list/src/main/java/com/uandcode/example/hilt/multimodule/features/list/domain/CatListRepository.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.features.list.domain
2 |
3 | import com.elveum.container.Container
4 | import kotlinx.coroutines.flow.Flow
5 |
6 | interface CatListRepository {
7 | fun getCats(): Flow>>
8 | suspend fun toggleLike(cat: Cat)
9 | suspend fun deleteCat(cat: Cat)
10 | }
11 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/domain/CatsRepository.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.domain
2 |
3 | import com.elveum.container.Container
4 | import kotlinx.coroutines.flow.Flow
5 |
6 | interface CatsRepository {
7 | suspend fun deleteCat(cat: Cat)
8 | suspend fun toggleLike(cat: Cat)
9 | fun getById(id: Long): Flow>
10 | fun getCats(): Flow>>
11 | }
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-list/src/main/java/com/uandcode/example/koin/multimodule/features/list/domain/CatListRepository.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.features.list.domain
2 |
3 | import com.elveum.container.Container
4 | import kotlinx.coroutines.flow.Flow
5 |
6 | interface CatListRepository {
7 | fun getCats(): Flow>>
8 | suspend fun toggleLike(cat: Cat)
9 | suspend fun deleteCat(cat: Cat)
10 | }
11 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/domain/CatsRepository.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.domain
2 |
3 | import com.elveum.container.Container
4 | import kotlinx.coroutines.flow.Flow
5 |
6 | interface CatsRepository {
7 | suspend fun deleteCat(cat: Cat)
8 | suspend fun toggleLike(cat: Cat)
9 | fun getById(id: Long): Flow>
10 | fun getCats(): Flow>>
11 | }
--------------------------------------------------------------------------------
/effects-core/testing/mocks/src/main/java/com/uandcode/effects/core/testing/mocks/EffectWithDefaultTarget.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.testing.mocks
2 |
3 | import com.uandcode.effects.core.annotations.EffectClass
4 |
5 | public interface EffectWithDefaultTarget {
6 | public fun run(input: String)
7 | }
8 |
9 | @EffectClass
10 | public class EffectWithDefaultTargetImpl : EffectWithDefaultTarget {
11 | override fun run(input: String): Unit = Unit
12 | }
13 |
--------------------------------------------------------------------------------
/effects-koin/annotations/src/main/java/com/uandcode/effects/koin/annotations/InstallEffectToNamedScope.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.koin.annotations
2 |
3 | /**
4 | * Assign all target interfaces implemented by a class annotated with [KoinEffect]
5 | * annotation to the specified Koin scope.
6 | *
7 | * This annotation must be used in combination with [KoinEffect].
8 | */
9 | public annotation class InstallEffectToNamedScope(
10 | val value: String
11 | )
12 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-list/src/main/java/com/uandcode/example/core/multimodule/features/list/CatsAction.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.features.list
2 |
3 | import com.uandcode.example.core.multimodule.features.list.domain.Cat
4 |
5 | sealed class CatsAction {
6 | data class Toggle(val cat: Cat) : CatsAction()
7 | data class Delete(val cat: Cat) : CatsAction()
8 | data class ShowDetails(val cat: Cat) : CatsAction()
9 | }
10 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/feature-list/src/main/java/com/uandcode/example/hilt/multimodule/features/list/CatsAction.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.features.list
2 |
3 | import com.uandcode.example.hilt.multimodule.features.list.domain.Cat
4 |
5 | sealed class CatsAction {
6 | data class Toggle(val cat: Cat) : CatsAction()
7 | data class Delete(val cat: Cat) : CatsAction()
8 | data class ShowDetails(val cat: Cat) : CatsAction()
9 | }
10 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-list/src/main/java/com/uandcode/example/koin/multimodule/features/list/CatsAction.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.features.list
2 |
3 | import com.uandcode.example.koin.multimodule.features.list.domain.Cat
4 |
5 | sealed class CatsAction {
6 | data class Toggle(val cat: Cat) : CatsAction()
7 | data class Delete(val cat: Cat) : CatsAction()
8 | data class ShowDetails(val cat: Cat) : CatsAction()
9 | }
10 |
--------------------------------------------------------------------------------
/effects-core/kspcontract-api/src/main/java/com/uandcode/effects/stub/api/InvalidEffectSetupException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.stub.api
2 |
3 | public class InvalidEffectSetupException : Exception(
4 | "The library is not configured properly:\n" +
5 | "1. Review your dependencies in build.gradle file; make sure KSP and your DI framework is configured correctly\n" +
6 | "2. Do not forget to replace RootEffectComponents in integration tests by using setGlobal() method"
7 | )
8 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Hilt App
3 |
4 | Delete
5 | Are you sure you want to delete the cat?
6 | Cat has been deleted
7 | Yes
8 | No
9 | Go Back
10 |
11 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Koin App
3 |
4 | Delete
5 | Are you sure you want to delete the cat?
6 | Cat has been deleted
7 | Yes
8 | No
9 | Go Back
10 |
11 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Core Effects App
3 |
4 | Delete
5 | Are you sure you want to delete the cat?
6 | Cat has been deleted
7 | Yes
8 | No
9 | Go Back
10 |
11 |
--------------------------------------------------------------------------------
/effects-core/compiler-common/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | }
5 |
6 | publishConfig {
7 | artifactId = "effects2-core-compiler-common"
8 | description = "Effects Core Library - Reusable common classes for implementing KSP annotation processors."
9 | }
10 |
11 | dependencies {
12 | implementation(libs.kotlinPoet)
13 | implementation(libs.kotlinPoet.ksp)
14 | implementation(libs.ksp.api)
15 | }
16 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/drawable/ic_favorite.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/drawable/ic_favorite.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/drawable/ic_favorite.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/effects-koin/kspcontract/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | }
5 |
6 | publishConfig {
7 | artifactId = "effects2-koin-kspcontract"
8 | description = "Effects Koin Plugin - Internal KSP contract for accessing auto-generated code"
9 | }
10 |
11 | dependencies {
12 | implementation(projects.effectsCore.essentials)
13 |
14 | implementation(platform(libs.koin.bom))
15 | implementation(libs.koin.core)
16 | }
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/drawable/ic_favorite.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/drawable/ic_favorite.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/drawable/ic_favorite.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/effects-core/compiler/src/main/java/com/uandcode/effects/core/compiler/CoreMetadataGenerator.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.compiler
2 |
3 | import com.uandcode.effects.compiler.common.api.AbstractMetadataGenerator
4 | import com.uandcode.effects.compiler.common.api.KspClassWriter
5 |
6 | internal class CoreMetadataGenerator(
7 | writer: KspClassWriter,
8 | ) : AbstractMetadataGenerator(
9 | templatePath = "com/uandcode/effects/core/compiler/MetadataTemplate.kt",
10 | writer = writer,
11 | )
12 |
--------------------------------------------------------------------------------
/effects-koin/annotations/src/main/java/com/uandcode/effects/koin/annotations/InstallEffectToClassScope.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.koin.annotations
2 |
3 | import kotlin.reflect.KClass
4 |
5 | /**
6 | * Assign all target interfaces implemented by a class annotated with [KoinEffect]
7 | * annotation to the specified Koin scope.
8 | *
9 | * This annotation must be used in combination with [KoinEffect].
10 | */
11 | public annotation class InstallEffectToClassScope(
12 | val value: KClass<*>
13 | )
14 |
--------------------------------------------------------------------------------
/effects-core/testing/compose/src/main/java/com/uandcode/effects/core/compose/testing/TestComposition.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.compose.testing
2 |
3 | import com.uandcode.effects.core.testing.lifecycle.TestLifecycleOwner
4 |
5 | public interface TestComposition {
6 |
7 | public val lifecycleOwner: TestLifecycleOwner
8 |
9 | public fun assertCompositionExists(name: String)
10 |
11 | public fun findChildComposition(name: String): TestComposition?
12 |
13 | public fun emitFrame()
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/compose-components/src/main/res/drawable/ic_favorite.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/compose-components/src/main/res/drawable/ic_favorite.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/compose-components/src/main/res/drawable/ic_favorite.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/effects-koin/essentials/src/main/java/com/uandcode/effects/koin/internal/ConstructorArg.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.koin.internal
2 |
3 | internal class ConstructorArg : AutoCloseable {
4 |
5 | private var closeable: AutoCloseable? = null
6 |
7 | fun assignCloseable(closeable: AutoCloseable) {
8 | this.closeable = closeable
9 | }
10 |
11 | fun hasCloseable() = closeable != null
12 |
13 | override fun close() {
14 | closeable?.close()
15 | closeable = null
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/java/com/uandcode/example/core/multimodule/app/AndroidResources.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.app
2 |
3 | import android.content.Context
4 | import androidx.annotation.StringRes
5 | import com.uandcode.example.core.multimodule.effects.api.Resources
6 |
7 | class AndroidResources(
8 | private val context: Context
9 | ) : Resources {
10 |
11 | override fun getString(@StringRes resId: Int): String {
12 | return context.getString(resId)
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/java/com/uandcode/example/koin/multimodule/app/AndroidResources.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.app
2 |
3 | import android.content.Context
4 | import androidx.annotation.StringRes
5 | import com.uandcode.example.koin.multimodule.effects.api.Resources
6 |
7 | class AndroidResources(
8 | private val context: Context
9 | ) : Resources {
10 |
11 | override fun getString(@StringRes resId: Int): String {
12 | return context.getString(resId)
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/java/com/uandcode/example/koin/multimodule/app/di/ViewModelsModule.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.app.di
2 |
3 | import com.uandcode.example.koin.multimodule.features.details.CatDetailsViewModel
4 | import com.uandcode.example.koin.multimodule.features.list.CatsViewModel
5 | import org.koin.core.module.dsl.viewModelOf
6 | import org.koin.dsl.module
7 |
8 | val viewModelsModule = module {
9 | viewModelOf(::CatsViewModel)
10 | viewModelOf(::CatDetailsViewModel)
11 | }
12 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/di/ViewModelsModule.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.di
2 |
3 | import com.uandcode.example.koin.singlemodule.presentation.details.CatDetailsViewModel
4 | import com.uandcode.example.koin.singlemodule.presentation.list.CatsViewModel
5 | import org.koin.core.module.dsl.viewModelOf
6 | import org.koin.dsl.module
7 |
8 | val viewModelsModule = module {
9 | viewModelOf(::CatsViewModel)
10 | viewModelOf(::CatDetailsViewModel)
11 | }
12 |
--------------------------------------------------------------------------------
/effects-core/testing/mocks/src/main/java/com/uandcode/effects/core/testing/mocks/EffectWithOverriddenClose.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.testing.mocks
2 |
3 | import com.uandcode.effects.core.annotations.EffectClass
4 |
5 | public interface EffectWithOverriddenClose : AutoCloseable {
6 | public fun run(input: String)
7 | public override fun close(): Unit = Unit
8 | }
9 |
10 | @EffectClass
11 | public class EffectWithOverriddenCloseImpl : EffectWithOverriddenClose {
12 | override fun run(input: String): Unit = Unit
13 | }
14 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-impl-toasts/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.android.library)
3 | alias(libs.plugins.ksp)
4 | }
5 |
6 | android {
7 | namespace = "com.uandcode.example.koin.multimodule.effects.toasts"
8 | }
9 |
10 | ksp {
11 | arg("effects.processor.metadata", "generate")
12 | }
13 |
14 | dependencies {
15 | api(projects.appExamples.koin.appMultimodule.effectInterfaces)
16 |
17 | implementation(libs.effects.koin.annotations)
18 | ksp(libs.effects.koin.compiler)
19 | }
20 |
--------------------------------------------------------------------------------
/effects-core/annotations/src/main/java/com/uandcode/effects/core/annotations/EffectMetadata.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.annotations
2 |
3 | /**
4 | * For internal usage.
5 | *
6 | * This annotation is used by KSP code generator for correct collecting
7 | * of effect interfaces in multi-module projects.
8 | */
9 | @Retention(AnnotationRetention.BINARY)
10 | @Target(AnnotationTarget.CLASS)
11 | public annotation class EffectMetadata(
12 | val interfaceClassNames: Array,
13 | val implementationClassName: String,
14 | )
15 |
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/exceptions/UnitCommandWithReturnTypeException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.exceptions
2 |
3 | import com.google.devtools.ksp.symbol.KSFunctionDeclaration
4 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
5 |
6 | internal class UnitCommandWithReturnTypeException(
7 | function: KSFunctionDeclaration,
8 | ) : AbstractEffectKspException(
9 | "Non-suspend methods can't have a return type",
10 | function,
11 | )
12 |
--------------------------------------------------------------------------------
/effects-core/testing/mocks/src/main/java/com/uandcode/effects/core/testing/mocks/EffectWithTarget.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.testing.mocks
2 |
3 | import com.uandcode.effects.core.annotations.EffectClass
4 |
5 | public interface EffectWithTarget {
6 | public fun run(input: String)
7 | }
8 |
9 | @EffectClass(
10 | targets = [EffectWithTarget::class],
11 | )
12 | public class EffectWithTargetImpl : Runnable, EffectWithTarget {
13 | override fun run(): Unit = Unit
14 | override fun run(input: String): Unit = Unit
15 | }
16 |
--------------------------------------------------------------------------------
/effects-koin/essentials/src/main/java/com/uandcode/effects/koin/exceptions/DuplicateEffectScopeException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.koin.exceptions
2 |
3 | import org.koin.core.qualifier.Qualifier
4 |
5 | /**
6 | * This exception is thrown when the validation logic finds
7 | * a duplicated effectScope { ... } definition in your Koin modules.
8 | */
9 | public class DuplicateEffectScopeException(
10 | duplicatedDefinition: Qualifier
11 | ) : Exception(
12 | "Found duplicated effectScope() definition: $duplicatedDefinition"
13 | )
14 |
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/generators/DefaultMetadataGenerator.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.generators
2 |
3 | import com.uandcode.effects.compiler.common.api.AbstractMetadataGenerator
4 | import com.uandcode.effects.compiler.common.api.KspClassWriter
5 |
6 | internal class DefaultMetadataGenerator(
7 | writer: KspClassWriter,
8 | ) : AbstractMetadataGenerator(
9 | templatePath = "com/uandcode/effects/core/compiler/MetadataTemplate.kt",
10 | writer = writer,
11 | )
12 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/effects/toasts/AndroidToasts.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule.effects.toasts
2 |
3 | import android.content.Context
4 | import android.widget.Toast
5 | import com.uandcode.effects.core.annotations.EffectClass
6 |
7 | @EffectClass
8 | class AndroidToasts(
9 | private val context: Context,
10 | ) : Toasts {
11 |
12 | override fun toast(message: String) {
13 | Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/effects/toasts/AndroidToasts.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.effects.toasts
2 |
3 | import android.content.Context
4 | import android.widget.Toast
5 | import com.uandcode.effects.hilt.annotations.HiltEffect
6 |
7 | @HiltEffect
8 | class AndroidToasts(
9 | private val context: Context,
10 | ) : Toasts {
11 |
12 | override fun toast(message: String) {
13 | Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/effects/toasts/AndroidToasts.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.effects.toasts
2 |
3 | import android.content.Context
4 | import android.widget.Toast
5 | import com.uandcode.effects.koin.annotations.KoinEffect
6 |
7 | @KoinEffect
8 | class AndroidToasts(
9 | private val context: Context,
10 | ) : Toasts {
11 |
12 | override fun toast(message: String) {
13 | Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/effects-core/compiler/src/test/java/implementation_package/CompiledEffectImpl.kt:
--------------------------------------------------------------------------------
1 | package implementation_package
2 |
3 | import interface1_package.CompiledEffect1
4 | import interface2_package.CompiledEffect2
5 |
6 | // pre-compiled effect for testing KSP code generation which uses
7 | // metadata classes as input sources (a.k.a. testing the library in
8 | // multi-module projects)
9 | class CompiledEffectImpl : CompiledEffect1, CompiledEffect2 {
10 | override fun runEffect1(input1: String) = Unit
11 | override fun runEffect2(input2: Int) = Unit
12 | }
13 |
--------------------------------------------------------------------------------
/effects-core/testing/mocks/src/main/java/com/uandcode/effects/core/testing/mocks/CombinedEffect.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.testing.mocks
2 |
3 | import com.uandcode.effects.core.annotations.EffectClass
4 |
5 | public interface Effect1 {
6 | public fun run1(input: String)
7 | }
8 |
9 | public interface Effect2 {
10 | public fun run2(input: String)
11 | }
12 |
13 | @EffectClass
14 | public class CombinedEffect : Effect1, Effect2 {
15 | override fun run1(input: String): Unit = Unit
16 | override fun run2(input: String): Unit = Unit
17 | }
--------------------------------------------------------------------------------
/effects-core/lifecycle/src/main/java/com/uandcode/effects/core/lifecycle/EffectLifecycleDelegate.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.lifecycle
2 |
3 | import kotlin.reflect.KProperty
4 |
5 | /**
6 | * This interface is used as a return type of [lazyEffect] function.
7 | * As a result, you can use [lazyEffect] like this:
8 | *
9 | * ```
10 | * val effect by lazyEffect { EffectImpl() }
11 | * ```
12 | *
13 | * @see lazyEffect
14 | */
15 | public interface EffectLifecycleDelegate {
16 | public operator fun getValue(thisRef: Any?, property: KProperty<*>): T
17 | }
18 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
11 | @color/purple_700
12 | #ababab
13 |
14 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
11 | @color/purple_700
12 | #ababab
13 |
14 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
11 | @color/purple_700
12 | #ababab
13 |
14 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
11 | @color/purple_700
12 | #ababab
13 |
14 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
11 | @color/purple_700
12 | #ababab
13 |
14 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
11 | @color/purple_700
12 | #ababab
13 |
14 |
--------------------------------------------------------------------------------
/effects-koin/annotations/src/main/java/com/uandcode/effects/koin/annotations/KoinEffectMetadata.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.koin.annotations
2 |
3 | /**
4 | * For internal usage.
5 | *
6 | * This annotation is used by KSP code generator for correct collecting
7 | * of effect interfaces in multi-module projects.
8 | */
9 | @Retention(AnnotationRetention.BINARY)
10 | @Target(AnnotationTarget.CLASS)
11 | public annotation class KoinEffectMetadata(
12 | val interfaceClassNames: Array,
13 | val implementationClassName: String,
14 | val koinScope: String,
15 | )
16 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/effects/resources/AndroidResources.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule.effects.resources
2 |
3 | import android.content.Context
4 | import androidx.annotation.StringRes
5 |
6 | // no need to add EffectClass, because Resources can use an application
7 | // context and be a singleton
8 | class AndroidResources(
9 | private val context: Context
10 | ) : Resources {
11 |
12 | override fun getString(@StringRes id: Int): String {
13 | return context.getString(id)
14 | }
15 |
16 | }
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/compose-components/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
11 | @color/purple_700
12 | #ababab
13 |
14 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-impl-toasts/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.android.library)
3 | alias(libs.plugins.ksp)
4 | }
5 |
6 | android {
7 | namespace = "com.uandcode.example.core.multimodule.effects.toasts"
8 | }
9 |
10 | ksp {
11 | arg("effects.processor.metadata", "generate")
12 | }
13 |
14 | dependencies {
15 | api(projects.appExamples.core.appMultimodule.effectInterfaces)
16 |
17 | implementation(libs.effects.core.essentials)
18 | implementation(libs.effects.core.annotations)
19 | ksp(libs.effects.core.compiler)
20 | }
21 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/compose-components/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
11 | @color/purple_700
12 | #ababab
13 |
14 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/compose-components/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
11 | @color/purple_700
12 | #ababab
13 |
14 |
--------------------------------------------------------------------------------
/effects-hilt/annotations/src/main/java/com/uandcode/effects/hilt/annotations/HiltEffectMetadata.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.hilt.annotations
2 |
3 | /**
4 | * For internal usage.
5 | *
6 | * This annotation is used by KSP code generator for correct collecting
7 | * of effect interfaces in multi-module projects.
8 | */
9 | @Retention(AnnotationRetention.BINARY)
10 | @Target(AnnotationTarget.CLASS)
11 | public annotation class HiltEffectMetadata(
12 | val interfaceClassNames: Array,
13 | val implementationClassName: String,
14 | val hiltComponentClassName: String,
15 | )
16 |
--------------------------------------------------------------------------------
/effects-koin/compiler/src/main/java/com/uandcode/effects/koin/compiler/exception/ScopeAnnotationConflictException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.koin.compiler.exception
2 |
3 | import com.google.devtools.ksp.symbol.KSNode
4 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
5 |
6 | class ScopeAnnotationConflictException(
7 | node: KSNode,
8 | ) : AbstractEffectKspException(
9 | "Both @InstallEffectToClassScope and @InstallEffectToNamedScope annotations are " +
10 | "not allowed for the same class. Please, use only one of them.",
11 | node,
12 | )
13 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/effects/resources/AndroidResources.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.effects.resources
2 |
3 | import android.content.Context
4 | import androidx.annotation.StringRes
5 |
6 | // no need to add HiltEffect, because Resources can use an application
7 | // context and be a singleton
8 | class AndroidResources constructor(
9 | private val context: Context
10 | ) : Resources {
11 |
12 | override fun getString(@StringRes id: Int): String {
13 | return context.getString(id)
14 | }
15 |
16 | }
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-impl-dialogs-android/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.android.library)
3 | alias(libs.plugins.ksp)
4 | }
5 |
6 | android {
7 | namespace = "com.uandcode.example.koin.multimodule.effects.dialogs.android"
8 | }
9 |
10 | ksp {
11 | arg("effects.processor.metadata", "generate")
12 | }
13 |
14 | dependencies {
15 | api(projects.appExamples.koin.appMultimodule.effectInterfaces)
16 |
17 | implementation(libs.effects.koin.annotations)
18 | ksp(libs.effects.koin.compiler)
19 |
20 | implementation(libs.coroutines.core)
21 | }
22 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-impl-dialogs-android/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.android.library)
3 | alias(libs.plugins.ksp)
4 | }
5 |
6 | android {
7 | namespace = "com.uandcode.example.core.multimodule.effects.dialogs.android"
8 | }
9 |
10 | ksp {
11 | arg("effects.processor.metadata", "generate")
12 | }
13 |
14 | dependencies {
15 | api(projects.appExamples.core.appMultimodule.effectInterfaces)
16 |
17 | implementation(libs.effects.core.essentials)
18 | implementation(libs.effects.core.annotations)
19 | ksp(libs.effects.core.compiler)
20 | }
21 |
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/exceptions/NonUnitCleanUpFunctionException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.exceptions
2 |
3 | import com.google.devtools.ksp.symbol.KSFunctionDeclaration
4 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
5 |
6 | internal class NonUnitCleanUpFunctionException(
7 | cleanUpFunctionDeclaration: KSFunctionDeclaration,
8 | ) : AbstractEffectKspException(
9 | message = "Clean-up function '${cleanUpFunctionDeclaration.simpleName.asString()}' should not return any type",
10 | cleanUpFunctionDeclaration,
11 | )
12 |
--------------------------------------------------------------------------------
/effects-hilt/compiler-test/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.android.library)
3 | alias(libs.plugins.hilt)
4 | alias(libs.plugins.ksp)
5 | }
6 |
7 | android {
8 | namespace = "com.uandcode.effects.hilt.compiler.test"
9 | }
10 |
11 | dependencies {
12 | implementation(projects.effectsHilt.compiler)
13 | implementation(projects.effectsHilt.essentials)
14 | testImplementation(projects.effectsCore.testing.ksp)
15 |
16 | implementation(libs.hilt.android)
17 | ksp(libs.hilt.compiler)
18 |
19 | testImplementation(libs.ksp.api)
20 | testImplementation(libs.coroutines.core)
21 | }
22 |
--------------------------------------------------------------------------------
/effects-hilt/compiler-test/src/test/java/implementation_package/CompiledEffectImpl.kt:
--------------------------------------------------------------------------------
1 | package implementation_package
2 |
3 | import com.uandcode.effects.hilt.annotations.HiltEffect
4 | import interface1_package.CompiledEffect1
5 | import interface2_package.CompiledEffect2
6 |
7 | // pre-compiled effect for testing KSP code generation which uses
8 | // metadata classes as input sources (a.k.a. testing the library in
9 | // multi-module projects)
10 | @HiltEffect
11 | class CompiledEffectImpl : CompiledEffect1, CompiledEffect2 {
12 | override fun runEffect1(input1: String) = Unit
13 | override fun runEffect2(input2: Int) = Unit
14 | }
15 |
--------------------------------------------------------------------------------
/effects-koin/compiler/src/main/java/com/uandcode/effects/koin/compiler/data/KoinParsedEffect.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.koin.compiler.data
2 |
3 | import com.squareup.kotlinpoet.ClassName
4 | import com.uandcode.effects.compiler.common.api.data.ParsedEffect
5 | import com.uandcode.effects.compiler.common.api.extensions.KSClassDeclarationWrapper
6 |
7 | class KoinParsedEffect(
8 | classDeclaration: KSClassDeclarationWrapper,
9 | annotationClassName: ClassName,
10 | ) : ParsedEffect(classDeclaration, annotationClassName) {
11 |
12 | val koinScope: KoinScope by lazy { KoinScope.fromEffectClass(classDeclaration) }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-impl-toasts/src/main/java/com/uandcode/example/core/multimodule/effects/toasts/AndroidToasts.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.effects.toasts
2 |
3 | import android.content.Context
4 | import android.widget.Toast
5 | import com.uandcode.effects.core.annotations.EffectClass
6 | import com.uandcode.example.core.multimodule.effects.api.Toasts
7 |
8 | @EffectClass
9 | public class AndroidToasts(
10 | private val context: Context,
11 | ) : Toasts {
12 |
13 | override fun toast(message: String) {
14 | Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-impl-toasts/src/main/java/com/uandcode/example/hilt/multimodule/effects/toasts/AndroidToasts.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.effects.toasts
2 |
3 | import android.content.Context
4 | import android.widget.Toast
5 | import com.uandcode.effects.hilt.annotations.HiltEffect
6 | import com.uandcode.example.hilt.multimodule.effects.api.Toasts
7 |
8 | @HiltEffect
9 | public class AndroidToasts(
10 | private val context: Context,
11 | ) : Toasts {
12 |
13 | override fun toast(message: String) {
14 | Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-impl-toasts/src/main/java/com/uandcode/example/koin/multimodule/effects/toasts/AndroidToasts.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.effects.toasts
2 |
3 | import android.content.Context
4 | import android.widget.Toast
5 | import com.uandcode.effects.koin.annotations.KoinEffect
6 | import com.uandcode.example.koin.multimodule.effects.api.Toasts
7 |
8 | @KoinEffect
9 | public class AndroidToasts(
10 | private val context: Context,
11 | ) : Toasts {
12 |
13 | override fun toast(message: String) {
14 | Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/exceptions/CleanUpFunctionHasArgumentsException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.exceptions
2 |
3 | import com.google.devtools.ksp.symbol.KSFunctionDeclaration
4 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
5 |
6 | internal class CleanUpFunctionHasArgumentsException(
7 | cleanUpFunctionDeclaration: KSFunctionDeclaration,
8 | ) : AbstractEffectKspException(
9 | message = "Clean-up function '${cleanUpFunctionDeclaration.simpleName.asString()}' should not have parameters",
10 | cleanUpFunctionDeclaration,
11 | )
12 |
--------------------------------------------------------------------------------
/effects-core/essentials/src/main/java/com/uandcode/effects/core/internal/scopes/GlobalEffectScope.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.internal.scopes
2 |
3 | import com.uandcode.effects.core.EffectScope
4 | import com.uandcode.effects.core.factories.DefaultProxyEffectFactory
5 | import com.uandcode.effects.core.ManagedInterfaces
6 |
7 | internal fun buildGlobalEffectScope(): EffectScope {
8 | return LazyEffectScope {
9 | DefaultEffectScope(
10 | managedInterfaces = ManagedInterfaces.Everything,
11 | proxyEffectFactory = DefaultProxyEffectFactory(),
12 | parent = null,
13 | )
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/java/com/uandcode/example/hilt/multimodule/app/di/ResourcesModule.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.app.di
2 |
3 | import com.uandcode.example.hilt.multimodule.effects.api.Resources
4 | import com.uandcode.example.hilt.multimodule.app.AndroidResources
5 | import dagger.Binds
6 | import dagger.Module
7 | import dagger.hilt.InstallIn
8 | import dagger.hilt.components.SingletonComponent
9 |
10 | @Module
11 | @InstallIn(SingletonComponent::class)
12 | interface ResourcesModule {
13 |
14 | @Binds
15 | fun bindResources(
16 | impl: AndroidResources
17 | ): Resources
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/exceptions/NestedClassException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.exceptions
2 |
3 | import com.google.devtools.ksp.symbol.KSNode
4 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
5 | import com.uandcode.effects.compiler.common.api.extensions.KSAnnotationWrapper
6 |
7 | internal class NestedClassException(
8 | effectAnnotation: KSAnnotationWrapper,
9 | node: KSNode,
10 | ) : AbstractEffectKspException(
11 | message = "Class annotated with @${effectAnnotation.simpleName} should be a top-level class",
12 | node,
13 | )
14 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-impl-toasts/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.android.library)
3 | alias(libs.plugins.ksp)
4 | alias(libs.plugins.hilt)
5 | }
6 |
7 | android {
8 | namespace = "com.uandcode.example.hilt.multimodule.effects.toasts"
9 | }
10 |
11 | ksp {
12 | arg("effects.processor.metadata", "generate")
13 | }
14 |
15 | dependencies {
16 | api(projects.appExamples.hilt.appMultimodule.effectInterfaces)
17 |
18 | implementation(libs.effects.hilt.annotations)
19 | ksp(libs.effects.hilt.compiler)
20 |
21 | implementation(libs.hilt.android)
22 | ksp(libs.hilt.compiler)
23 | }
24 |
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/exceptions/ClassIsAbstractException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.exceptions
2 |
3 | import com.google.devtools.ksp.symbol.KSNode
4 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
5 | import com.uandcode.effects.compiler.common.api.extensions.KSAnnotationWrapper
6 |
7 | internal class ClassIsAbstractException(
8 | effectAnnotation: KSAnnotationWrapper,
9 | node: KSNode,
10 | ) : AbstractEffectKspException(
11 | message = "Class annotated with @${effectAnnotation.simpleName} should not be abstract",
12 | node,
13 | )
14 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/di/ResourcesModule.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.di
2 |
3 | import com.uandcode.example.hilt.singlemodule.effects.resources.AndroidResources
4 | import com.uandcode.example.hilt.singlemodule.effects.resources.Resources
5 | import dagger.Binds
6 | import dagger.Module
7 | import dagger.hilt.InstallIn
8 | import dagger.hilt.components.SingletonComponent
9 |
10 | @Module
11 | @InstallIn(SingletonComponent::class)
12 | interface ResourcesModule {
13 |
14 | @Binds
15 | fun bindResources(
16 | impl: AndroidResources
17 | ): Resources
18 |
19 | }
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/exceptions/InvalidClassTypeException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.exceptions
2 |
3 | import com.google.devtools.ksp.symbol.KSNode
4 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
5 | import com.uandcode.effects.compiler.common.api.extensions.KSAnnotationWrapper
6 |
7 | internal class InvalidClassTypeException(
8 | effectAnnotation: KSAnnotationWrapper,
9 | node: KSNode,
10 | ) : AbstractEffectKspException(
11 | message = "Symbol annotated with @${effectAnnotation.simpleName} should be a Class or Object",
12 | node,
13 | )
14 |
--------------------------------------------------------------------------------
/effects-hilt/compiler/src/main/resources/com/uandcode/effects/hilt/compiler/HiltImplementationModuleTemplate.kt:
--------------------------------------------------------------------------------
1 | %PACKAGE_STATEMENT%
2 |
3 | import com.uandcode.effects.core.EffectScope
4 | import com.uandcode.effects.core.EffectController
5 | import com.uandcode.effects.core.getController
6 | import dagger.Module
7 | import dagger.Provides
8 | import dagger.hilt.InstallIn
9 | import %HILT_COMPONENT%
10 |
11 | @Module
12 | @InstallIn(%HILT_COMPONENT_NAME%::class)
13 | internal object %CLASSNAME% {
14 | @Provides
15 | fun provideController(effectScope: EffectScope): EffectController<%EFFECT_NAME%> {
16 | return effectScope.getController()
17 | }
18 | }
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/compose-components/build.gradle.kts:
--------------------------------------------------------------------------------
1 | import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode
2 |
3 | plugins {
4 | alias(libs.plugins.custom.android.library)
5 | alias(libs.plugins.compose)
6 | }
7 |
8 | android {
9 | namespace = "com.uandcode.example.core.multimodule.compose"
10 | buildFeatures {
11 | compose = true
12 | }
13 | }
14 |
15 | kotlin {
16 | explicitApi = ExplicitApiMode.Disabled
17 | }
18 |
19 | dependencies {
20 | implementation(libs.container)
21 | implementation(platform(libs.compose.bom))
22 | implementation(libs.compose.ui)
23 | implementation(libs.compose.material3)
24 | }
25 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/compose-components/build.gradle.kts:
--------------------------------------------------------------------------------
1 | import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode
2 |
3 | plugins {
4 | alias(libs.plugins.custom.android.library)
5 | alias(libs.plugins.compose)
6 | }
7 |
8 | android {
9 | namespace = "com.uandcode.example.hilt.multimodule.compose"
10 | buildFeatures {
11 | compose = true
12 | }
13 | }
14 |
15 | kotlin {
16 | explicitApi = ExplicitApiMode.Disabled
17 | }
18 |
19 | dependencies {
20 | implementation(libs.container)
21 | implementation(platform(libs.compose.bom))
22 | implementation(libs.compose.ui)
23 | implementation(libs.compose.material3)
24 | }
25 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/di/RepositoriesModule.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.di
2 |
3 | import com.uandcode.example.hilt.singlemodule.data.InMemoryCatsRepository
4 | import com.uandcode.example.hilt.singlemodule.domain.CatsRepository
5 | import dagger.Binds
6 | import dagger.Module
7 | import dagger.hilt.InstallIn
8 | import dagger.hilt.components.SingletonComponent
9 |
10 | @Module
11 | @InstallIn(SingletonComponent::class)
12 | interface RepositoriesModule {
13 |
14 | @Binds
15 | fun bindCatsRepository(
16 | impl: InMemoryCatsRepository
17 | ): CatsRepository
18 |
19 | }
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/compose-components/build.gradle.kts:
--------------------------------------------------------------------------------
1 | import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode
2 |
3 | plugins {
4 | alias(libs.plugins.custom.android.library)
5 | alias(libs.plugins.compose)
6 | }
7 |
8 | android {
9 | namespace = "com.uandcode.example.koin.multimodule.compose"
10 | buildFeatures {
11 | compose = true
12 | }
13 | }
14 |
15 | kotlin {
16 | explicitApi = ExplicitApiMode.Disabled
17 | }
18 |
19 | dependencies {
20 | implementation(libs.container)
21 | implementation(platform(libs.compose.bom))
22 | implementation(libs.compose.ui)
23 | implementation(libs.compose.material3)
24 | }
25 |
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/exceptions/NestedInterfaceException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.exceptions
2 |
3 | import com.google.devtools.ksp.symbol.KSNode
4 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
5 | import com.uandcode.effects.compiler.common.api.extensions.KSAnnotationWrapper
6 |
7 | internal class NestedInterfaceException(
8 | effectAnnotation: KSAnnotationWrapper,
9 | node: KSNode,
10 | ) : AbstractEffectKspException(
11 | message = "Class annotated with @${effectAnnotation.simpleName} should not implement nested interface",
12 | node,
13 | )
14 |
--------------------------------------------------------------------------------
/effects-core/runtime/src/main/java/com/uandcode/effects/core/runtime/RuntimeProxyConfiguration.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.runtime
2 |
3 | import com.uandcode.effects.stub.api.ProxyConfiguration
4 | import kotlin.reflect.KClass
5 |
6 | internal object RuntimeProxyConfiguration : ProxyConfiguration {
7 | override fun effectNotFoundMessage(clazz: KClass<*>): String {
8 | return "Effect not found: ${clazz.qualifiedName}. " +
9 | "You are using the runtime effect component, which means that for each interface " +
10 | "defined in the component, a proxy implementation is created through reflection API at runtime."
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/effect-impl-dialogs-android/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.android.library)
3 | alias(libs.plugins.ksp)
4 | alias(libs.plugins.hilt)
5 | }
6 |
7 | android {
8 | namespace = "com.uandcode.example.hilt.multimodule.effects.dialogs.android"
9 | }
10 |
11 | ksp {
12 | arg("effects.processor.metadata", "generate")
13 | }
14 |
15 | dependencies {
16 | api(projects.appExamples.hilt.appMultimodule.effectInterfaces)
17 |
18 | implementation(libs.effects.hilt.annotations)
19 | ksp(libs.effects.hilt.compiler)
20 |
21 | implementation(libs.hilt.android)
22 | ksp(libs.hilt.compiler)
23 | }
24 |
--------------------------------------------------------------------------------
/effects-core/essentials/src/main/java/com/uandcode/effects/core/GeneratedProxyEffectStoreProvider.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core
2 |
3 | import com.uandcode.effects.core.kspcontract.AnnotationBasedProxyEffectStore
4 | import com.uandcode.effects.stub.api.InvalidEffectSetupException
5 | import com.uandcode.effects.stub.api.ProxyEffectStore
6 |
7 | public object GeneratedProxyEffectStoreProvider {
8 |
9 | public fun getGeneratedProxyEffectStore(): ProxyEffectStore {
10 | try {
11 | return AnnotationBasedProxyEffectStore
12 | } catch (e: Throwable) {
13 | throw InvalidEffectSetupException()
14 | }
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/exceptions/ClassWithTypeParametersException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.exceptions
2 |
3 | import com.google.devtools.ksp.symbol.KSNode
4 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
5 | import com.uandcode.effects.compiler.common.api.extensions.KSAnnotationWrapper
6 |
7 | internal class ClassWithTypeParametersException(
8 | effectAnnotation: KSAnnotationWrapper,
9 | node: KSNode,
10 | ) : AbstractEffectKspException(
11 | message = "Class annotated with @${effectAnnotation.simpleName} should not have type parameters",
12 | node,
13 | )
14 |
--------------------------------------------------------------------------------
/effects-core/essentials/src/main/java/com/uandcode/effects/core/internal/scopes/EmptyEffectScope.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.internal.scopes
2 |
3 | import com.uandcode.effects.core.EffectScope
4 | import com.uandcode.effects.core.ManagedInterfaces
5 | import com.uandcode.effects.core.factories.ProxyEffectFactory
6 |
7 | internal fun buildEmptyEffectScope(
8 | proxyEffectFactory: ProxyEffectFactory
9 | ): EffectScope {
10 | return LazyEffectScope {
11 | DefaultEffectScope(
12 | managedInterfaces = ManagedInterfaces.ListOf(),
13 | proxyEffectFactory = proxyEffectFactory,
14 | parent = null,
15 | )
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/res/drawable/ic_favorite_not.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/res/drawable/ic_favorite_not.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/res/drawable/ic_favorite_not.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/res/drawable/ic_favorite_not.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/res/drawable/ic_favorite_not.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/res/drawable/ic_favorite_not.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/exceptions/TargetInterfaceIsNotSpecifiedException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.exceptions
2 |
3 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
4 | import com.uandcode.effects.compiler.common.api.extensions.KSAnnotationWrapper
5 |
6 | internal class TargetInterfaceIsNotSpecifiedException(
7 | effectAnnotation: KSAnnotationWrapper,
8 | ) : AbstractEffectKspException(
9 | message = "${effectAnnotation.printableName}(target = ...) parameter should be specified if your class " +
10 | "implements more than 1 interface",
11 | effectAnnotation,
12 | )
13 |
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/App.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule
2 |
3 | import android.app.Application
4 | import com.uandcode.example.core.singlemodule.data.InMemoryCatsRepository
5 | import com.uandcode.example.core.singlemodule.di.Singletons
6 | import com.uandcode.example.core.singlemodule.effects.resources.AndroidResources
7 |
8 | class App : Application(), Singletons {
9 |
10 | override fun onCreate() {
11 | super.onCreate()
12 | Singletons.init(this)
13 | }
14 |
15 | override val catsRepository = InMemoryCatsRepository()
16 | override val resources = AndroidResources(this)
17 |
18 | }
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/exceptions/ClassDoesNotImplementInterfaceException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.exceptions
2 |
3 | import com.google.devtools.ksp.symbol.KSNode
4 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
5 | import com.uandcode.effects.compiler.common.api.extensions.KSAnnotationWrapper
6 |
7 | internal class ClassDoesNotImplementInterfaceException(
8 | effectAnnotation: KSAnnotationWrapper,
9 | node: KSNode,
10 | ) : AbstractEffectKspException(
11 | message = "Class annotated with @${effectAnnotation.simpleName} should implement at least one interface",
12 | node,
13 | )
14 |
--------------------------------------------------------------------------------
/effects-hilt/compiler/build.gradle.kts:
--------------------------------------------------------------------------------
1 | import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode
2 |
3 | plugins {
4 | alias(libs.plugins.custom.library)
5 | alias(libs.plugins.custom.maven.publish)
6 | }
7 |
8 | publishConfig {
9 | artifactId = "effects2-hilt-compiler"
10 | description = "Effects Hilt Plugin (KSP annotation processor) for simplifying the implementation of one-off events"
11 | }
12 |
13 | kotlin {
14 | explicitApi = ExplicitApiMode.Disabled
15 | }
16 |
17 | dependencies {
18 | implementation(projects.effectsCore.compilerCommon)
19 |
20 | implementation(libs.kotlinPoet)
21 | implementation(libs.kotlinPoet.ksp)
22 | implementation(libs.ksp.api)
23 | }
24 |
--------------------------------------------------------------------------------
/effects-hilt/essentials/src/main/java/com/uandcode/effects/hilt/internal/InternalRegisteredEffect.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.hilt.internal
2 |
3 | import com.uandcode.effects.hilt.internal.qualifiers.AbstractInternalQualifier
4 | import kotlin.reflect.KClass
5 |
6 | public data class InternalRegisteredEffect(
7 | public val clazz: KClass<*>,
8 | public val qualifier: KClass,
9 | )
10 |
11 | public fun Set.filterByQualifier(
12 | qualifier: KClass
13 | ): Array> {
14 | return this.filter { it.qualifier == qualifier }
15 | .map { it.clazz }
16 | .toTypedArray()
17 | }
18 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/app/src/main/java/com/uandcode/example/core/multimodule/app/data/Cat.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.app.data
2 |
3 | import com.uandcode.example.core.multimodule.features.list.domain.Cat as FeatureListCat
4 | import com.uandcode.example.core.multimodule.features.details.domain.Cat as FeatureDetailsCat
5 |
6 | data class Cat(
7 | override val id: Long,
8 | override val name: String,
9 | override val image: String,
10 | override val details: String,
11 | override val isLiked: Boolean,
12 | ) : FeatureListCat, FeatureDetailsCat
13 |
14 | fun FeatureListCat.toDataModel() = this as Cat
15 | fun FeatureDetailsCat.toDataModel() = this as Cat
16 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/compose-components/src/main/res/drawable/ic_favorite_not.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/java/com/uandcode/example/hilt/multimodule/app/data/Cat.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.app.data
2 |
3 | import com.uandcode.example.hilt.multimodule.features.list.domain.Cat as FeatureListCat
4 | import com.uandcode.example.hilt.multimodule.features.details.domain.Cat as FeatureDetailsCat
5 |
6 | data class Cat(
7 | override val id: Long,
8 | override val name: String,
9 | override val image: String,
10 | override val details: String,
11 | override val isLiked: Boolean,
12 | ) : FeatureListCat, FeatureDetailsCat
13 |
14 | fun FeatureListCat.toDataModel() = this as Cat
15 | fun FeatureDetailsCat.toDataModel() = this as Cat
16 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/compose-components/src/main/res/drawable/ic_favorite_not.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/app/src/main/java/com/uandcode/example/koin/multimodule/app/data/Cat.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.app.data
2 |
3 | import com.uandcode.example.koin.multimodule.features.list.domain.Cat as FeatureListCat
4 | import com.uandcode.example.koin.multimodule.features.details.domain.Cat as FeatureDetailsCat
5 |
6 | data class Cat(
7 | override val id: Long,
8 | override val name: String,
9 | override val image: String,
10 | override val details: String,
11 | override val isLiked: Boolean,
12 | ) : FeatureListCat, FeatureDetailsCat
13 |
14 | fun FeatureListCat.toDataModel() = this as Cat
15 | fun FeatureDetailsCat.toDataModel() = this as Cat
16 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/compose-components/src/main/res/drawable/ic_favorite_not.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-multimodule/app/src/main/java/com/uandcode/example/hilt/multimodule/app/AndroidResources.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.multimodule.app
2 |
3 | import android.content.Context
4 | import androidx.annotation.StringRes
5 | import com.uandcode.example.hilt.multimodule.effects.api.Resources
6 | import dagger.hilt.android.qualifiers.ApplicationContext
7 | import javax.inject.Inject
8 | import javax.inject.Singleton
9 |
10 | @Singleton
11 | class AndroidResources @Inject constructor(
12 | @ApplicationContext private val context: Context
13 | ) : Resources {
14 |
15 | override fun getString(@StringRes resId: Int): String {
16 | return context.getString(resId)
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/effects-core/compose/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | alias(libs.plugins.compose)
5 | }
6 |
7 | publishConfig {
8 | artifactId = "effects2-core-compose"
9 | description = "Effects Core Library - Extensions for Jetpack Compose."
10 | }
11 |
12 | dependencies {
13 | testImplementation(projects.effectsCore.testing.compose)
14 | testImplementation(projects.effectsCore.testing.mocks)
15 | api(projects.effectsCore.lifecycle)
16 |
17 | implementation(libs.lifecycle.runtime.compose)
18 | api(libs.immutable.collections)
19 |
20 | testImplementation(libs.junit)
21 | testImplementation(libs.mockk)
22 | }
23 |
--------------------------------------------------------------------------------
/effects-hilt/essentials/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.android.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | alias(libs.plugins.hilt)
5 | alias(libs.plugins.ksp)
6 | }
7 |
8 | android {
9 | namespace = "com.uandcode.effects.hilt"
10 | }
11 |
12 | publishConfig {
13 | artifactId = "effects2-hilt"
14 | description = "Effects Hilt Plugin for simplifying the implementation of one-off events."
15 | }
16 |
17 | dependencies {
18 | api(projects.effectsCore.essentials)
19 | api(projects.effectsHilt.annotations)
20 | implementation(projects.effectsCore.lifecycle)
21 |
22 | implementation(libs.hilt.android)
23 | ksp(libs.hilt.compiler)
24 | }
25 |
--------------------------------------------------------------------------------
/effects-core/testing/mocks/src/main/java/com/uandcode/effects/core/testing/mocks/EffectWithDefaultMethod.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.testing.mocks
2 |
3 | import com.uandcode.effects.core.annotations.EffectClass
4 |
5 | public interface EffectWithDefaultMethod {
6 | public fun run(input: String)
7 | public fun defaultRun(input: String) {
8 | run("default $input")
9 | }
10 | public fun combinedDefaultRun(input: String) {
11 | defaultRun("combined $input")
12 | }
13 | }
14 |
15 | @EffectClass
16 | public class EffectWithDefaultMethodImpl : EffectWithDefaultMethod {
17 | override fun run(input: String): Unit = Unit
18 | override fun defaultRun(input: String): Unit = Unit
19 | }
20 |
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/exceptions/InterfaceNotFoundException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.exceptions
2 |
3 | import com.google.devtools.ksp.symbol.KSNode
4 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
5 |
6 | internal class InterfaceNotFoundException(
7 | interfaceName: String,
8 | effectAnnotation: String,
9 | node: KSNode,
10 | ) : AbstractEffectKspException(
11 | "Interface '$interfaceName' not found, but used in @$effectAnnotation. " +
12 | "Please make sure that the interface: " +
13 | "1) is in the classpath and visible from the application module " +
14 | "2) has public modifier",
15 | node,
16 | )
17 |
--------------------------------------------------------------------------------
/effects-core/essentials/src/test/java/com/uandcode/effects/core/internal/AnnotationBasedProxyEffectStoreProviderTest.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.internal
2 |
3 | import com.uandcode.effects.core.GeneratedProxyEffectStoreProvider
4 | import com.uandcode.effects.core.kspcontract.AnnotationBasedProxyEffectStore
5 | import org.junit.Assert.assertSame
6 | import org.junit.Test
7 |
8 | class AnnotationBasedProxyEffectStoreProviderTest {
9 |
10 | @Test
11 | fun `test getGeneratedProxyEffectStore`() {
12 | val actualStore = AnnotationBasedProxyEffectStore
13 |
14 | val resultStore = GeneratedProxyEffectStoreProvider.getGeneratedProxyEffectStore()
15 |
16 | assertSame(actualStore, resultStore)
17 | }
18 | }
--------------------------------------------------------------------------------
/effects-koin/essentials/src/main/java/com/uandcode/effects/koin/KoinEffectScopeBuilder.kt:
--------------------------------------------------------------------------------
1 | @file:OptIn(KoinInternalApi::class)
2 |
3 | package com.uandcode.effects.koin
4 |
5 | import org.koin.core.annotation.KoinInternalApi
6 | import org.koin.dsl.ScopeDSL
7 | import kotlin.reflect.KClass
8 |
9 | public class KoinEffectScopeBuilder(
10 | public val scopeDSL: ScopeDSL,
11 | ) {
12 |
13 | @KoinInternalApi
14 | public val registeredEffects: MutableSet> = mutableSetOf()
15 |
16 | /**
17 | * Register the specified scoped effect interface [T].
18 | */
19 | public inline fun effect() {
20 | scopeDSL.effect()
21 | registeredEffects.add(T::class)
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/di/SingletonsModule.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.di
2 |
3 | import com.uandcode.example.koin.singlemodule.data.InMemoryCatsRepository
4 | import com.uandcode.example.koin.singlemodule.domain.CatsRepository
5 | import com.uandcode.example.koin.singlemodule.effects.resources.AndroidResources
6 | import com.uandcode.example.koin.singlemodule.effects.resources.Resources
7 | import org.koin.core.module.dsl.singleOf
8 | import org.koin.dsl.bind
9 | import org.koin.dsl.module
10 |
11 | val singletonsModule = module {
12 | singleOf(::InMemoryCatsRepository) bind CatsRepository::class
13 | singleOf(::AndroidResources) bind Resources::class
14 | }
15 |
--------------------------------------------------------------------------------
/effects-koin/essentials/src/test/java/com/uandcode/effects/koin/lifecycle/mocks/KoinComponentLifecycleOwner.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.koin.lifecycle.mocks
2 |
3 | import androidx.lifecycle.Lifecycle
4 | import androidx.lifecycle.LifecycleOwner
5 | import com.uandcode.effects.core.testing.lifecycle.TestLifecycleOwner
6 | import io.mockk.mockk
7 | import org.koin.core.Koin
8 | import org.koin.core.component.KoinComponent
9 |
10 | class KoinComponentLifecycleOwner(
11 | val testLifecycleOwner: TestLifecycleOwner = TestLifecycleOwner(),
12 | val koinInstance: Koin = mockk()
13 | ) : LifecycleOwner, KoinComponent {
14 | override val lifecycle: Lifecycle get() = testLifecycleOwner
15 | override fun getKoin(): Koin = koinInstance
16 | }
17 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/effects/navigation/ComposeRouter.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.effects.navigation
2 |
3 | import androidx.compose.runtime.Stable
4 | import androidx.navigation.NavHostController
5 | import com.uandcode.effects.hilt.annotations.HiltEffect
6 | import com.uandcode.example.hilt.singlemodule.CatDetailsRoute
7 |
8 | @HiltEffect
9 | @Stable
10 | class ComposeRouter(
11 | private val navController: NavHostController,
12 | ) : Router {
13 |
14 | override fun launchDetails(catId: Long) {
15 | navController.navigate(CatDetailsRoute(catId))
16 | }
17 |
18 | override fun goBack() {
19 | navController.navigateUp()
20 | }
21 |
22 | }
--------------------------------------------------------------------------------
/app-examples/koin/app-singlemodule/src/main/java/com/uandcode/example/koin/singlemodule/effects/navigation/ComposeRouter.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.singlemodule.effects.navigation
2 |
3 | import androidx.compose.runtime.Stable
4 | import androidx.navigation.NavHostController
5 | import com.uandcode.effects.koin.annotations.KoinEffect
6 | import com.uandcode.example.koin.singlemodule.CatDetailsRoute
7 |
8 | @KoinEffect
9 | @Stable
10 | class ComposeRouter(
11 | private val navController: NavHostController,
12 | ) : Router {
13 |
14 | override fun launchDetails(catId: Long) {
15 | navController.navigate(CatDetailsRoute(catId))
16 | }
17 |
18 | override fun goBack() {
19 | navController.navigateUp()
20 | }
21 |
22 | }
--------------------------------------------------------------------------------
/effects-core/testing/compose/src/main/java/com/uandcode/effects/core/compose/testing/TestElement.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.compose.testing
2 |
3 | import androidx.compose.runtime.Composable
4 | import androidx.compose.runtime.ComposeNode
5 | import com.uandcode.effects.core.compose.testing.internal.Node
6 | import com.uandcode.effects.core.compose.testing.internal.TestNodeApplier
7 |
8 | @Composable
9 | public fun TestElement(name: String) {
10 | ComposeNode(
11 | factory = {
12 | ElementNode()
13 | },
14 | update = {
15 | set(name) {
16 | this.name = it
17 | }
18 | },
19 | )
20 | }
21 |
22 | internal class ElementNode : Node("")
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/di/Singletons.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule.di
2 |
3 | import com.uandcode.example.core.singlemodule.domain.CatsRepository
4 | import com.uandcode.example.core.singlemodule.effects.resources.Resources
5 |
6 | interface Singletons {
7 | val catsRepository: CatsRepository
8 | val resources: Resources
9 |
10 | companion object : Singletons {
11 | lateinit var instance: Singletons
12 |
13 | fun init(instance: Singletons) {
14 | this.instance = instance
15 | }
16 |
17 | override val catsRepository get() = instance.catsRepository
18 | override val resources get() = instance.resources
19 | }
20 | }
--------------------------------------------------------------------------------
/app-examples/core/app-singlemodule/src/main/java/com/uandcode/example/core/singlemodule/effects/navigation/ComposeRouter.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.singlemodule.effects.navigation
2 |
3 | import androidx.compose.runtime.Stable
4 | import androidx.navigation.NavHostController
5 | import com.uandcode.effects.core.annotations.EffectClass
6 | import com.uandcode.example.core.singlemodule.CatDetailsRoute
7 |
8 | @EffectClass
9 | @Stable
10 | class ComposeRouter(
11 | private val navController: NavHostController,
12 | ) : Router {
13 |
14 | override fun launchDetails(catId: Long) {
15 | navController.navigate(CatDetailsRoute(catId))
16 | }
17 |
18 | override fun goBack() {
19 | navController.navigateUp()
20 | }
21 |
22 | }
--------------------------------------------------------------------------------
/effects-koin/compiler/build.gradle.kts:
--------------------------------------------------------------------------------
1 | import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode
2 |
3 | plugins {
4 | alias(libs.plugins.custom.library)
5 | alias(libs.plugins.custom.maven.publish)
6 | }
7 |
8 | publishConfig {
9 | artifactId = "effects2-koin-compiler"
10 | description = "Effects Koin Plugin (KSP annotation processor) for simplifying the implementation of one-off events"
11 | }
12 |
13 | kotlin {
14 | explicitApi = ExplicitApiMode.Disabled
15 | }
16 |
17 | dependencies {
18 | implementation(projects.effectsCore.compilerCommon)
19 | implementation(projects.effectsKoin.annotations)
20 |
21 | implementation(libs.kotlinPoet)
22 | implementation(libs.kotlinPoet.ksp)
23 | implementation(libs.ksp.api)
24 | }
25 |
--------------------------------------------------------------------------------
/effects-koin/compose/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | alias(libs.plugins.compose)
5 | }
6 |
7 | publishConfig {
8 | artifactId = "effects2-koin-compose"
9 | description = "Effects Koin Plugin - Jetpack Compose extension for simplifying the implementation of one-off events"
10 | }
11 |
12 | dependencies {
13 | api(projects.effectsKoin.essentials)
14 | implementation(projects.effectsCore.compose)
15 | compileOnly(projects.effectsKoin.kspcontract)
16 |
17 | implementation(platform(libs.koin.bom))
18 | implementation(libs.koin.compose)
19 |
20 | implementation(libs.lifecycle.runtime.compose)
21 | api(libs.immutable.collections)
22 | }
23 |
--------------------------------------------------------------------------------
/effects-core/compiler/src/main/java/com/uandcode/effects/core/compiler/CoreSymbolProcessorProvider.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.compiler
2 |
3 | import com.google.devtools.ksp.processing.SymbolProcessor
4 | import com.google.devtools.ksp.processing.SymbolProcessorEnvironment
5 | import com.google.devtools.ksp.processing.SymbolProcessorProvider
6 | import com.uandcode.effects.compiler.common.api.EffectSymbolProcessor
7 |
8 | class CoreSymbolProcessorProvider : SymbolProcessorProvider {
9 |
10 | override fun create(environment: SymbolProcessorEnvironment): SymbolProcessor {
11 | return EffectSymbolProcessor(
12 | environment = environment,
13 | effectExtension = CoreEffectExtension,
14 | )
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/effects-core/essentials/src/main/java/com/uandcode/effects/core/internal/observers/SimpleCommandObserver.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.internal.observers
2 |
3 | import com.uandcode.effects.core.internal.ObservableResourceStore.ResourceObserver
4 |
5 | internal class SimpleCommandObserver(
6 | private val command: (Resource) -> Unit,
7 | ) : ResourceObserver {
8 |
9 | override fun onResourceAttached(resource: Resource) {
10 | try {
11 | command(resource)
12 | } catch (e: Exception) {
13 | e.printStackTrace(System.err)
14 | }
15 | }
16 |
17 | override fun onResourceDetached(resource: Resource) {
18 | }
19 |
20 | override fun onObserverRemoved() {
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/effects-core/lifecycle/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | }
5 |
6 | publishConfig {
7 | artifactId = "effects2-core-lifecycle"
8 | description = "Effects Core Library - Extensions for LifecycleOwner"
9 | }
10 |
11 | dependencies {
12 | api(projects.effectsCore.essentials)
13 | api(projects.effectsCore.annotations)
14 | testImplementation(projects.effectsCore.testing.mocks)
15 | testImplementation(projects.effectsCore.testing.lifecycle)
16 |
17 | api(libs.lifecycle.jvm)
18 |
19 | testImplementation(libs.junit)
20 | testImplementation(libs.mockk)
21 | testImplementation(libs.coroutines.test)
22 | testImplementation(libs.flowtest)
23 | }
24 |
--------------------------------------------------------------------------------
/effects-core/runtime/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | }
5 |
6 | publishConfig {
7 | artifactId = "effects2-core-runtime"
8 | description = "Effects Core Library - Runtime version and an alternative to compile-time KSP annotation processor."
9 | }
10 |
11 | dependencies {
12 | api(projects.effectsCore.essentials)
13 | testImplementation(projects.effectsCore.testing.mocks)
14 |
15 | implementation(libs.coroutines.core)
16 | implementation(buildSrcLibs.kotlinx.reflection)
17 |
18 | testImplementation(libs.junit)
19 | testImplementation(libs.mockk)
20 | testImplementation(libs.coroutines.test)
21 | testImplementation(libs.flowtest)
22 | }
23 |
--------------------------------------------------------------------------------
/effects-hilt/compiler/src/main/java/com/uandcode/effects/hilt/compiler/HiltSymbolProcessorProvider.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.hilt.compiler
2 |
3 | import com.google.devtools.ksp.processing.SymbolProcessor
4 | import com.google.devtools.ksp.processing.SymbolProcessorEnvironment
5 | import com.google.devtools.ksp.processing.SymbolProcessorProvider
6 | import com.uandcode.effects.compiler.common.api.EffectSymbolProcessor
7 |
8 | class HiltSymbolProcessorProvider : SymbolProcessorProvider {
9 |
10 | override fun create(environment: SymbolProcessorEnvironment): SymbolProcessor {
11 | return EffectSymbolProcessor(
12 | environment = environment,
13 | effectExtension = HiltEffectExtension(),
14 | )
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/effects-koin/compiler/src/main/java/com/uandcode/effects/koin/compiler/KoinSymbolProcessorProvider.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.koin.compiler
2 |
3 | import com.google.devtools.ksp.processing.SymbolProcessor
4 | import com.google.devtools.ksp.processing.SymbolProcessorEnvironment
5 | import com.google.devtools.ksp.processing.SymbolProcessorProvider
6 | import com.uandcode.effects.compiler.common.api.EffectSymbolProcessor
7 |
8 | class KoinSymbolProcessorProvider : SymbolProcessorProvider {
9 |
10 | override fun create(environment: SymbolProcessorEnvironment): SymbolProcessor {
11 | return EffectSymbolProcessor(
12 | environment = environment,
13 | effectExtension = KoinEffectExtension(),
14 | )
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/app-examples/hilt/app-singlemodule/src/main/java/com/uandcode/example/hilt/singlemodule/effects/resources/AndroidResources.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.hilt.singlemodule.effects.resources
2 |
3 | import android.content.Context
4 | import androidx.annotation.StringRes
5 | import dagger.hilt.android.qualifiers.ApplicationContext
6 | import javax.inject.Inject
7 | import javax.inject.Singleton
8 |
9 | // no need to add HiltEffect, because Resources can use an application
10 | // context and be a singleton
11 | @Singleton
12 | class AndroidResources @Inject constructor(
13 | @ApplicationContext private val context: Context
14 | ) : Resources {
15 |
16 | override fun getString(@StringRes id: Int): String {
17 | return context.getString(id)
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/exceptions/InterfaceWithTypeParametersException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.exceptions
2 |
3 | import com.google.devtools.ksp.symbol.KSNode
4 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
5 | import com.uandcode.effects.compiler.common.api.extensions.KSAnnotationWrapper
6 |
7 | internal class InterfaceWithTypeParametersException(
8 | effectAnnotation: KSAnnotationWrapper,
9 | targetInterfaceName: String,
10 | node: KSNode,
11 | ) : AbstractEffectKspException(
12 | message = "Class annotated with @${effectAnnotation.simpleName} should not have a target interface '$targetInterfaceName' with type parameters",
13 | node,
14 | )
15 |
--------------------------------------------------------------------------------
/effects-koin/essentials/src/test/java/com/uandcode/effects/koin/lifecycle/mocks/AndroidScopeComponentLifecycleOwner.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.koin.lifecycle.mocks
2 |
3 | import androidx.lifecycle.Lifecycle
4 | import androidx.lifecycle.LifecycleOwner
5 | import com.uandcode.effects.core.testing.lifecycle.TestLifecycleOwner
6 | import io.mockk.mockk
7 | import org.koin.android.scope.AndroidScopeComponent
8 | import org.koin.core.Koin
9 | import org.koin.core.scope.Scope
10 |
11 | class AndroidScopeComponentLifecycleOwner(
12 | val testLifecycleOwner: TestLifecycleOwner = TestLifecycleOwner(),
13 | override val scope: Scope = mockk(),
14 | ) : LifecycleOwner, AndroidScopeComponent {
15 | override val lifecycle: Lifecycle get() = testLifecycleOwner
16 | }
17 |
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/feature-list/src/main/java/com/uandcode/example/core/multimodule/features/list/CatsListDependencyContainer.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.core.multimodule.features.list
2 |
3 | import androidx.compose.runtime.Stable
4 | import com.uandcode.example.core.multimodule.effects.api.Dialogs
5 | import com.uandcode.example.core.multimodule.effects.api.Resources
6 | import com.uandcode.example.core.multimodule.effects.api.Toasts
7 | import com.uandcode.example.core.multimodule.features.list.domain.CatListRepository
8 |
9 | @Stable
10 | interface CatsListDependencyContainer {
11 | val catListRepository: CatListRepository
12 | val router: CatsRouter
13 | val dialogs: Dialogs
14 | val toasts: Toasts
15 | val resources: Resources
16 | }
17 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/feature-list/src/main/java/com/uandcode/example/koin/multimodule/features/list/CatsListDependencyContainer.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.example.koin.multimodule.features.list
2 |
3 | import androidx.compose.runtime.Stable
4 | import com.uandcode.example.koin.multimodule.effects.api.Dialogs
5 | import com.uandcode.example.koin.multimodule.effects.api.Resources
6 | import com.uandcode.example.koin.multimodule.effects.api.Toasts
7 | import com.uandcode.example.koin.multimodule.features.list.domain.CatListRepository
8 |
9 | @Stable
10 | interface CatsListDependencyContainer {
11 | val catListRepository: CatListRepository
12 | val router: CatsRouter
13 | val dialogs: Dialogs
14 | val toasts: Toasts
15 | val resources: Resources
16 | }
17 |
--------------------------------------------------------------------------------
/effects-core/testing/compose/src/main/java/com/uandcode/effects/core/compose/testing/TestGroup.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.compose.testing
2 |
3 | import androidx.compose.runtime.Composable
4 | import androidx.compose.runtime.ComposeNode
5 | import com.uandcode.effects.core.compose.testing.internal.Node
6 | import com.uandcode.effects.core.compose.testing.internal.TestNodeApplier
7 |
8 | @Composable
9 | public fun TestGroup(name: String, content: @Composable () -> Unit) {
10 | ComposeNode(
11 | factory = { GroupNode() },
12 | update = {
13 | set(name) {
14 | this.name = it
15 | }
16 | },
17 | content = content,
18 | )
19 | }
20 |
21 | internal class GroupNode : Node("")
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/api/data/GeneratedProxy.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.api.data
2 |
3 | import com.google.devtools.ksp.processing.Dependencies
4 | import com.squareup.kotlinpoet.ClassName
5 |
6 | /**
7 | * Information about a generated proxy class.
8 | * - [proxyClassName] - full name of the generated proxy class.
9 | * - [interfaceClassName] - the original interface for which the proxy class was generated.
10 | * - [dependencies] - list of files that were used upon the generation of the proxy class.
11 | */
12 | public data class GeneratedProxy(
13 | val proxyClassName: ClassName,
14 | val interfaceClassName: ClassName,
15 | override val dependencies: Dependencies,
16 | ) : HasDependencies
17 |
--------------------------------------------------------------------------------
/effects-core/essentials/src/test/java/com/uandcode/effects/core/ManagedInterfacesTest.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core
2 |
3 | import org.junit.Assert.assertFalse
4 | import org.junit.Assert.assertTrue
5 | import org.junit.Test
6 |
7 | class ManagedInterfacesTest {
8 |
9 | @Test
10 | fun `contains() for Everything returns true`() {
11 | assertTrue(ManagedInterfaces.Everything.contains(String::class))
12 | }
13 |
14 | @Test
15 | fun `contains() for ListOf returns true for classes in the list`() {
16 | val listOf = ManagedInterfaces.ListOf(Int::class, String::class)
17 |
18 | assertTrue(listOf.contains(Int::class))
19 | assertTrue(listOf.contains(String::class))
20 | assertFalse(listOf.contains(Double::class))
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/effects-core/testing/mocks/src/main/java/com/uandcode/effects/core/testing/mocks/MultipleSimpleEffects.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.testing.mocks
2 |
3 | public interface SimpleEffect1 {
4 | public fun run1(input: String)
5 | }
6 |
7 | public interface SimpleEffect2 {
8 | public fun run2(input: String)
9 |
10 | }
11 |
12 | public interface SimpleEffect3 {
13 | public fun run3(input: String)
14 | }
15 |
16 | public class SimpleEffect1Impl : SimpleEffect1 {
17 | override fun run1(input: String): Unit = Unit
18 | }
19 |
20 | public class SimpleEffect2Impl : SimpleEffect2 {
21 | override fun run2(input: String): Unit = Unit
22 |
23 | }
24 |
25 | public class SimpleEffect3Impl : SimpleEffect3 {
26 | override fun run3(input: String): Unit = Unit
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/app-examples/koin/app-multimodule/effect-impl-dialogs-compose/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.android.library)
3 | alias(libs.plugins.compose)
4 | alias(libs.plugins.ksp)
5 | }
6 |
7 | android {
8 | namespace = "com.uandcode.example.koin.multimodule.effects.dialogs.compose"
9 | buildFeatures {
10 | compose = true
11 | }
12 | }
13 |
14 | ksp {
15 | arg("effects.processor.metadata", "generate")
16 | }
17 |
18 | dependencies {
19 | api(projects.appExamples.koin.appMultimodule.effectInterfaces)
20 |
21 | implementation(libs.effects.koin.annotations)
22 | ksp(libs.effects.koin.compiler)
23 |
24 | implementation(platform(libs.compose.bom))
25 | implementation(libs.compose.ui)
26 | implementation(libs.compose.material3)
27 | }
28 |
--------------------------------------------------------------------------------
/effects-hilt/essentials/src/main/java/com/uandcode/effects/hilt/internal/HiltViewModelEffectScope.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.hilt.internal
2 |
3 | import com.uandcode.effects.core.EffectScope
4 | import dagger.hilt.android.ViewModelLifecycle
5 | import kotlin.reflect.KClass
6 |
7 | internal class HiltViewModelEffectScope(
8 | private val origin: EffectScope,
9 | private val viewModelLifecycle: ViewModelLifecycle,
10 | ) : EffectScope by origin {
11 |
12 | override fun getProxy(clazz: KClass): T {
13 | val proxyEffect = origin.getProxy(clazz)
14 | if (proxyEffect is AutoCloseable) {
15 | viewModelLifecycle.addOnClearedListener {
16 | proxyEffect.close()
17 | }
18 | }
19 | return proxyEffect
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/effects-core/essentials/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | alias(libs.plugins.ksp)
5 | }
6 |
7 | publishConfig {
8 | artifactId = "effects2-core-essentials"
9 | description = "Effects Core Library - Main engine which makes effects work."
10 | }
11 |
12 | dependencies {
13 | api(projects.effectsCore.kspcontractApi)
14 | compileOnly(projects.effectsCore.kspcontract)
15 | testImplementation(projects.effectsCore.kspcontract)
16 | testImplementation(projects.effectsCore.runtime)
17 | testImplementation(projects.effectsCore.annotations)
18 |
19 | testImplementation(libs.junit)
20 | testImplementation(libs.mockk)
21 | testImplementation(libs.coroutines.test)
22 | testImplementation(libs.flowtest)
23 | }
24 |
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/exceptions/InternalKspExceptions.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.exceptions
2 |
3 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
4 | import com.uandcode.effects.compiler.common.api.extensions.KSAnnotationWrapper
5 |
6 | /**
7 | * This exception can't be thrown in real scenarios
8 | */
9 | internal class InvalidAnnotationArgumentException(
10 | effectAnnotation: KSAnnotationWrapper,
11 | ) : AbstractEffectKspException(
12 | message = "${effectAnnotation.printableName} has invalid parameter value.",
13 | effectAnnotation,
14 | )
15 |
16 | /**
17 | * Internal exception in the plugin logic.
18 | */
19 | internal class InternalEffectKspException(
20 | message: String,
21 | ) : Exception(message)
22 |
--------------------------------------------------------------------------------
/effects-core/testing/mocks/src/main/java/com/uandcode/effects/core/testing/mocks/CombinedEffectWithTarget.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.testing.mocks
2 |
3 | import com.uandcode.effects.core.annotations.EffectClass
4 |
5 | public interface TargetEffect1 {
6 | public fun run1(input: String)
7 | }
8 |
9 | public interface TargetEffect2 {
10 | public fun run2(input: String)
11 | }
12 |
13 | public interface NonTargetEffect3 {
14 | public fun run3(input: String)
15 | }
16 |
17 | @EffectClass(
18 | targets = [TargetEffect1::class, TargetEffect2::class],
19 | )
20 | public class CombinedEffectWithTarget : TargetEffect1, TargetEffect2, NonTargetEffect3 {
21 | override fun run1(input: String): Unit = Unit
22 | override fun run2(input: String): Unit = Unit
23 | override fun run3(input: String): Unit = Unit
24 | }
--------------------------------------------------------------------------------
/effects-core/compiler-common/src/main/java/com/uandcode/effects/compiler/common/api/ProcessingMode.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.compiler.common.api
2 |
3 | public enum class ProcessingMode {
4 |
5 | // should be used in library modules:
6 | GenerateMetadata,
7 |
8 | // should be used in application modules:
9 | AggregateMetadata;
10 |
11 | internal companion object {
12 |
13 | private const val PROCESSING_MODE_ARG = "effects.processor.metadata"
14 |
15 | fun fromOptions(options: Map): ProcessingMode {
16 | return when (options[PROCESSING_MODE_ARG]) {
17 | "generate" -> GenerateMetadata
18 | "aggregate" -> AggregateMetadata
19 | else -> AggregateMetadata // default
20 | }
21 | }
22 |
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/effects-hilt/compose/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.android.library)
3 | alias(libs.plugins.custom.maven.publish)
4 | alias(libs.plugins.compose)
5 | }
6 |
7 | android {
8 | namespace = "com.uandcode.effects.hilt.compose"
9 | buildFeatures {
10 | compose = true
11 | }
12 | }
13 |
14 | publishConfig {
15 | artifactId = "effects2-hilt-compose"
16 | description = "Effects Hilt Plugin - Jetpack Compose extension for simplifying the implementation of one-off events"
17 | }
18 |
19 | dependencies {
20 | api(projects.effectsHilt.essentials)
21 | implementation(projects.effectsCore.compose)
22 |
23 | implementation(platform(libs.compose.bom))
24 | implementation(libs.compose.ui)
25 | implementation(libs.androidx.activity)
26 | api(libs.immutable.collections)
27 | }
28 |
--------------------------------------------------------------------------------
/effects-core/compiler/src/test/java/com/uandcode/effects/core/compiler/InterfaceTest.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.compiler
2 |
3 | import com.uandcode.effects.core.compiler.base.AbstractCoreKspTest
4 | import org.intellij.lang.annotations.Language
5 | import org.junit.Test
6 |
7 | class InterfaceTest : AbstractCoreKspTest() {
8 |
9 | @Language("kotlin")
10 | private val source = """
11 |
12 | import com.uandcode.effects.core.annotations.EffectClass
13 |
14 | interface Effect
15 |
16 | @EffectClass
17 | interface ChildEffect : Effect
18 |
19 | """.trimIndent()
20 |
21 | @Test
22 | fun `compilation of annotated interface should fail`() = with(compile(source)){
23 | assertCompileError("Input.kt:6: Symbol annotated with @EffectClass should be a Class or Object")
24 | }
25 |
26 | }
--------------------------------------------------------------------------------
/app-examples/core/app-multimodule/effect-impl-dialogs-compose/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | alias(libs.plugins.custom.android.library)
3 | alias(libs.plugins.compose)
4 | alias(libs.plugins.ksp)
5 | }
6 |
7 | android {
8 | namespace = "com.uandcode.example.core.multimodule.effects.dialogs.compose"
9 | buildFeatures {
10 | compose = true
11 | }
12 | }
13 |
14 | ksp {
15 | arg("effects.processor.metadata", "generate")
16 | }
17 |
18 | dependencies {
19 | api(projects.appExamples.core.appMultimodule.effectInterfaces)
20 |
21 | implementation(libs.effects.core.essentials)
22 | implementation(libs.effects.core.annotations)
23 | ksp(libs.effects.core.compiler)
24 |
25 | implementation(platform(libs.compose.bom))
26 | implementation(libs.compose.ui)
27 | implementation(libs.compose.material3)
28 | }
29 |
--------------------------------------------------------------------------------
/effects-hilt/compiler-test/src/test/java/com/uandcode/effects/hilt/compiler/InterfaceTest.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.hilt.compiler
2 |
3 | import com.uandcode.effects.hilt.compiler.base.AbstractHiltKspTest
4 | import org.intellij.lang.annotations.Language
5 | import org.junit.Test
6 |
7 | class InterfaceTest : AbstractHiltKspTest() {
8 |
9 | @Language("kotlin")
10 | private val source = """
11 |
12 | import com.uandcode.effects.hilt.annotations.HiltEffect
13 |
14 | interface Effect
15 |
16 | @HiltEffect
17 | interface ChildEffect : Effect
18 |
19 | """.trimIndent()
20 |
21 | @Test
22 | fun `compilation of annotated interface should fail`() = with(compile(source)){
23 | assertCompileError("Input.kt:6: Symbol annotated with @HiltEffect should be a Class or Object")
24 | }
25 |
26 | }
--------------------------------------------------------------------------------
/effects-hilt/compiler/src/main/java/com/uandcode/effects/hilt/compiler/exceptions/InvalidHiltComponentException.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.hilt.compiler.exceptions
2 |
3 | import com.uandcode.effects.compiler.common.api.AbstractEffectKspException
4 | import com.uandcode.effects.compiler.common.api.extensions.KSAnnotationWrapper
5 | import com.uandcode.effects.hilt.compiler.data.SupportedHiltComponent
6 |
7 | class InvalidHiltComponentException(
8 | effectAnnotation: KSAnnotationWrapper,
9 | ) : AbstractEffectKspException(
10 | "Invalid Hilt Component is specified in ${effectAnnotation.printableName}(installIn = ...). " +
11 | "Example of valid Hilt components: ${validComponents()}",
12 | effectAnnotation,
13 | )
14 |
15 | private fun validComponents() = SupportedHiltComponent.all.joinToString {
16 | "${it.simpleName}::class"
17 | }
18 |
--------------------------------------------------------------------------------
/effects-hilt/compose/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/effects-hilt/essentials/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/effects-core/compiler/src/test/java/com/uandcode/effects/core/compiler/AbstractClassTest.kt:
--------------------------------------------------------------------------------
1 | package com.uandcode.effects.core.compiler
2 |
3 | import com.uandcode.effects.core.compiler.base.AbstractCoreKspTest
4 | import org.intellij.lang.annotations.Language
5 | import org.junit.Test
6 |
7 | class AbstractClassTest : AbstractCoreKspTest() {
8 |
9 | @Language("kotlin")
10 | private val source = """
11 |
12 | import com.uandcode.effects.core.annotations.EffectClass
13 |
14 | interface Effect
15 |
16 | @EffectClass
17 | abstract class EffectImpl : Effect
18 |
19 | """.trimIndent()
20 |
21 | @Test
22 | fun `compilation of annotated abstract class should fail`() = with(compile(source)) {
23 | assertCompileError("Input.kt:6: Class annotated with @EffectClass should not be abstract")
24 | }
25 |
26 | }
--------------------------------------------------------------------------------