Convert to gradle build system