Switch from an ArrayList to a more conventional Groovy List
Use the task's set environment instead of blindly passing in System.env