@@ -82,16 +82,17 @@ private static void compileCommon(GoalMetadataProvider.Context context, boolean
8282 }
8383 inputs .fileSet ("classpath" , fileSet -> fileSet .normalizationStrategy (NormalizationStrategy .COMPILE_CLASSPATH ));
8484 inputs .fileSet ("testClasspath" , fileSet -> fileSet .normalizationStrategy (NormalizationStrategy .COMPILE_CLASSPATH ));
85- inputs .fileSet ("sourceDirs" , context .project ().getCompileSourceRoots (),
86- fileSet -> fileSet .normalizationStrategy (NormalizationStrategy .RELATIVE_PATH )
87- .lineEndingHandling (LineEndingHandling .NORMALIZE )
88- .emptyDirectoryHandling (EmptyDirectoryHandling .IGNORE ));
8985 if (test ) {
90- inputs .fileSet ("defaultSourceDir" , context .project ().getCompileSourceRoots (),
86+ inputs .fileSet ("defaultSourceDir" , context .project ().getTestCompileSourceRoots (),
87+ fileSet -> fileSet .normalizationStrategy (NormalizationStrategy .RELATIVE_PATH )
88+ .lineEndingHandling (LineEndingHandling .NORMALIZE )
89+ .emptyDirectoryHandling (EmptyDirectoryHandling .IGNORE ));
90+ inputs .fileSet ("defaultSourceDirs" , context .project ().getTestCompileSourceRoots (),
9191 fileSet -> fileSet .normalizationStrategy (NormalizationStrategy .RELATIVE_PATH )
9292 .lineEndingHandling (LineEndingHandling .NORMALIZE )
9393 .emptyDirectoryHandling (EmptyDirectoryHandling .IGNORE ));
94- inputs .fileSet ("defaultSourceDirs" , context .project ().getCompileSourceRoots (),
94+ } else {
95+ inputs .fileSet ("sourceDirs" , context .project ().getCompileSourceRoots (),
9596 fileSet -> fileSet .normalizationStrategy (NormalizationStrategy .RELATIVE_PATH )
9697 .lineEndingHandling (LineEndingHandling .NORMALIZE )
9798 .emptyDirectoryHandling (EmptyDirectoryHandling .IGNORE ));
0 commit comments