Hi. Maven supports the concept of a ‘parent pom’, where the parent is just a pom project that defines common configuration (like company wide repositories), dependencies and properties. Then, within the company, projects can point to it (when it is in the company repo) and reuse that information. In my current company it is actually the standard way of doing things; there is a maven-library-parent and maven-webapp-parent and so on.
In gradle, my idea would be to create a common script, deploy it somewhere so that it is accessible via http get requests, and then, in scripts, use: apply from: ‘http://ourserver/library-parent’
or similar. The problems I see: 1. the url is hardcoded, whereas in maven I would just define the groupId, the artifactId and version - the infrastructure can deal with grabbing the correct repo (like defining it in the settings.xml file once), but I guess this can be dealt with with some gradle settings file as well? 2. I don’t know whether apply from can deal with http urls, but judging by the docs, it can
Is there any canonical way of doing it in gradle? Does anybody see something wrong with this approach, like maybe that I don’t need to do it because there is something great in gradle that makes it unnecessary?