Question

We just moved from Ant+Ivy builds to Gradle.My project structure is

Project A  which has two sub modules : module1 and module2

Both module1 and module2 have their own build.gradle files.The problem is when I publish an artifact from module1,I want the artifact pattern to be like :

projectA-module1.jar instead of just module1.jar

It was pretty simple to do in Ivy using:

<info organisation="abc" module="projectA-module1">

Is there any way I can change the module name in gradle?

PS: I researched and found out we have group instead of organisation in gradle but not for module name.I am publishing to Artifactory

Thanks.

Was it helpful?

Solution

As I understand, you just want to change the name of the project. It's easy to do in the 'settings.gradle' file. Just set the name of the project to projectA-module1:

rootProject.name = 'projectA-module1'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top