diff --git a/CHANGELOG.md b/CHANGELOG.md index 343768c9c..df7f98380 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,26 +1,23 @@ # Changelog ## [Unreleased] -### Added -- `eagerOption {}` function to more easily register eager options. -- Eager options can now be added to option groups in help out by passing a value for `groupName` when creating them. - -### Fixed -- `file()` and `path()` conversions will now properly expand leading `~` in paths to the home directory for `mustExist`, `canBeFile`, and `canBeDir` checks. The property value is unchanged, and can still begin with a `~`. ([#131](https://github.com/ajalt/clikt/issues/79)) +## [2.5.0] - 2020-02-22 -### Changed -- `NoRunCliktCommand` was renamed to `NoOpCliktCommand`. The existing class is deprecated. ([#130](https://github.com/ajalt/clikt/issues/130)) - -## [2.5.0-beta1] - 2020-02-13 ### Added - Clikt is now available as a Kotlin Multiplatform Project, supporting JVM, NodeJS, and native Windows, Linux, and macOS. +- `eagerOption {}` function to more easily register eager options. +- Eager options can now be added to option groups in help out by passing a value for `groupName` when creating them. - `canBeSymlink` parameter to `file()` and `path()` conversions that can be used to disallow symlinks - `CliktCommand.eagerOption` to simplify creating custom eager options ### Changed +- `NoRunCliktCommand` was renamed to `NoOpCliktCommand`. The existing class is deprecated. ([#130](https://github.com/ajalt/clikt/issues/130)) - The `CliktCommand.context` property has been deprecated in favor of the new name, `currentContext`, to avoid confusion with the `CliktCommand.context{}` method. - The parameter names of `file()` and `path()` conversions have changed. The existing names are deprecated, and can be converted to the new usages with an IntelliJ inspection. Note that if you are calling these functions with unnamed arguments (e.g. `file(true, false)`), you'll need to add argument names in order to remove the deprecation warning. +### Fixed +- `file()` and `path()` conversions will now properly expand leading `~` in paths to the home directory for `mustExist`, `canBeFile`, and `canBeDir` checks. The property value is unchanged, and can still begin with a `~`. ([#131](https://github.com/ajalt/clikt/issues/79)) + ## [2.4.0] - 2020-01-25 ### Added - `CompletionCandidates.Fixed` now has a secondary convenience constructor that take a `vararg` of `String`s diff --git a/README.md b/README.md index 42137a048..fef73c7ce 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,11 @@ Clikt has: ```kotlin class Hello : CliktCommand() { - val count: Int by option(help = "Number of greetings").int().default(1) - val name: String by option(help = "The person to greet").prompt("Your name") + val count: Int by option(help="Number of greetings").int().default(1) + val name: String by option(help="The person to greet").prompt("Your name") override fun run() { - for (i in 1..count) { + repeat(count) { echo("Hello $name!") } } @@ -78,10 +78,18 @@ Clikt is distributed through [Maven Central](https://search.maven.org/artifact/c ```groovy dependencies { - implementation("com.github.ajalt:clikt:2.4.0") + implementation("com.github.ajalt:clikt:2.5.0") } ``` +#### Multiplatform + +For multiplatform projects, use `"com.github.ajalt:clikt-multiplatform:$cliktVersion"` instead. + +Clikt supports the following targets: `jvm`, `mingwX64`, `linuxX64`, `macosX64`, and `js` (for NodeJS). + +#### Snapshots +
Snapshot builds are also available @@ -96,9 +104,6 @@ repositories { } } ``` - -For Kotlin/Native and Kotlin/JS, use `"com.github.ajalt:clikt-multiplatform:$cliktVersion"` instead. -
## License diff --git a/docs/index.md b/docs/index.md index f05412b13..09d0ba995 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,14 +1,13 @@ --- -title: 'Clikt: Simple, powerful command line parser for Kotlin' +title: 'Clikt: Multiplatform command line parser for Kotlin' ---
wordmark
-Clikt *(pronounced "clicked")* is a Kotlin library that makes writing -command line interfaces simple and intuitive. It is the "Command Line -Interface for Kotlin". +Clikt *(pronounced "clicked")* is a multiplatform Kotlin library that makes writing command line +interfaces simple and intuitive. It's the "Command Line Interface for Kotlin". It is designed to make the process of writing command line tools effortless while supporting a wide variety of use cases and allowing advanced @@ -21,8 +20,7 @@ Clikt has: * support for a wide variety of command line interface styles * multiplatform packages for JVM, NodeJS, and native Linux, Windows and MacOS - What does it look like? Here's a complete example of a simple Clikt - program: + What does it look like? Here's a complete example of a simple Clikt program: ```kotlin class Hello : CliktCommand() { @@ -30,7 +28,7 @@ class Hello : CliktCommand() { val name: String by option(help="The person to greet").prompt("Your name") override fun run() { - for (i in 1..count) { + repeat(count) { echo("Hello $name!") } } @@ -77,19 +75,3 @@ Error: no such option: "--whoops". * [Arguments](api/clikt/com.github.ajalt.clikt.parameters.arguments/index.md) * [Parameter Type Conversions](api/clikt/com.github.ajalt.clikt.parameters.types/index.md) * [Output Formatting](api/clikt/com.github.ajalt.clikt.output/index.md) - -# License - - Copyright 2018-2019 AJ Alt - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/gradle.properties b/gradle.properties index 3b7c32c95..5d22d5ccb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,7 @@ -VERSION_NAME=2.5.0-beta1 +VERSION_NAME=2.5.0 kotlin.native.ignoreDisabledTargets=true +# https://github.com/gradle/gradle/issues/11308 +systemProp.org.gradle.internal.publish.checksums.insecure=true