You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Add or remove a parameter within RealParents class
Run ./gradlew :sample:assembleDebug again
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.
The text was updated successfully, but these errors were encountered:
Closing this as a duplicate since it looks like the root issue is the same as #693. Feel free to reopen/add more details if you think this is caused by a separate issue.
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./gradlew :sample:assembleDebug
RealParents
class./gradlew :sample:assembleDebug
againThe issue goes away when running
./gradlew :sample:asDebug --rerun-tasks
. One potential hint is that thelibrary/build/anvil/src-gen-main/
folder to be empty after incremental build compilation.The text was updated successfully, but these errors were encountered: