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

Always generate provider factories for binding modules #951

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

RBusarow
Copy link
Member

@RBusarow RBusarow commented Apr 6, 2024

fixes #948

If full Dagger factory generation is happening in any way (via Anvil, Dagger with KSP, or Dagger with KAPT), then behavior doesn't change.
If none of those factory sources are happening in a target compilation, and that compilation is creating a binding module with a @Provides function (for an object), then the Contribution will take it upon itself to generate the factory.

We determine if the Dagger generation is happening by inspecting the dependencies in the kapt/ksp plugin classpaths.

@RBusarow RBusarow force-pushed the rick/factory-generation-mess branch from 91cb4fa to 98c19cf Compare April 6, 2024 00:55
@RBusarow RBusarow changed the title Always generate provider factories for binding modules. Always generate provider factories for binding modules Apr 6, 2024
fixes #948

If full Dagger factory generation is happening in any way
(via Anvil, Dagger with KSP, or Dagger with KAPT),
then behavior doesn't change.
If none of those factory sources are happening in a target compilation,
and that compilation is creating a binding module with a `@Provides`
function (for an `object`), then the `Contribution`
will take it upon itself to generate the factory.

We determine if the Dagger generation is happening
by inspecting the dependencies in the kapt/ksp plugin classpaths.
@RBusarow RBusarow force-pushed the rick/factory-generation-mess branch from 98c19cf to d199e76 Compare April 8, 2024 19:21
@RBusarow RBusarow marked this pull request as ready for review April 8, 2024 20:53
@RBusarow RBusarow merged commit ac7fe4d into main Apr 9, 2024
17 checks passed
@RBusarow RBusarow deleted the rick/factory-generation-mess branch April 9, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants