Allow setting the --module-path argument for delombok
see
@@ -90,6 +90,13 @@ public class Delombok extends DefaultTask implements LombokTask {
@Optional
private final ConfigurableFileCollection bootclasspath = getProject().files();
+ /**
+ * Module path (analogous to javac --module-path option)
+ */
+ @Classpath
+ @Optional
+ private final ConfigurableFileCollection modulePath = getProject().files();
+
/**
* Lombok will only delombok source files.
* Without this option, non-java, non-class files are copied to the target directory.
@@ -155,6 +162,10 @@ public class Delombok extends DefaultTask implements LombokTask {
args.add("--bootclasspath=" + escape(getBootclasspath().getAsPath()));
}
+ if (!modulePath.isEmpty()) {
+ args.add("--module-path=" + escape(getModulePath().getAsPath()));
+ }
+
if (nocopy.getOrElse(false)) {
args.add("--nocopy");
}
