From 51f6c7a1ad6e2eb0b51603940c5730fbfbaaca87 Mon Sep 17 00:00:00 2001 From: AJ Alt Date: Sun, 15 Apr 2018 15:29:40 -0700 Subject: [PATCH] Release version 1.1.0 * Add `List` overloads to `CliktCommand.parse` and `main` * Add `err` parameter to `TermUi.echo` * Add `error` property to `Abort` --- README.md | 2 +- .../-abort/-init-.html | 4 ++-- .../-abort/error.html | 18 ++++++++++++++++++ .../-abort/index.html | 16 +++++++++++++++- .../-clikt-command/index.html | 8 ++++---- .../-clikt-command/main.html | 6 ++++-- .../-clikt-command/parse.html | 6 ++++-- .../-no-run-clikt-command/index.html | 8 ++++---- .../-term-ui/echo.html | 10 ++++++---- .../-term-ui/index.html | 4 ++-- docs/api/clikt/index-outline.html | 18 ++++++++++++------ gradle.properties | 2 +- 12 files changed, 73 insertions(+), 29 deletions(-) create mode 100755 docs/api/clikt/com.github.ajalt.clikt.core/-abort/error.html diff --git a/README.md b/README.md index 5ec1b319b..4dcbae212 100755 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ list, then you can add Clikt to your project: ```groovy dependencies { - compile 'com.github.ajalt:clikt:1.0.0' + compile 'com.github.ajalt:clikt:1.1.0' } ``` diff --git a/docs/api/clikt/com.github.ajalt.clikt.core/-abort/-init-.html b/docs/api/clikt/com.github.ajalt.clikt.core/-abort/-init-.html index b2738552d..815c53b7e 100755 --- a/docs/api/clikt/com.github.ajalt.clikt.core/-abort/-init-.html +++ b/docs/api/clikt/com.github.ajalt.clikt.core/-abort/-init-.html @@ -8,8 +8,8 @@ clikt / com.github.ajalt.clikt.core / Abort / <init>

<init>

- -Abort() + +Abort(error: Boolean = true)

An internal error that signals Clikt to abort.

diff --git a/docs/api/clikt/com.github.ajalt.clikt.core/-abort/error.html b/docs/api/clikt/com.github.ajalt.clikt.core/-abort/error.html new file mode 100755 index 000000000..937c5481a --- /dev/null +++ b/docs/api/clikt/com.github.ajalt.clikt.core/-abort/error.html @@ -0,0 +1,18 @@ + + + +Abort.error - clikt + + + +clikt / com.github.ajalt.clikt.core / Abort / error
+
+

error

+ +val error: Boolean +

If true, print "Aborted" and exit with an error code. Otherwise, exit with no error code.

+

Property

+

+error - If true, print "Aborted" and exit with an error code. Otherwise, exit with no error code.

+ + diff --git a/docs/api/clikt/com.github.ajalt.clikt.core/-abort/index.html b/docs/api/clikt/com.github.ajalt.clikt.core/-abort/index.html index 53a77695e..01b8352c0 100755 --- a/docs/api/clikt/com.github.ajalt.clikt.core/-abort/index.html +++ b/docs/api/clikt/com.github.ajalt.clikt.core/-abort/index.html @@ -18,11 +18,25 @@

Constructors

<init>

-Abort() +Abort(error: Boolean = true)

An internal error that signals Clikt to abort.

+

Properties

+ + + + + + + +
+

error

+
+val error: Boolean +

If true, print "Aborted" and exit with an error code. Otherwise, exit with no error code.

+
diff --git a/docs/api/clikt/com.github.ajalt.clikt.core/-clikt-command/index.html b/docs/api/clikt/com.github.ajalt.clikt.core/-clikt-command/index.html index fdbabbd48..0c7d16544 100755 --- a/docs/api/clikt/com.github.ajalt.clikt.core/-clikt-command/index.html +++ b/docs/api/clikt/com.github.ajalt.clikt.core/-clikt-command/index.html @@ -121,18 +121,18 @@

Functions

main

-fun main(argv: Array<String>): Unit +fun main(argv: List<String>): Unit

Parse the command line and print helpful output if any errors occur.

- +fun main(argv: Array<String>): Unit

parse

-fun parse(argv: Array<String>, context: Context? = null): Unit +fun parse(argv: List<String>, parentContext: Context? = null): Unit

Parse the command line and throw an exception if parsing fails.

- +fun parse(argv: Array<String>, parentContext: Context? = null): Unit diff --git a/docs/api/clikt/com.github.ajalt.clikt.core/-clikt-command/main.html b/docs/api/clikt/com.github.ajalt.clikt.core/-clikt-command/main.html index f7df955cc..0445a3511 100755 --- a/docs/api/clikt/com.github.ajalt.clikt.core/-clikt-command/main.html +++ b/docs/api/clikt/com.github.ajalt.clikt.core/-clikt-command/main.html @@ -8,10 +8,12 @@ clikt / com.github.ajalt.clikt.core / CliktCommand / main

main

- -fun main(argv: Array<String>): Unit + +fun main(argv: List<String>): Unit

Parse the command line and print helpful output if any errors occur.

This function calls parse and catches and CliktErrors that are thrown. Other error are allowed to pass through.

+ +fun main(argv: Array<String>): Unit diff --git a/docs/api/clikt/com.github.ajalt.clikt.core/-clikt-command/parse.html b/docs/api/clikt/com.github.ajalt.clikt.core/-clikt-command/parse.html index 494023612..62279a445 100755 --- a/docs/api/clikt/com.github.ajalt.clikt.core/-clikt-command/parse.html +++ b/docs/api/clikt/com.github.ajalt.clikt.core/-clikt-command/parse.html @@ -8,9 +8,11 @@ clikt / com.github.ajalt.clikt.core / CliktCommand / parse

parse

- -fun parse(argv: Array<String>, context: Context? = null): Unit + +fun parse(argv: List<String>, parentContext: Context? = null): Unit

Parse the command line and throw an exception if parsing fails.

You should use main instead unless you want to handle output yourself.

+ +fun parse(argv: Array<String>, parentContext: Context? = null): Unit diff --git a/docs/api/clikt/com.github.ajalt.clikt.core/-no-run-clikt-command/index.html b/docs/api/clikt/com.github.ajalt.clikt.core/-no-run-clikt-command/index.html index c27006281..2455dfb45 100755 --- a/docs/api/clikt/com.github.ajalt.clikt.core/-no-run-clikt-command/index.html +++ b/docs/api/clikt/com.github.ajalt.clikt.core/-no-run-clikt-command/index.html @@ -118,18 +118,18 @@

Inherited Functions

main

-fun main(argv: Array<String>): Unit +fun main(argv: List<String>): Unit

Parse the command line and print helpful output if any errors occur.

- +fun main(argv: Array<String>): Unit

parse

-fun parse(argv: Array<String>, context: Context? = null): Unit +fun parse(argv: List<String>, parentContext: Context? = null): Unit

Parse the command line and throw an exception if parsing fails.

- +fun parse(argv: Array<String>, parentContext: Context? = null): Unit diff --git a/docs/api/clikt/com.github.ajalt.clikt.output/-term-ui/echo.html b/docs/api/clikt/com.github.ajalt.clikt.output/-term-ui/echo.html index ec86bda8f..d74d21940 100755 --- a/docs/api/clikt/com.github.ajalt.clikt.output/-term-ui/echo.html +++ b/docs/api/clikt/com.github.ajalt.clikt.output/-term-ui/echo.html @@ -8,14 +8,16 @@ clikt / com.github.ajalt.clikt.output / TermUi / echo

echo

- -fun echo(message: Any?, trailingNewline: Boolean = true): Unit -

Print the message to the screen.

+ +fun echo(message: Any?, trailingNewline: Boolean = true, err: Boolean = false): Unit +

Print the message to the screen.

This is similar to print or println, but converts newlines to the system line separator.

Parameters

message - The message to print.

-trailingNewline - if true, behave like println, otherwise behave like print

+trailingNewline - If true, behave like println, otherwise behave like print

+

+err - If true, print to stderr instead of stdout

diff --git a/docs/api/clikt/com.github.ajalt.clikt.output/-term-ui/index.html b/docs/api/clikt/com.github.ajalt.clikt.output/-term-ui/index.html index 6b3f373e2..4fdb01097 100755 --- a/docs/api/clikt/com.github.ajalt.clikt.output/-term-ui/index.html +++ b/docs/api/clikt/com.github.ajalt.clikt.output/-term-ui/index.html @@ -40,8 +40,8 @@

Functions

echo

-fun echo(message: Any?, trailingNewline: Boolean = true): Unit -

Print the message to the screen.

+fun echo(message: Any?, trailingNewline: Boolean = true, err: Boolean = false): Unit +

Print the message to the screen.

diff --git a/docs/api/clikt/index-outline.html b/docs/api/clikt/index-outline.html index 66aef7d62..b73fa7a53 100755 --- a/docs/api/clikt/index-outline.html +++ b/docs/api/clikt/index-outline.html @@ -32,7 +32,8 @@ -Abort()
+Abort(error: Boolean = true)
+val error: Boolean
@@ -124,8 +125,10 @@ open fun getFormattedHelp(): String
open fun getFormattedUsage(): String
val invokeWithoutSubcommand: Boolean
+fun main(argv: List<String>): Unit
fun main(argv: Array<String>): Unit
-fun parse(argv: Array<String>, context: Context? = null): Unit
+fun parse(argv: List<String>, parentContext: Context? = null): Unit
+fun parse(argv: Array<String>, parentContext: Context? = null): Unit
fun registerArgument(argument: Argument): Unit
fun registerOption(option: Option): Unit
fun registeredSubcommandNames(): List<String>
@@ -663,7 +666,7 @@ fun confirm(text: String, default: Boolean = false, abort: Boolean = false, promptSuffix: String = ": ", showDefault: Boolean = true): Boolean?
-fun echo(message: Any?, trailingNewline: Boolean = true): Unit
+fun echo(message: Any?, trailingNewline: Boolean = true, err: Boolean = false): Unit
fun editFile(filename: String, editor: String? = null, env: Map<String, String> = emptyMap(), requireSave: Boolean = false, extension: String = ".txt"): Unit
fun editText(text: String, editor: String? = null, env: Map<String, String> = emptyMap(), requireSave: Boolean = false, extension: String = ".txt"): String?
val isWindows: Boolean
@@ -717,7 +720,8 @@ -Abort()
+Abort(error: Boolean = true)
+val error: Boolean
@@ -756,8 +760,10 @@ open fun getFormattedHelp(): String
open fun getFormattedUsage(): String
val invokeWithoutSubcommand: Boolean
+fun main(argv: List<String>): Unit
fun main(argv: Array<String>): Unit
-fun parse(argv: Array<String>, context: Context? = null): Unit
+fun parse(argv: List<String>, parentContext: Context? = null): Unit
+fun parse(argv: Array<String>, parentContext: Context? = null): Unit
fun registerArgument(argument: Argument): Unit
fun registerOption(option: Option): Unit
fun registeredSubcommandNames(): List<String>
@@ -1088,7 +1094,7 @@ fun confirm(text: String, default: Boolean = false, abort: Boolean = false, promptSuffix: String = ": ", showDefault: Boolean = true): Boolean?
-fun echo(message: Any?, trailingNewline: Boolean = true): Unit
+fun echo(message: Any?, trailingNewline: Boolean = true, err: Boolean = false): Unit
fun editFile(filename: String, editor: String? = null, env: Map<String, String> = emptyMap(), requireSave: Boolean = false, extension: String = ".txt"): Unit
fun editText(text: String, editor: String? = null, env: Map<String, String> = emptyMap(), requireSave: Boolean = false, extension: String = ".txt"): String?
val isWindows: Boolean
diff --git a/gradle.properties b/gradle.properties index 9678f10ea..13f58bfb0 100755 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ GROUP=com.github.ajalt -VERSION_NAME=1.0.0 +VERSION_NAME=1.1.0