File tree 1 file changed +8
-14
lines changed
buildSrc/src/main/java/org/elasticsearch/gradle/precommit
1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -70,19 +70,13 @@ public TestingConventionsTasks() {
70
70
}
71
71
72
72
@ Input
73
- public Map <String , Set <File >> classFilesPerEnabledTask (FileTree testClassFiles ) {
74
- Map <String , Set <File >> collector = new HashMap <>();
75
-
76
- // Gradle Test
77
- collector .putAll (
78
- getProject ().getTasks ().withType (Test .class ).stream ()
79
- .filter (Task ::getEnabled )
80
- .collect (Collectors .toMap (
81
- Task ::getPath ,
82
- task -> task .getCandidateClassFiles ().getFiles ()
83
- ))
84
- );
85
- return Collections .unmodifiableMap (collector );
73
+ public Map <String , Set <File >> getClassFilesPerEnabledTask () {
74
+ return getProject ().getTasks ().withType (Test .class ).stream ()
75
+ .filter (Task ::getEnabled )
76
+ .collect (Collectors .toMap (
77
+ Task ::getPath ,
78
+ task -> task .getCandidateClassFiles ().getFiles ()
79
+ ));
86
80
}
87
81
88
82
@ Input
@@ -154,7 +148,7 @@ public void doCheck() throws IOException {
154
148
.collect (Collectors .toList ())
155
149
).getAsFileTree ();
156
150
157
- final Map <String , Set <File >> classFilesPerTask = classFilesPerEnabledTask ( allTestClassFiles );
151
+ final Map <String , Set <File >> classFilesPerTask = getClassFilesPerEnabledTask ( );
158
152
159
153
final Map <String , Set <Class <?>>> testClassesPerTask = classFilesPerTask .entrySet ().stream ()
160
154
.collect (
You can’t perform that action at this time.
0 commit comments