Determining which JavaExec#classpath members are resource directories


(Ross Goldberg) #1

Is it possible to determine which JavaExec#classpath members are resource directories?

To support JPMS (Jigsaw), I need to use the resource directory for the --patch-module option, but use all other JavaExec#classpath members for the --module-path option.

I imagine that there is no way to definitively determine this, but I figured I’d ask…

If this is currently impossible, would it ever make sense to change the Task input & output handling to have descriptors for the inputs & outputs, like marking a specific path as a directory containing resources, or a jar containing Java byte code, or a directory containing Java (or Kotlin, or…) source files, etc.? This could aid auto-configuration of many tasks, albeit possibly at the price of some backwards compatibility.