Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2020-05-13 13:24:55 +00:00
parent 22b94bf688
commit 52a4f244cd
42 changed files with 3419 additions and 2864 deletions

View File

@@ -1303,6 +1303,42 @@ the `publish` task is executed
publish.dependsOn("publishStubsToScm")</code></pre>
</div>
</div>
<div class="paragraph">
<p>It is also possible to further customise the <code>publishStubsToScm</code> gradle task. In the following example,
the task is customised to pick contracts from a local git repository:</p>
</div>
<div class="listingblock secondary">
<div class="title">gradle</div>
<div class="content">
<pre class="highlightjs highlight"><code class="language-groovy hljs" data-lang="groovy">publishStubsToScm {
// We want to modify the default set up of the plugin when publish stubs to scm is called
// We want to pick contracts from a Git repository
contractDependency {
stringNotation = "${project.group}:${project.name}:${project.version}"
}
/*
We reuse the contract dependency section to set up the path
to the folder that contains the contract definitions. In our case the
path will be /groupId/artifactId/version/contracts
*/
contractRepository {
repositoryUrl = "git://file://${new File(project.rootDir, "../target")}/contract_empty_git/"
}
// We set the contracts mode to `LOCAL`
contractsMode = "LOCAL"
}</code></pre>
</div>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">IMPORTANT</dt>
<dd>
<p>Starting with <code>2.3.0.RELEASE</code> the <code>customize{}</code> closure previously used for the
<code>publishStubsToScm</code> customization is no longer available. The settings should be applied directly
within the <code>publishStubsToScm</code> closure as in the example above.</p>
</dd>
</dl>
</div>
</div>
</div>
<div class="paragraph">