gradle and weaken collection types