Skip to content

Commit 62b5366

Browse files
committed
Update usage instructions in README
Update the library version in readme to 0.3.2, add Maven Central badge, remove bintray mentions
1 parent 63649a0 commit 62b5366

File tree

1 file changed

+17
-26
lines changed

1 file changed

+17
-26
lines changed

README.md

+17-26
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![JetBrains incubator project](https://jb.gg/badges/incubator.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
44
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0)
5-
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.cli/images/download.svg)](https://bintray.com/kotlin/kotlinx/kotlinx.cli/_latestVersion)
5+
[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-cli.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-cli)
66

77
Pure Kotlin implementation of a generic command-line parser.
88

@@ -20,35 +20,37 @@ and also generate help and usage messages as well.
2020

2121
> Note that the library is experimental and the API is subject to change.
2222
23-
The library is published to [kotlinx](https://bintray.com/kotlin/kotlinx/kotlinx.cli) bintray repository.
23+
The library is published to Maven Central repository.
2424

2525
### Gradle
2626

27-
Add the bintray repository:
27+
- Add the Maven Central repository if it is not already there:
2828

29-
```groovy
29+
```kotlin
3030
repositories {
31-
maven { url "https://kotlin.bintray.com/kotlinx" }
31+
mavenCentral()
3232
}
3333
```
3434

35-
In Kotlin projects add the following dependency to the needed source set (it may be common or platform specific source set):
35+
In Kotlin multiplatform projects, add the following dependency to a source set (it may be a common or platform specific source set):
3636

3737
```groovy
3838
kotlin {
3939
sourceSets {
4040
commonMain {
4141
dependencies {
42-
implementation("org.jetbrains.kotlinx:kotlinx-cli:0.3.1")
42+
implementation("org.jetbrains.kotlinx:kotlinx-cli:0.3.2")
4343
}
4444
}
4545
}
4646
}
4747
```
4848

49-
`kotlinx-cli` is also included in Kotlin/Native distribution as endorsed library so it's possible to use `kotlinx.cli`
50-
in projects on Kotlin/Native without setting dependency to it.
51-
If `Gradle` is used to build project turning on endorsed libraries in Kotlin/Native is possible with
49+
`kotlinx-cli` is also included in Kotlin/Native distribution as an endorsed library, so it's possible to use `kotlinx.cli`
50+
in Kotlin/Native projects without an explicit dependency on it.
51+
52+
If Gradle is used to build a project, turning on endorsed libraries in Kotlin/Native is possible with
53+
5254
```kotlin
5355
kotlin {
5456
linuxX64("linux") {
@@ -57,29 +59,18 @@ kotlin {
5759
}
5860
```
5961

60-
### !!! Important information
61-
If `kotlinx-cli` is added to gradle project as dependency endorsed libraries in Kotlin/Native must be turned off!
62-
### Maven
62+
> ### ❗ Important
63+
> If `kotlinx-cli` is added to a gradle project as an explicit dependency, endorsed libraries in Kotlin/Native must be turned off!
6364
64-
Add the bintray repository:
65-
66-
```xml
67-
<repositories>
68-
<repository>
69-
<id>kotlinx</id>
70-
<name>kotlinx</name>
71-
<url>https://kotlin.bintray.com/kotlinx/</url>
72-
</repository>
73-
</repositories>
74-
```
65+
### Maven
7566

76-
In Kotlin projects add the following dependency to the dependencies:
67+
In Kotlin projects, add the following dependency to the `dependencies` element of `pom.xml`:
7768

7869
```xml
7970
<dependency>
8071
<groupId>org.jetbrains.kotlinx</groupId>
8172
<artifactId>kotlinx-cli-jvm</artifactId>
82-
<version>0.3.1</version>
73+
<version>0.3.2</version>
8374
</dependency>
8475
```
8576
## Command line entities

0 commit comments

Comments
 (0)