https://gradle.com/ logo
#community-support
Title
# community-support
j

jmfayard

08/05/2022, 5:21 AM
My feedback on scripting: Bash Scripts vs Gradle Custom Task vs Kotlin Scripts I used to buy in the idea that you shouldn't have crappy shell scripts in your repository (unless less than 3 lines) everything should be inside the Gradle build Well I changed my mind. Not on Bash programming, it's awful But as soon as you want to do something interactive, or would have to define your custom tasks or execute commands or use dependency injection, Gradle programming can become quite complex And for a good reason: Gradle needs to be performant and reliable and use caching and be lazy and what not in arbitrary complex projects But all of that is not needed for a simple scripts that is only meant for your own project So I have found it much simpler to use a Kotlin script instead And if you still want to have everything in Gradle, you add a Gradle task
scriptGoto
which only task is to run the scripts
scripts/goto.main.kts
153 Views