Converted to use Gradle build system

This should make it easier for people to compile this project.