Skip to content

Commit ad52712

Browse files
committed
Use all test src folders in compilation (if there are more than one)
1 parent 76205f0 commit ad52712

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/gradlex/javamodule/testing/internal/provider/WhiteboxTestCompileArgumentProvider.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import java.util.ArrayList;
3030
import java.util.List;
3131
import java.util.Set;
32+
import java.util.stream.Collectors;
3233

3334
public class WhiteboxTestCompileArgumentProvider implements CommandLineArgumentProvider {
3435
private final Set<File> mainSourceFolders;
@@ -56,7 +57,8 @@ public void testRequires(List<String> testRequires) {
5657
@Override
5758
public Iterable<String> asArguments() {
5859
String moduleName = moduleInfoParser.moduleName(mainSourceFolders);
59-
String testSources = testSourceFolders.iterator().next().getPath();
60+
String testSources = testSourceFolders.stream().map(File::getPath)
61+
.collect(Collectors.joining(File.pathSeparator));
6062

6163
List<String> args = new ArrayList<>();
6264

0 commit comments

Comments
 (0)