Skip to content

Commit

Permalink
Release version 2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ajalt committed Feb 23, 2020
1 parent 623fdf0 commit 0ca2713
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 41 deletions.
17 changes: 7 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
}
}
Expand Down Expand Up @@ -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

<details>
<summary>Snapshot builds are also available</summary>

Expand All @@ -96,9 +104,6 @@ repositories {
}
}
```

For Kotlin/Native and Kotlin/JS, use `"com.github.ajalt:clikt-multiplatform:$cliktVersion"` instead.

</details>

## License
Expand Down
28 changes: 5 additions & 23 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
title: 'Clikt: Simple, powerful command line parser for Kotlin'
title: 'Clikt: Multiplatform command line parser for Kotlin'
---

<div align="center" style="margin-bottom:42px;max-width:700px">
<img alt="wordmark" src="img/wordmark.svg" />
</div>

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
Expand All @@ -21,16 +20,15 @@ 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() {
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!")
}
}
Expand Down Expand Up @@ -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.
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0ca2713

Please sign in to comment.