1
1
/*
2
- * Copyright 2020-2023 DiffPlug
2
+ * Copyright 2020-2024 DiffPlug
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
17
17
18
18
import java .io .IOException ;
19
19
20
- import org .gradle .testkit .runner .BuildResult ;
21
20
import org .gradle .testkit .runner .GradleRunner ;
22
21
import org .junit .jupiter .api .Test ;
23
- import org .junit .jupiter .api .condition .EnabledForJreRange ;
24
- import org .junit .jupiter .api .condition .JRE ;
25
22
26
23
public class ConfigurationCacheTest extends GradleIntegrationHarness {
27
24
@ Override
@@ -65,8 +62,7 @@ public void helpConfiguresIfTasksAreCreated() throws IOException {
65
62
}
66
63
67
64
@ Test
68
- @ EnabledForJreRange (max = JRE .JAVA_20 )
69
- public void jvmLocalCache () throws IOException {
65
+ public void multipleRuns () throws IOException {
70
66
setFile ("build.gradle" ).toLines (
71
67
"plugins {" ,
72
68
" id 'com.diffplug.spotless'" ,
@@ -93,14 +89,5 @@ public void jvmLocalCache() throws IOException {
93
89
gradleRunner ().withArguments ("spotlessCheck" ).buildAndFail ();
94
90
gradleRunner ().withArguments ("spotlessApply" ).build ();
95
91
assertFile ("test.java" ).sameAsResource ("java/googlejavaformat/JavaCodeFormatted.test" );
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
101
- BuildResult failure = gradleRunner ().withDebug (true ).withArguments ("spotlessApply" , "--stacktrace" ).buildAndFail ();
102
- failure .getOutput ().contains ("Spotless daemon-local cache is stale. Regenerate the cache with\n " +
103
- " rm -rf .gradle/configuration-cache\n " +
104
- "For more information see #123\n " );
105
92
}
106
93
}
0 commit comments