How to rename organization and module in generated ivy.xml file?


(Baiyan Huang) #1

Hi, All,

I am using ivy-publish plugin, and trying to change the organization and module bit when generate ivy.xml file:

descriptor.withXml {
    asNode().info[0].attributes().put('organisation', division_package)
    asNode().info[0].attributes().put('module', subproject_path)
 }

But somehow it emits an error: > Invalid publication ‘ivyCustom’: supplied organisation does not match ivy descriptor (cannot edit organisation directly in the ivy descriptor file).

So seems it is not allowed to change it?

I know we could achieve this by setting group and name for the project, but set the project name is not that convenient that needs to be done in settings.gradle, so I am searching for some way else.

Could you please shed some lights on this?

Thanks.


#2

Check out the user guide chapter for ivy-publish: it explains how to set organisation and module directly on the ivyPublication object.


(Baiyan Huang) #3

Ah, thanks - I was using 1.6, with 1.7 this works cool!