Skip to content

Commit

Permalink
No longer declare inputs on SpotlessCheck and SpotlessApply since…
Browse files Browse the repository at this point in the history
… they don't have any outputs (fixes #741).
  • Loading branch information
nedtwigg committed Jan 4, 2021
1 parent 228eb10 commit f8ca1aa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
7 changes: 4 additions & 3 deletions plugin-gradle/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Updated default eclipse-wtp from 4.17.0 to 4.18.0.
### Fixed
* `ratchetFrom` now works with git-submodule ([#746](https://github.com/diffplug/spotless/issues/746))
* ktfmt v0.19+ with dropbox-style works again ([#765](https://github.com/diffplug/spotless/pull/765)).
* prettier no longer throws errors on empty files ([#751](https://github.com/diffplug/spotless/pull/751)).
* fixed error when running on root of windows mountpoint ([#760](https://github.com/diffplug/spotless/pull/760)).
* `ktfmt` v0.19+ with dropbox-style works again ([#765](https://github.com/diffplug/spotless/pull/765)).
* `prettier` no longer throws errors on empty files ([#751](https://github.com/diffplug/spotless/pull/751)).
* Fixed error when running on root of windows mountpoint ([#760](https://github.com/diffplug/spotless/pull/760)).
* No longer declare inputs on `SpotlessCheck` and `SpotlessApply` since they don't have any outputs (worker task still does up-to-date and caching) ([#741](https://github.com/diffplug/spotless/issues/741)).

## [5.8.2] - 2020-11-16
### Fixed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 DiffPlug
* Copyright 2016-2021 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -24,9 +24,7 @@
import org.gradle.api.file.ConfigurableFileTree;
import org.gradle.api.file.FileVisitDetails;
import org.gradle.api.file.FileVisitor;
import org.gradle.api.tasks.InputDirectory;
import org.gradle.api.tasks.PathSensitive;
import org.gradle.api.tasks.PathSensitivity;
import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.TaskAction;

public class SpotlessApply extends DefaultTask {
Expand All @@ -40,8 +38,7 @@ void linkSource(SpotlessTask source) {

private File spotlessOutDirectory;

@PathSensitive(PathSensitivity.RELATIVE)
@InputDirectory
@Internal
public File getSpotlessOutDirectory() {
return spotlessOutDirectory;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2020 DiffPlug
* Copyright 2016-2021 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,9 +29,7 @@
import org.gradle.api.file.ConfigurableFileTree;
import org.gradle.api.file.FileVisitDetails;
import org.gradle.api.file.FileVisitor;
import org.gradle.api.tasks.InputDirectory;
import org.gradle.api.tasks.PathSensitive;
import org.gradle.api.tasks.PathSensitivity;
import org.gradle.api.tasks.Internal;
import org.gradle.api.tasks.TaskAction;

import com.diffplug.spotless.FileSignature;
Expand All @@ -43,8 +41,7 @@ public class SpotlessCheck extends DefaultTask {
SpotlessTask source;
private File spotlessOutDirectory;

@PathSensitive(PathSensitivity.RELATIVE)
@InputDirectory
@Internal
public File getSpotlessOutDirectory() {
return spotlessOutDirectory;
}
Expand Down

0 comments on commit f8ca1aa

Please sign in to comment.