I have a gradle build setup at the beginning of which I want to execute a shellscript in a subdirectory that prepares my environment.
task build << {
for kotlin gradle you can use
Runtime.getRuntime().exec("./my_script.sh")