This is an automated email from the ASF dual-hosted git repository. rpopma pushed a commit to branch GROOVY_2_5_X in repository https://gitbox.apache.org/repos/asf/groovy.git
commit a1a5a4ed3c0efe86818df1f7a4e95ef162e5f4ab Author: Remko Popma <[email protected]> AuthorDate: Wed Apr 29 12:09:25 2020 +0900 GROOVY-9531: improve CliBuilder documentation to clarify what functionality is available in which version (cherry picked from commit 152930dfe85221a536f2efc62dd0e7e0d5e65807) --- src/spec/doc/core-domain-specific-languages.adoc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/spec/doc/core-domain-specific-languages.adoc b/src/spec/doc/core-domain-specific-languages.adoc index aef7c52..d3a7f51 100644 --- a/src/spec/doc/core-domain-specific-languages.adoc +++ b/src/spec/doc/core-domain-specific-languages.adoc @@ -1114,10 +1114,9 @@ def options = cli.parse(args) <5> if (options.h) cli.usage() <6> else println "Hello ${options.a ? options.a : 'World'}" <7> --------------------------- -<1> Earlier versions of Groovy had a CliBuilder in the groovy.util package and no import was necessary. -While still supported, this approach is now deprecated and you should instead choose the groovy.cli.picocli -or groovy.cli.commons version. The groovy.util version points to the commons-cli version for backwards compatibility -but will be removed in a future version of Groovy. +<1> Earlier versions of Groovy had a CliBuilder in the `groovy.util` package and no import was necessary. +In Groovy 2.5, this approach became deprecated: applications should instead choose the `groovy.cli.picocli` or `groovy.cli.commons` version. +The groovy.util version in Groovy 2.5 points to the commons-cli version for backwards compatibility but has been removed in Groovy 3.0. <2> define a new `CliBuilder` instance specifying an optional usage string <3> specify a `-a` option taking a single argument with an optional long variant `--audience` <4> specify a `-h` option taking no arguments with an optional long variant `--help`
