Skip to content

Commit 2d0b0e5

Browse files
authored
Merge pull request #208 from stokado/fix/KTOR-7932
* Fix ArrayIndexOutOfBounds exception * Update README to clarify tool usage --------- Co-authored-by: Osip Fatkullin <osip.fatkullin@gmail.com>
2 parents fc3b88b + 445d9f9 commit 2d0b0e5

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

version-diff/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,12 @@ A diff tool for maven artifacts written using the [Ktor](https://ktor.io) client
77
Execute this command in a sample directory:
88

99
```bash
10-
./gradlew run --args="1.6.8 2.2.2 <Optional repo url, default https://repo.maven.apache.org/maven2/io/ktor>"
10+
./gradlew run --args="1.6.8 2.2.2"
1111
```
12+
13+
* `1.6.8` and `2.2.2` are the versions of the Maven artifact to compare.
14+
* By default, the repository URL is https://repo.maven.apache.org/maven2/io/ktor.
15+
If you want to use a repository other than the default, provide it explicitly as the third argument:
16+
```bash
17+
./gradlew run --args="2.3.13 3.0.0 https://oss.sonatype.org/content/repositories/releases/io/ktor"
18+
```

version-diff/src/main/kotlin/Main.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fun main(args: Array<String>) = runBlocking {
1818
val firstVersion = args[0]
1919
val secondVersion = args[1]
2020

21-
val repo = if (args.size > 2) args[3] else DEFAULT_REPO
21+
val repo = if (args.size > 2) args[2] else DEFAULT_REPO
2222

2323
println("Fetching diff for $repo $firstVersion -> $secondVersion")
2424

0 commit comments

Comments
 (0)