-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Problem with gradlew jacocoRootMerge
with gradle project using kotlin DSL
#198
Comments
I somewhat simplified the two reproducers and made sure the jacoco config is equivalent. I had missed to base jacoco enabling based on Unfortunately, the problem persists... |
There's indeed a difference in the setup in each project. If you run
Now for the kotlin DSL project
|
Apparently the difference stems in that the root project in |
@aalmiray Thank a lot for the analysis (that's a very handy plugin that will reach us in 0.30.0 :-) ). I will apply your findings to my reproducer and the actual repo where I stumbled into this issue and will update asap (probably this evening). Thanks a lot so far... |
Perhaps there's a way to set a root project to have some Java conventions but not all. Wonder it that makes sense at all. |
You're of course right, it was the It's not so trivial to avoid the problem using kotlin dsl though. It's the java plugin that provides the accessor functions such as See gradle/kotlin-dsl-samples#916. I managed to get it working, but it's not as clean as I'd like it to have (I had to apply the java plugin in the submodule gradle files to get access to the accessors in those configuration files. It would be much easier to just be able to apply the java plugin as I initially did. It would be very convenient if the kordamp project plugin was able to prevent the application of the jacocoRootMerge/Report plugins to the project root. But I'm not even sure if this would apply to all scenarios or even makes sense. What do you think? |
Well as it turns out Perhaps the root can have |
That latter suggestion simply leads to the jacocoRootMerge or jacocoRootReport being skipped entirely. |
I updated the reproducer with that suggestion (and also reverted it). |
Hey, very neat. Thanks a lot for the quick resolution :-) |
If the project is configured using gradle kotlin DSL, the jacoco aggregation tasks
fail. Find the Reproducer here.
Note: A quite similarly configured project - albeit using groovy syntax - runs both commands successfully. Reproducer.
*.exec
file even in the root module (withinbuild\jacoco
). Instead it should only try to write the aggregated files into that directory.It may well be that the problem comes from some misconfiguration on my behalf.
The text was updated successfully, but these errors were encountered: