Migration to gradle build system