You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by rp...@apache.org on 2020/04/30 21:41:09 UTC

[groovy] branch master updated: GROOVY-9432: document how to control picocli version in CliBuilder

This is an automated email from the ASF dual-hosted git repository.

rpopma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 05dca72  GROOVY-9432: document how to control picocli version in CliBuilder
05dca72 is described below

commit 05dca7275d70d4e63bf3f83cccd0c47a770c559c
Author: Remko Popma <re...@yahoo.com>
AuthorDate: Fri May 1 06:38:00 2020 +0900

    GROOVY-9432: document how to control picocli version in CliBuilder
---
 src/spec/doc/core-domain-specific-languages.adoc | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/spec/doc/core-domain-specific-languages.adoc b/src/spec/doc/core-domain-specific-languages.adoc
index a0ed6d7..45bbe27 100644
--- a/src/spec/doc/core-domain-specific-languages.adoc
+++ b/src/spec/doc/core-domain-specific-languages.adoc
@@ -1642,6 +1642,18 @@ include::{projectdir}/subprojects/groovy-cli-picocli/src/spec/test/builder/CliBu
 <6> Picocli returns the key-value pairs as a `Map`
 <7> Both keys and values of the map can be strongly typed
 
+*Controlling the Picocli version*
+
+If necessary, you can use the `@Grab` annotation to control the version of picocli to use in `CliBuilder`.
+
+[source,groovy]
+----
+@GrabConfig(systemClassLoader=true)
+@Grab('info.picocli:picocli:4.2.0')
+import groovy.cli.picocli.CliBuilder
+
+def cli = new CliBuilder()
+----
 
 ==== ObjectGraphBuilder