Gradle build

@brendankenny PTAL

Fixes #1