'publishing' block or 'model' block?

Hi

Chapter 65.6 of the user guide states that access to the publication tasks should be done in a ‘publishing’ block. But, the sample contradicts this, since it puts the access in a ‘model’ block.

What is correct? The ‘publishing’ block or the ‘model’ block? And what does the ‘model’ block mean?

Any clarification would be appreciated. Thanks in advance.

Regards, Etienne

I assume you’re looking at a nightly build.

In that case, the sample is correct and the User Guide needs to be updated. Conversion to model rules is a work in progress, so you may want to stick with Gradle 2.0 for now.

Thanks for the quick reply.

Btw, the documentation is the same for official 1.x versions, for example 1.12: http://www.gradle.org/docs/1.12/userguide/userguide_single.html#publishing_maven:generate-pom

Right you are. The change to configure the publishing tasks via the model block was done for Gradle 1.9. I’ll update the docs to reflect the change.

(The samples are tested as part of our CI, but naturally the text in the user guide is not so easy to test!)

:slight_smile: Thanks for the clarification, Daz.