olisikh / gradle-scalaxb-plugin

Gradle plugin for Scalaxb
MIT License
6 stars 2 forks source link

Working with gradle-scoverage 4.1.0 #16

Open atais opened 3 years ago

atais commented 3 years ago

Intro

After applying scoverage to the example project

apply plugin: "com.github.alisiikh.scalaxb"
apply plugin: "org.scoverage"

will work. But changing this order into:

apply plugin: "org.scoverage"
apply plugin: "com.github.alisiikh.scalaxb"

results in a cryptic error:

* What went wrong:
A problem occurred configuring root project 'example'.
> Cannot change dependencies of dependency configuration ':scalaxb' after it has been included in dependency resolution.
resolution.

Stacktrace:

Caused by: org.gradle.api.InvalidUserDataException: Cannot change dependencies of dependency configuration ':caar-tito:scalaxb' after it has been included in dependency resolution.
        ...
        at org.gradle.internal.metaobject.ConfigureDelegate.invokeMethod(ConfigureDelegate.java:56)
        at com.github.alisiikh.scalaxb.ScalaxbPlugin$_createConfiguration_closure2$_closure6.doCall(ScalaxbPlugin.groovy:70)

My problem:

The issue is that I am using a multimodule project, where scoverage is applied to all modules and scalaxb only to some, resulting in the order causing problems.

What can be done? I am also going to link this to https://github.com/scoverage/gradle-scoverage project