2
2
3
3
[ ![ JetBrains incubator project] ( https://jb.gg/badges/incubator.svg )] ( https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub )
4
4
[ ![ 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 )
6
6
7
7
Pure Kotlin implementation of a generic command-line parser.
8
8
@@ -20,35 +20,37 @@ and also generate help and usage messages as well.
20
20
21
21
> Note that the library is experimental and the API is subject to change.
22
22
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.
24
24
25
25
### Gradle
26
26
27
- Add the bintray repository:
27
+ - Add the Maven Central repository if it is not already there :
28
28
29
- ``` groovy
29
+ ``` kotlin
30
30
repositories {
31
- maven { url "https://kotlin.bintray.com/kotlinx" }
31
+ mavenCentral()
32
32
}
33
33
```
34
34
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):
36
36
37
37
``` groovy
38
38
kotlin {
39
39
sourceSets {
40
40
commonMain {
41
41
dependencies {
42
- implementation("org.jetbrains.kotlinx:kotlinx-cli:0.3.1 ")
42
+ implementation("org.jetbrains.kotlinx:kotlinx-cli:0.3.2 ")
43
43
}
44
44
}
45
45
}
46
46
}
47
47
```
48
48
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
+
52
54
``` kotlin
53
55
kotlin {
54
56
linuxX64(" linux" ) {
@@ -57,29 +59,18 @@ kotlin {
57
59
}
58
60
```
59
61
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!
63
64
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
75
66
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 ` :
77
68
78
69
``` xml
79
70
<dependency >
80
71
<groupId >org.jetbrains.kotlinx</groupId >
81
72
<artifactId >kotlinx-cli-jvm</artifactId >
82
- <version >0.3.1 </version >
73
+ <version >0.3.2 </version >
83
74
</dependency >
84
75
```
85
76
## Command line entities
0 commit comments