Skip to content

Commit 88abf9a

Browse files
authored
Add @DisableCachingByDefault as hint why outputs are not cached (#1666)
2 parents 0502cab + 029acd6 commit 88abf9a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

plugin-gradle/CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (starting after version `3.27.0`).
44

55
## [Unreleased]
6+
### Fixed
7+
* Added `@DisableCachingByDefault` to `RegisterDependenciesTask`.
68

79
## [6.18.0] - 2023-04-06
810
### Added

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2022 DiffPlug
2+
* Copyright 2016-2023 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.
@@ -31,6 +31,7 @@
3131
import org.gradle.api.tasks.OutputFile;
3232
import org.gradle.api.tasks.TaskAction;
3333
import org.gradle.build.event.BuildEventsListenerRegistry;
34+
import org.gradle.work.DisableCachingByDefault;
3435

3536
import com.diffplug.common.base.Preconditions;
3637
import com.diffplug.common.io.Files;
@@ -46,6 +47,7 @@
4647
* - When this "registerDependencies" task does its up-to-date check, it queries the task execution graph to see which
4748
* SpotlessTasks are at risk of being executed, and causes them all to be evaluated safely in the root buildscript.
4849
*/
50+
@DisableCachingByDefault(because = "This task coordinates the setup and execution of other tasks, and should not be cached")
4951
public abstract class RegisterDependenciesTask extends DefaultTask {
5052
static final String TASK_NAME = "spotlessInternalRegisterDependencies";
5153

0 commit comments

Comments
 (0)