Closed eyalroth closed 5 years ago
I'm not overly worried about requiring users to change their builds - I think this is what the major version number is for.
Could we detect the presence of the java-platform
plugin? I suspect this would then require users to order their plugins, which also seems bad.
We could detect the presence of any plugin, but I don't believe that's necessary. The java-platform
is intended to be applied on non-code modules, of which this plugin has no interest in.
One way to align versions of dependencies in a multi-module project is via the
java-platform
builtin plugin. The plugin is applied on a specific sub-project and declares all the dependencies' versions there. This is explained in the official documentation.The problem arises when this plugin -- scoverage -- applies itself to all the sub-projects automatically, which causes an incompatibility error in the dependencies sub-project, as the
java-platform
plugin cannot be applied simultaneously with a java plugin such as scoverage.I believe the only viable solution here is to remove the behavior of automatically applying the plugin on sub-projects. This was also requested in #118, so I think this really is the way to go.
The only problem with this approach is that it might silently break users' builds. This may not even raise any errors but only change the coverage statistics without users understanding why. Perhaps it is enough to raise a warning whenever the plugin is applied only for the purpose of aggregation (on root projects with no source code) but without the plugin applied on any sub-project with code (scala plugin applied as well).