Update gradle build.

Tweak import to make gradle build OK.
Create build directory when not present.

Otherwise and task fail after a clean.
Remove unnecessary dependency.
Merge pull request #1479 from laurentg/updategradle

Update Gradle build, fix few issues.