some cleanup, extract method to load version prop,  load gradle api as dependency instead of gradleApi(), try out some jvm params.
fix groovy compilation warning