Skip to content

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

Merged
kodiakhq[bot] merged 1 commit intomainfrom
fix_anvil_dagger_issues
May 2, 2022
Merged

fix Dagger NoSuchMethodError for dagger.internal.Preconditions.checkNotNullFromProvides in SNAPSHOT#570
kodiakhq[bot] merged 1 commit intomainfrom
fix_anvil_dagger_issues

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