Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with gradle-scalaxb #148

Open
atais opened this issue Nov 19, 2020 · 0 comments
Open

Working with gradle-scalaxb #148

atais opened this issue Nov 19, 2020 · 0 comments

Comments

@atais
Copy link

atais commented Nov 19, 2020

The issue is a duplicate of olisikh/gradle-scalaxb-plugin#16 but it is not so actively maintained.

How to reproduce

I made those changes already on my master fork: https://github.com/atais/gradle-scalaxb-plugin/tree/master/example

Take demo project from gradle-scalaxb, add scoverage and then:

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.

btw. We are using Scala 2.11 and scoverage 4.1.0

What can be done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant