refactoring extract gradle scriptlet