Common functionality for gradle builds