Refactoring gradle.build