This is really interesting. I do like to have ‘CI stats’ per leaf node (ie. the main microservices that people change).
I guess if you need it per leaf node, you need to set up CI separately for each leaf node anyway.
And that means you do run :that:leaf:node:build
and it will only build that leaf node and what is necessary. Depending on the CI system, you can then probabably also configure which paths trigger a build if changes are detected.
The cache you mention is interesting though it leads to the same issues regarding CI stats/code coverage stats, etc
Well, the “build time” stat was maybe a bad example, as it will depend on how much is rebuilt and how much is coming from cache. But all other stats should work with task output coming from caches. Amount of tests or test coverage for example is usually imported to CI by parsing the XML report file the test task or coverage report task is generating and even if theses are taken from cache, they will have the correct numbers.
though personally I think build times going down enough may trump the stats (though I want those still now that you mention it…lol)
Yes, build time is important for big builds, but with task output cache and upcoming configuration cache it should be much better than when rebuilding everything each time.
And especially for developer builds I think the time is much more relevant than on CI.
And developer builds should usually not be run clean, so even without build cache most tasks should simply be up-to-date if not much changed.
I can’t open a single project or intellij just fails because it is a multiproject build not a composite build.
Then I probably misunderstood you. I understood that they are combined through composite builds.
Maybe you should change that and it will allow to do it like that then. 
Is there a way to not have intellij index the world?
If it is a big big multi-project and not a composite build forest where you can just open a part like assumed, then there might still be options. You can for example “Unload” modules in IntelliJ which marks them as “I don’t work with those currently, don’t index them, don’t highlight, and so on”.
And you can most probably combine this with idea-ext
plugin. As far as I remember it does not have an option to unload modules. You could probably open a feature request for that. But as an ad-hoc measure afair it also has the “manipulate my XML” functionality the idea
plugin also has, so you can probably at least with that configure the unloaded modules, you just have to check where IntelliJ persists this setting.
That and downloading the world’s 3rd party deps is a killer vs. loading a leaf node and only indexing what I am going to work on and only loading 3rd parties of what I will work on.
Well, those should be in the Gradle cache once you downloaded them, so this should not be a persistent problem.
I was sort of hoping gradle had some progress in monorepo for those that wanted it.
I have no idea whether Gradle has any plans in that direction or whether maybe some plugin for this exists or could exist. While I’m still not sure how you detect which leaves to build if you do a clean build as you don’t know which two code states to compare if you do not have locally modified files, assuming this is possible somehow, I guess it shouldn’t be too hard to write some plugin that determines which paths / leaves changed and then have some monoBuild
task that depends on build
, buildNeeded
, and buildDependents
for those projects that have changes which would probably achieve what you want.
But as I said, I’m not aware of any plans or options, as I’m personally no big fan of monobuilds yet.
Thinking more on the subject. CI stats, code coverage over time. This could exist actually if gradle wanted it to. ie. only stats for projects built are kept in stored over time so you ‘could’ in theory go into any libraries history just fine.
I don’t really get what you mean.
Those are CI stats, not Gradle stats.
And also how should Gradle keep anything anywhere if you always do a clean build as you described?
There is no place to persist anything and thus also no way to determine “what changed”.
Or what do I miss?