File tree 1 file changed +7
-0
lines changed
plugin-gradle/src/test/java/com/diffplug/gradle/spotless
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 20
20
import org .gradle .testkit .runner .BuildResult ;
21
21
import org .gradle .testkit .runner .GradleRunner ;
22
22
import org .junit .jupiter .api .Test ;
23
+ import org .junit .jupiter .api .condition .EnabledForJreRange ;
24
+ import org .junit .jupiter .api .condition .JRE ;
23
25
24
26
public class ConfigurationCacheTest extends GradleIntegrationHarness {
25
27
@ Override
@@ -63,6 +65,7 @@ public void helpConfiguresIfTasksAreCreated() throws IOException {
63
65
}
64
66
65
67
@ Test
68
+ @ EnabledForJreRange (max = JRE .JAVA_20 )
66
69
public void jvmLocalCache () throws IOException {
67
70
setFile ("build.gradle" ).toLines (
68
71
"plugins {" ,
@@ -91,6 +94,10 @@ public void jvmLocalCache() throws IOException {
91
94
gradleRunner ().withArguments ("spotlessApply" ).build ();
92
95
assertFile ("test.java" ).sameAsResource ("java/googlejavaformat/JavaCodeFormatted.test" );
93
96
97
+ // the withDebug forces it to start a new deamon, but only in Gradle 8.3 and older
98
+ // starting with Gradle 8.5 this doesn't work anymore
99
+ // and we need Gradle 8.5 for Java 21
100
+ // so we can't test this on Java 21 for now
94
101
BuildResult failure = gradleRunner ().withDebug (true ).withArguments ("spotlessApply" , "--stacktrace" ).buildAndFail ();
95
102
failure .getOutput ().contains ("Spotless daemon-local cache is stale. Regenerate the cache with\n " +
96
103
" rm -rf .gradle/configuration-cache\n " +
You can’t perform that action at this time.
0 commit comments