Is there an easy way to share a set of different gradle tasks between different projects in different git repositories?
Right now I have 3 different projects (that I don’t want to convert into a multi-module-project) that uses the same set of custom tasks, e.g. each project have:
Each time there is an update to one of the above files I copy that around to the other projects/repos.
Is there an easy way to avoid this without writing a custom gradle plugin or converting to a multi-module project?
A few thing I have considered:
Move the shared tasks to a new repository and do some git sub module magic to pull in the shared tasks each time a git pull is run on each of the separate projects.
Similar to above but instead upload/download them from an internal artifact management server.
Yeah this will probably not work with files hosted in git repos in gitlab:
$ curl https://internal/git/project/shared-repo/-/raw/master/tasks/mytasks.gradle
<html><body>You are being <a href="https://internal/git/users/sign_in">redirected</a>.</body></html>
I will probably have to setup a separate web server that can host those files “raw” which is not the way to go.