Skip to content

Commit 3307b82

Browse files
committed
Change our error messages to reference the workaround, and also to point to our explanation issue.
1 parent 2768996 commit 3307b82

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,18 @@ static boolean isHydrated(SpotlessTask task) {
138138

139139
static void assertHydrated(SpotlessTask task) {
140140
if (!isHydrated(task)) {
141-
throw new GradleException("Spotless doesn't support configuration cache yet.\n" +
142-
"Rerun with --no-configuration-cache");
141+
throw new GradleException("Spotless needs a workaround to support configuration cache:\n" +
142+
" (in your root build.gradle)\n" +
143+
" apply plugin: 'com.diffplug.spotless-setup\n" +
144+
" spotlessSetup { jvmLocalCache = true }\n" +
145+
"To make this workaround obsolete, please upvote https://github.com/diffplug/spotless/issues/987");
143146
}
144147
}
145148

146149
static GradleException cacheIsStale() {
147-
return new GradleException("Spotless daemon-local cache is stale. Regenerate the cache with\n" +
150+
return new GradleException("Spotless JVM-local cache is stale. Regenerate the cache with\n" +
148151
" " + (FileSignature.machineIsWin() ? "rmdir /q /s" : "rm -rf") + " .gradle/configuration-cache\n" +
149-
"For more information see #123");
152+
"To make this workaround obsolete, please upvote https://github.com/diffplug/spotless/issues/987");
150153
}
151154

152155
static class LiveCache {

0 commit comments

Comments
 (0)