File tree 1 file changed +9
-0
lines changed
plugin-gradle/src/test/java/com/diffplug/gradle/spotless
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ protected GradleRunner gradleRunner() throws IOException {
119
119
return GradleRunner .create ()
120
120
.withGradleVersion (GradleVersionSupport .MINIMUM .version )
121
121
.withProjectDir (rootFolder ())
122
+ .withTestKitDir (getTestKitDir ())
122
123
.withPluginClasspath ();
123
124
}
124
125
@@ -221,4 +222,12 @@ static String buildResultToString(BuildResult result) {
221
222
}
222
223
});
223
224
}
225
+
226
+ private static File getTestKitDir () {
227
+ String gradleUserHome = System .getenv ("GRADLE_USER_HOME" );
228
+ if (gradleUserHome == null || gradleUserHome .isEmpty ()) {
229
+ gradleUserHome = new File (System .getProperty ("user.home" ), ".gradle" ).getAbsolutePath ();
230
+ }
231
+ return new File (gradleUserHome , "testkit" );
232
+ }
224
233
}
You can’t perform that action at this time.
0 commit comments