Gradle and Android : pom configuration with multiple Maven artifacts publication

前端 未结 2 1010
北海茫月
北海茫月 2021-02-08 12:48

Working on an Android library with Gradle (v 1.7) as the building tool, I\'ve used the maven plugin and configured the task uploadArchives to publish both release and debug vers

2条回答
  •  甜味超标
    2021-02-08 13:03

    You need(ed) to set the filter name for the groupId and artifactId the same as you have for version

    pom('debug').groupId = 'com.company'
    pom('release').groupId = 'com.company'
    pom('debug').artifactId = 'id'
    pom('release').artifactId = 'id'
    pom('debug').version = android.defaultConfig.versionName + "d"
    pom('release').version = android.defaultConfig.versionName
    

    Im surprised you get away with the version name suffix, as its not semver.

提交回复
热议问题