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

fix Dagger NoSuchMethodError for dagger.internal.Preconditions.checkNotNullFromProvides in SNAPSHOT #570

Merged
merged 1 commit into from
May 2, 2022

Conversation

RBusarow
Copy link
Member

@RBusarow RBusarow commented May 2, 2022

Dagger's dagger.internal.Preconditions.checkNotNullFromProvides is pretty new. If an old version of Dagger is in the build classpath of the target project, dependency resolution may resolve to that old version and cause a NoSuchMethodError.

That new method is used in the Provider factory for static @Provides functions in @Module objects.

Since I actually really hate qualifiers anyway, the chosen band-aid is to just create strong Provider types with injected constructors for each build property we need.

Dagger's `dagger.internal.Preconditions.checkNotNullFromProvides` is pretty new.  If an old version of Dagger is in the build classpath of the target project, dependency resolution may resolve to that old version and cause a `NoSuchMethodError`.

That new method is used in the Provider factory for static `@Provides` functions in `@Module` objects.

Since I actually really hate qualifiers anyway, the chosen band-aid is to just create strong Provider types with injected constructors for each build property we need.
@kodiakhq kodiakhq bot merged commit 068417b into main May 2, 2022
@kodiakhq kodiakhq bot deleted the fix_anvil_dagger_issues branch May 2, 2022 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant