jdk8 support

i got to compile the project using a jkd8 and i got lots of problems. This is just a simple workaround in gradle