Making gradle use spring and hibernate properly