aepfli / gradle-gitlab-repositories

Handling Maven GitLab dependencies made easy. Define multiple tokens and selectively apply them to repositories, remove the need for repeating Credential handling blocks for different environments.
Eclipse Public License 2.0
13 stars 1 forks source link

evaluate Handling of repositories #7

Closed aepfli closed 3 years ago

aepfli commented 3 years ago

currently we are limited, and need to know, which is the enclosing object to add the repositories to the object. The API looks like

repositories {
    gitLab.group("id")
}

this is limiting, as we need to know when we initalize the plugin to pass on the extensionAware object, so we can add this.

  1. We could investigate, if we could just return a MavenArtifactRepository, and if it will be picked up. This way it would stay the nice and easy way. But that also means, we loose some ootb functionality.

  2. We could change the api to something like

repositories {
    maven gitLab.group("id")
}

where we just return an action. This would allow us to still be able to rely on the OOTB functionality, and make it easier to apply

  1. We could try to return a DSL object from our method which looks like 2. but with the actual action added. This would allow to keep the current way of adding and makes the whole API really nice and smooth