add a function for switching to the correct java and grails version when working on api