Quick start guide for new configuration model

I’m part of a team that may be moving a portion of our build to Gradle. We have mostly native code with a few Java components, so I think it makes sense to use the new software model exclusively (consisting of the “model” and “components” blocks, etc). Since this is the only structure used for native builds, and is apparently the future of Java builds, it seems easier to teach this one structure to the team, as it will result in more consistent build.gradle files across the board.

However, most of the official Gradle documentation is still focused only on Java, and only on the traditional structure (with top-level elements like “sourceSets” and “dependencies”). Even the main Gradle DSL reference does not mention the “model” and “components” blocks at all.

I realize the new configuration model is incubating, but is there a roadmap for updating the DSL reference to include better documentation for the top-level blocks in the new model? And has anyone put together a general “quick start” guide on the new model and the main DSL constructs as they apply to both Java and C/C++? If not, is there an appropriate forum for me to help contribute such a guide?

Well, I wrote up a high-level blog post that I think covers some of the things missing from the current docs.

I was pretty much going to have to do this internally for my team anyway; hopefully putting it here helps someone else too :slight_smile:

This is a nice write up. Thanks for writing it up. I think it would be great if we included something like this in the user guide, to give an idea of the basic concepts, and the process from defining the build to ending up with some tasks that get run.

We’ve restructured the user guide a bit in 2.10 to group the software model chapters together: https://docs.gradle.org/release-candidate/userguide/pt06.html. It might be good to include something like your overview in the chapter about software model concepts, and turn this into a general overview of how the model works.

Let us know how you fare with using the software model for your build, and in particular, whatever pain you come across (such as the missing content from the user guide). Just be aware things will change over the next few releases as we add more features and clean stuff up ready to release it properly.

Thanks - and thanks for the link to the release candidate docs. Nice to see how they’re shaping up; definitely moving toward a more cohesive picture of the new model. And yea, I think that including something like this about how components, binaries, and tasks work together would be good to include after the “big picture” concepts but before the specific sections on Java and native. Let me know if I can help.

I’ll definitely be hanging around as we convert things over to Gradle; I’m sure there will be more questions. Still need to wrap my head around some things like creating custom plugins (I had another question about creating plugins, if you happen to know that answer). But I like the direction things are going; looking forward to digging in some more!