Ported to gradle build system.