-
Notifications
You must be signed in to change notification settings - Fork 89
Closed
Description
What
Incremental builds consistently fail to compile after adding or removing constructor parameters to a class marked with @ContributesBinding. I was able to reproduce it with some slight modifications to the sample within the Anvil repo
- Checkout the branch or copy code over link.
- First run
./gradlew :sample:assembleDebug - Add or remove a parameter within
RealParentsclass - Run
./gradlew :sample:assembleDebugagain - You should see an error
/Users/laimonasturauskas/android/anvil/sample/app/build/tmp/kapt3/stubs/debug/com/squareup/anvil/sample/AppComponent.java:7: error: [Dagger/MissingBinding] com.squareup.anvil.sample.Parents cannot be provided without an @Provides-annotated method.
public abstract interface AppComponent extends com.squareup.anvil.sample.RandomComponent, com.squareup.anvil.sample.DescriptionComponent {
^
Missing binding usage:
com.squareup.anvil.sample.Parents is requested at
com.squareup.anvil.sample.DescriptionComponent.parents()
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sample:app:kaptDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction
> java.lang.reflect.InvocationTargetException (no error message)
The issue goes away when running ./gradlew :sample:asDebug --rerun-tasks. One potential hint is that the library/build/anvil/src-gen-main/ folder to be empty after incremental build compilation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels