Quantcast

Resolving project group and name to a project dependency

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Resolving project group and name to a project dependency

Clint Checketts
I'm using a relatively new Gradle Dependency Management Plugin (https://github.com/spring-gradle-plugins/dependency-management-plugin)

I'm trying to resolve a bug with it.

Is there are way I could pass in a subproject's name and lookup what the resolved project's group and name is?  For example if I have a subproject named ':model' what is the best way to find that it maps to 'com.example:model'?

Thanks,

Clint 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Resolving project group and name to a project dependency

KARR, DAVID

This is something that Maven does, but Gradle doesn’t provide a correspondence between projects and artifacts.  Although I somewhat miss that, NOT doing that makes it more practical for Gradle projects to produce multiple artifacts.

 

From: Clint Checketts [mailto:[hidden email]]
Sent: Thursday, August 07, 2014 10:19 AM
To: [hidden email]
Subject: [gradle-dev] Resolving project group and name to a project dependency

 

I'm using a relatively new Gradle Dependency Management Plugin (https://github.com/spring-gradle-plugins/dependency-management-plugin)

 

I'm trying to resolve a bug with it.

 

Is there are way I could pass in a subproject's name and lookup what the resolved project's group and name is?  For example if I have a subproject named ':model' what is the best way to find that it maps to 'com.example:model'?

 

Thanks,

 

Clint 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Resolving project group and name to a project dependency

Clint Checketts
Turns out my solution was essentially:

def allProjectIds = []
project.rootProject.allprojects { allProjectIds << ("$it.group:$it.name" as String) }

On Thu, Aug 7, 2014 at 11:30 AM, KARR, DAVID <[hidden email]> wrote:

This is something that Maven does, but Gradle doesn’t provide a correspondence between projects and artifacts.  Although I somewhat miss that, NOT doing that makes it more practical for Gradle projects to produce multiple artifacts.

 

From: Clint Checketts [mailto:[hidden email]]
Sent: Thursday, August 07, 2014 10:19 AM
To: [hidden email]
Subject: [gradle-dev] Resolving project group and name to a project dependency

 

I'm using a relatively new Gradle Dependency Management Plugin (https://github.com/spring-gradle-plugins/dependency-management-plugin)

 

I'm trying to resolve a bug with it.

 

Is there are way I could pass in a subproject's name and lookup what the resolved project's group and name is?  For example if I have a subproject named ':model' what is the best way to find that it maps to 'com.example:model'?

 

Thanks,

 

Clint 


Loading...