ported to build.gradle and reworked structure.