refactory gradle template