another something that other people wrangling with scripting might appreciate:
https://github.com/NikkyAI/MinimalScriptingExample/blob/c28b8e09be0dbc56a1b8b3b36f3237a7f868dead/build.gradle.kts#L47-L69
this little snippet creates a fat jar with shadowjar (obviously)
loops through all script files and creates tasks to run the shadowJar with the script files as arguments
this should make testing faster and the differences between dev and production where you have different dpeendnecies available to the script minimal