Ben Navetta
Ben Navetta

Reputation: 477

Gradle Plugin resolve artifact

Is it possible for a Gradle plugin to resolve an artifact on its own? I know that in Maven, plugins can inject the Aether RepositorySystem and use that to download artifacts (That's how the Appengine Maven Plugin downloads the Appengine SDK). Is there similar functionality in Gradle?

Upvotes: 1

Views: 894

Answers (1)

erdi
erdi

Reputation: 6954

I don't know what exactly you are trying to achieve but there are two things you could do when it comes to adding artifacts to a project with a plugin:

  • simply add the dependency you wish to be resolved to one of project's configurations using the plugin and let Gradle resolve it for you
  • add a custom configuration and do whatever you need to do with the resolved artifact, just like gradle gae plugin does for downloading gae sdk here and here

Upvotes: 1

Related Questions