ported to gradle