How do you set the maven artifact ID of a gradle project?

后端 未结 7 609
甜味超标
甜味超标 2021-01-30 03:48

From the gradle maven-publish plugin\'s documentation, it\'s clear that you set the groupId and version of the project directly in build.gradle

7条回答
  •  逝去的感伤
    2021-01-30 04:10

    However, the artifactId appears to be taken from the name of the folder you are working within. Is there a way to set the artifactId explicitly?

    A simple answer to this is to set the jar.baseName which then overrides the directory name.

    // changes the name of the jar from the directory name
    jar.baseName = 'some_arifact_name';
    

    This seems to work for me.

提交回复
热议问题