Run with: ./gradlew run --args='scripts/foo.custom.kts' Reproduce the bug by uncommenting the lines in scripts/foo.custom.kts.