Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using Anvil to generate Factories for subcomponents #74

Closed
vRallev opened this issue Aug 28, 2020 · 1 comment · Fixed by #90
Closed

Allow using Anvil to generate Factories for subcomponents #74

vRallev opened this issue Aug 28, 2020 · 1 comment · Fixed by #90
Assignees
Labels
dagger factory Happens when generateDaggerFactories is set to true enhancement New feature or request

Comments

@vRallev
Copy link
Collaborator

vRallev commented Aug 28, 2020

At the moment if a module contains a @Component or @Subcomponent class and Anvil is setup to generate Dagger factories the compiler plugin throws an error, because it cannot generate this code. This check is correct for @Components, but not subcomponents. Subcomponents are generated in the same module as the root component is generated.

@vRallev vRallev self-assigned this Aug 28, 2020
@vRallev vRallev added the enhancement New feature or request label Aug 28, 2020
@ursusursus
Copy link

This! Since my whole app is basically subcomponents and only root component being @component

@vRallev vRallev added the dagger factory Happens when generateDaggerFactories is set to true label Aug 30, 2020
vRallev added a commit that referenced this issue Aug 31, 2020
… uses a Subcomponent. This is fine,

because Dagger only generates the code for Subcomponents when generating the parent Component.

Fixes #74.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dagger factory Happens when generateDaggerFactories is set to true enhancement New feature or request
Projects
None yet
2 participants