fixing gradle build error on oraclejdk7