Revert "Fix for older groovy version"

This reverts commit 5213f9ad0b3b1e95f29afaad65f4d4ad6f7a12d8.