If one attempts to reportScoverage on a specific module in a multi-module project without normal compilation, the compilation will fail in case this specific module depends on another module in the project.
For instance, in a multi-module project, a module depends on common, trying to run the following will fail in compilation:
gradle :a:reportScoverage -x compileScala
The culprit is in the code which is supposed to make sure that the scoverage compilation output directory will be build/classes/scala/main instead of build/classes/scala/scoverage when normal compilation is omitted.
It only does this when the reportScoverage task is in the graph of that module; in the aforementioned example, the plugin will fail to detect that the (scoverage) compilation of the common module needs to adjust its output directory since the :common:reportScoverage task is not in the task graph.
If one attempts to
reportScoverage
on a specific module in a multi-module project without normal compilation, the compilation will fail in case this specific module depends on another module in the project.For instance, in a multi-module project,
a
module depends oncommon
, trying to run the following will fail in compilation:gradle :a:reportScoverage -x compileScala
The culprit is in the code which is supposed to make sure that the scoverage compilation output directory will be
build/classes/scala/main
instead ofbuild/classes/scala/scoverage
when normal compilation is omitted.It only does this when the
reportScoverage
task is in the graph of that module; in the aforementioned example, the plugin will fail to detect that the (scoverage) compilation of thecommon
module needs to adjust its output directory since the:common:reportScoverage
task is not in the task graph.