Gradle incremental compilation doesn't detect changes to transitively included modules
See original GitHub issueWe have been using incremental compilation with Gradle for a few months, and we find it’s effective in a majority of cases. However, we found that it fails to detect changes to the types bound with @Binds
or the elements in a multibound set or map. One simple way to repro is to build a Dagger module that contains a single binding like this:
@Module
abstract class DaggerModule {
@Binds
abstract Base provideBase(SubclassB subclass);
}
Replacing SubclassA
with SubclassB
here won’t cause the component to be regenerated. I created a small sample to facilitate a repro: https://github.com/cesar1000/dagger-incremental-bug.
I’m not sure whether this is a bug in Gradle or Dagger - @oehme and @autonomousapps, can you take a look?
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top Results From Across the Web
Incremental Compilation, the Java Library Plugin, and other ...
While Gradle can detect which jar contains annotation processors, what it cannot detect is which other jars in the compile classpath are used ......
Read more >Still getting warning : Configuration 'compile' is obsolete and ...
I've updated com.google.gms:google-services from 3.1.1 to 3.2.0 and the warning stopped appearing. buildscript { repositories { google() ...
Read more >Add build dependencies - Android Developers
The Gradle build system in Android Studio makes it easy to include external binaries or other library modules to your build as dependencies....
Read more >Incremental testing with TeamCity - The JetBrains Blog
TeamCity 7.0 introduces a new feature: support for incremental builds for IntelliJ IDEA, Gradle and Maven projects, primarily aimed at ...
Read more >Speed up your build: Non-transitive R files - Blundell
You use a resource from another module, but you do not declare as dependency on that module. Fix: Do as #1 but also...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is a bug in Gradle. I’ve pushed a fix, which will be in 5.4. This doesn’t just affect Dagger, but is a general problem with how we handle transitive dependencies. I guess it was never detected because usually the intermediate project fails when you remove some API. But in this case it just removes one of many bindings, so everything was still valid.
Thanks!