LUCENE-10327: workaround for gradle emitting empty sourcepath.

This commit is contained in:
Dawid Weiss 2021-12-19 08:52:01 +01:00
parent d2c98912eb
commit 5512786dd9
1 changed files with 3 additions and 0 deletions

View File

@ -110,6 +110,9 @@ allprojects {
tasks.named(sourceSet.getCompileJavaTaskName()).configure({ JavaCompile task -> tasks.named(sourceSet.getCompileJavaTaskName()).configure({ JavaCompile task ->
task.dependsOn modularPaths.compileModulePathConfiguration task.dependsOn modularPaths.compileModulePathConfiguration
// LUCENE-10327: don't allow gradle to emit an empty sourcepath as it would break compilation.
task.options.setSourcepath(sourceSet.java.sourceDirectories)
// Add modular dependencies and their transitive dependencies to module path. // Add modular dependencies and their transitive dependencies to module path.
task.options.compilerArgumentProviders.add((CommandLineArgumentProvider) { task.options.compilerArgumentProviders.add((CommandLineArgumentProvider) {
def modularPathFiles = modularPaths.compileModulePathConfiguration.files def modularPathFiles = modularPaths.compileModulePathConfiguration.files