saæ
saæ

Reputation: 183

Gradle: figure out a Maven dependency scope by using `Configuration` and its dependency set

So I'd like given a Groovy Configuration and its Dependencies figure out the Maven dependency scope, of which there are six.

For some dependencies it is trivial, as implementation translates to Mavens compile neatly.

What to do about things like errorpone? This configuration has its own dependencies, but what is their Maven scope? Is there a way to tell programmatically? I'd like to avoid having a huge Map<Configuration, String> of configuration -> its maven scope.

Thanks in advance.

Upvotes: 0

Views: 236

Answers (1)

Louis Jacomet
Louis Jacomet

Reputation: 14500

Gradle has a much richer model than the hardcoded scopes of Maven. Relationship to Maven scopes matters only when publishing a library to a Maven repository, using a pom.xml for the metadata.

I recommend reading documentation around configurations or watching the webinar on the topic of dependency management fundamentals (Note: I am co-presenter in this webinar)

Upvotes: 1

Related Questions