refactor code and put commong dependencies in parent build.gradle file