Source shell script and make environment variables accessible to Gradle task
I have a particular Gradle task I need to run inside a shell environment (with access to the configured environment variables), so using the commandLine and executable API directly is not appropriate. I need to source a shell script and run the task without forking a new process. Originally, I put the script inside the gradlew script, but then I figured out a way to have the build.gradle.kts script call itself through gradlew:
val setupRosEnv by tasks.creating(Exec::class) {
executable =...