Please follow the instructions on the groovy github page: https://github.com/groovy/groovy-core#building