Gradlification of the library

It closes #6 , #7 and #8 issues.