Added Gradle build for library.
Updated Gradle build tools due to IntelliJ not working with lesser versions.