https://kotlinlang.org logo
#ktlint
Title
# ktlint
v

Vampire

12/01/2023, 9:13 PM
How is one supposed to get it? I tried the "Download manually from github", but there is a
bat
file that expects a
jar
to be present, but nowhere a
jar
to download. confused
p

Paul Dingemans

12/02/2023, 11:00 AM
v

Vampire

12/02/2023, 12:34 PM
And then? As I said, there is a bat script that expects a jar, but no jar.
p

Paul Dingemans

12/02/2023, 1:20 PM
Ah, now I understand what you mean. I think we have never uploaded the jar separately since the
ktlint.bat
was added. You can download it directly from maven: https://mvnrepository.com/artifact/com.pinterest.ktlint/ktlint-cli/1.0.1
I have now added the jar also to the release page of ktlint. You might need to rename it.
I will fix this in next release: https://github.com/pinterest/ktlint/issues/2402
v

Vampire

12/02/2023, 2:10 PM
Thanks, that jar is not helpful though, as it misses the dependencies like Kotlin. You either need to build a bad-practice fat jar for example using the
shadow
plugin, a good-practice far jar like Spring Boot projects do, or build a proper distribution for example using the
application
plugin.
p

Paul Dingemans

12/02/2023, 2:13 PM
the
ktlint
file is basically a fat jar. Can you try to use that instead? https://pinterest.github.io/ktlint/latest/install/cli/#microsoft-windows-users
v

Vampire

12/02/2023, 2:15 PM
Sure, I'm In Git Bash mainly anyway
Yeah, that works, thanks, I'll try with that later, don't have time right now
p

Paul Dingemans

12/02/2023, 2:16 PM
Sure, np
Lol, the
ktlint
is indeed a fat jar. On MacOS, I can just run
java -jar ~/bin/ktlint-1.0.1
. Can you please verify whether that works on Windows as well so that I can fix
ktlint.bat
?
Btw, thanks for all the issues on the plugin. Most of them are already implemented/fixed. I will release a new (beta) version today
v

Vampire

12/03/2023, 8:31 PM
Lol, the
ktlint
is indeed a fat jar. On MacOS, I can just run
java -jar ~/bin/ktlint-1.0.1
. Can you please verify whether that works on Windows as well so that I can fix
ktlint.bat
?
Yes, it indeed also works to use that polyglot file like that.
Btw, thanks for all the issues on the plugin.
You're welcome. I owed you some more constructive feedback. 😄
Most of them are already implemented/fixed. I will release a new (beta) version today
Nice, thanks will try it. Btw. the date of the release seems a bit off. GitHub thinks it was released 2023-11-08
And I also cannot install it it seems 😕
It says it did so, but after the restart still beta 4 is installed
Even uninstalling beta 4, restarting, and then installing beta 5 says beta 4 is installed. o_O Maybe some wrong artifact got uploaded?
Ah, the beta 5 zip contains both