Hello! I’m currently preparing a presentation for ...
# scripting
a
Hello! I’m currently preparing a presentation for a conference about Kotlin Script and I want to give more examples of its use in real life. Can you tell me if you use a Kotlin script in your production? For what cases?
👍 2
p
🔥 2
👆 1
v
Kotlin DSL build scripts
👍 1
👍🏾 1
p
I don't use kotlin scripts yet but am planning to. I place most of the heavy logic in gradle plugins so not much logic in the script but I would say the fact that you can replace bash or python logic code with kotlin, is just great.
👍 2
m
Yes my company has a custom Kotlin Scripting engine that we use for everything scripting-related. It's a bash-free zone.
🦜 2
😯 1
🔥 1
We published the docs and an old version here: https://hshell.hydraulic.dev/14.0/ (it's not open source)
Mostly to gauge interest (there is none, unfortunately .... better shell scripting is not a problem people seem to have, even if I happen to enjoy using hshell).
I'd guess we have on the order of 25 such scripts. They are used to drive our end-to-end integration tests, website builds, deployments, to automate tasks like creating blog posts or new modules in our source tree, regenerate source files etc...
p
@mikehearn I can share some feedback since I prefer Kotlin scripting over Bash/Python whenever I can. For stuff like
touch("foo")
that is easily done with the Java API, I just resort to
File(...).doStuff()
. If I need to call an external command (and I do rarely), there's https://github.com/lordcodes/turtle. I appreciate that hshell is like a coherent "batteries included" environment to write scripts, but the fact that it's closed-source and that I don't know who's behind it makes me a bit reluctant to use it and commit to maintaining scripts using it long term
m
At the moment it's not being promoted for external use anyway, but that's why it's not public. Given a choice between bash or a better scripting environment that costs a bit of money (maybe 10 bucks or so), people will stick with what's free. So there's not much incentive to do the work to productize and support it.
😁 1
Phrased another way: it's not a problem people have.
a
Thank you all for your answers!