improve the check for gradle versions before 1.8