refactored to use gradle-template