gradle and weaken collection types

add gradle (and wrapper scripts) for building
remove resources that are not needed for library
weaken collection types in library