optimize gradle scripts