automagically detect java_home in gradle