[GRADLE-3577] REPLACED file change type breaks compatibility with existing plugin Created: 26/Oct/16 Updated: 31/Oct/16 Resolved: 26/Oct/16
|Reporter:||Lóránt Pintér||Assignee:||Lóránt Pintér|
The change adds a new ChangeType value REPLACED (reference: 0a4a3bb). This leads to two issues:
FileChange has not been updated to provide a isReplaced() method so plugins cannot query for this kind of file change. Because OrderSensitiveTaskFilePropertyCompareStrategy has been changed to exclusively use the new status instead of MODIFIED some file changes cannot be detected by new task implementations.
However a bigger problems is that existing plugins that go through IncrementalTaskInputs.outofDate looking at isModified() will also always miss the files that use the new status. The only fix is to release a new version of the plugin (after the new API is fixed with a new isReplaced() method).
In order to be compatible, I believe Gradle should make these replaced files return true for both isModified() and isReplaced(). This require some more refactoring as FileChange only support a single ChangeType.
The Gradle plugin for Android is failing some of its tests on 3.1 because of this.
|Comment by Lóránt Pintér [ 26/Oct/16 ]|
Ended up reverting the change. REPLACED changes are now reported as a REMOVED and an ADDED change, just as with the unordered case.