It seems gradle is now injecting the subprojects section into ‘core’ even though ‘core’ is not in my settings.gradle. Jacoco is failing as it is looking for core/output/jacoco/exec.txt which will not exist since that is not a subproject. It is only a directory containing subprojects.
I am not sure how to workaround this. Is there a realsubprojects {} closure instead of subprojects { }.
Why is ‘core’ considered a subproject since I do not have it in settings.gradle?
This feels like a gradle bug rather than a jacoco plugin bug since ‘core’ is being treated as a subproject but I could be wrong since I don’t know the details. I definitely do not want core to really do anything. It should not even have an ‘buildDir’ created at the end of the day since it is only a directory.
How are you adding these projects in settings.gradle?
If you’re doing something like: include ":core:core-project1"
Then core is a parent project for core-project1. This has always worked this way.
There were some changes in 4.x or 5.x that changed the characters you were allowed to use in your subproject names, but I don’t know of anything specifically in 5.6.
hmmm, yes, :core:core-project1 is exactly how I add it though core directory is empty with just actual gradle projects in it. Is there any way I can fix this issue? or does the jacoco plugin somehow have to be fixed to account for this?
I am not sure why the jacoco plugin worked in 5.3.1 but not in 5.6.3. I ran through upgrading this week to see where we broke and fix it (NOTE: It doesn’t look like it but the link goes to gradle-wrapper.properties file history to see the upgrade version history)
We could not upgrade to 6 though as that broke even more stuff. All in all, I wish upgrading gradle was more like the jdk as every upgrade seems to break stuff :(. feels like ruby days which is sad since otherwise gradle is sooooo powerful.