Skip to content

Commit 445a88d

Browse files
authored
No longer declare inputs on SpotlessCheck and SpotlessApply since they don't have any outputs (fixes #741, PR #771)
1 parent 228eb10 commit 445a88d

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

plugin-gradle/CHANGES.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
1212
* Updated default eclipse-wtp from 4.17.0 to 4.18.0.
1313
### Fixed
1414
* `ratchetFrom` now works with git-submodule ([#746](https://github.com/diffplug/spotless/issues/746))
15-
* ktfmt v0.19+ with dropbox-style works again ([#765](https://github.com/diffplug/spotless/pull/765)).
16-
* prettier no longer throws errors on empty files ([#751](https://github.com/diffplug/spotless/pull/751)).
17-
* fixed error when running on root of windows mountpoint ([#760](https://github.com/diffplug/spotless/pull/760)).
15+
* `ktfmt` v0.19+ with dropbox-style works again ([#765](https://github.com/diffplug/spotless/pull/765)).
16+
* `prettier` no longer throws errors on empty files ([#751](https://github.com/diffplug/spotless/pull/751)).
17+
* Fixed error when running on root of windows mountpoint ([#760](https://github.com/diffplug/spotless/pull/760)).
18+
* 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)).
1819

1920
## [5.8.2] - 2020-11-16
2021
### Fixed

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessApply.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2020 DiffPlug
2+
* Copyright 2016-2021 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,9 +24,7 @@
2424
import org.gradle.api.file.ConfigurableFileTree;
2525
import org.gradle.api.file.FileVisitDetails;
2626
import org.gradle.api.file.FileVisitor;
27-
import org.gradle.api.tasks.InputDirectory;
28-
import org.gradle.api.tasks.PathSensitive;
29-
import org.gradle.api.tasks.PathSensitivity;
27+
import org.gradle.api.tasks.Internal;
3028
import org.gradle.api.tasks.TaskAction;
3129

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

4139
private File spotlessOutDirectory;
4240

43-
@PathSensitive(PathSensitivity.RELATIVE)
44-
@InputDirectory
41+
@Internal
4542
public File getSpotlessOutDirectory() {
4643
return spotlessOutDirectory;
4744
}

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/SpotlessCheck.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2020 DiffPlug
2+
* Copyright 2016-2021 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,9 +29,7 @@
2929
import org.gradle.api.file.ConfigurableFileTree;
3030
import org.gradle.api.file.FileVisitDetails;
3131
import org.gradle.api.file.FileVisitor;
32-
import org.gradle.api.tasks.InputDirectory;
33-
import org.gradle.api.tasks.PathSensitive;
34-
import org.gradle.api.tasks.PathSensitivity;
32+
import org.gradle.api.tasks.Internal;
3533
import org.gradle.api.tasks.TaskAction;
3634

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

46-
@PathSensitive(PathSensitivity.RELATIVE)
47-
@InputDirectory
44+
@Internal
4845
public File getSpotlessOutDirectory() {
4946
return spotlessOutDirectory;
5047
}

0 commit comments

Comments
 (0)