Android gradle maven口味中缺少POM
我正在为Android设计一个aar库,我面临一个问题。 自从我介绍了flavors之后,POM文件就不再上传了。 AAR文件仍然正确上载,但如果没有POM,则无法使用该库 以下是build.gradle文件的一部分:Android gradle maven口味中缺少POM,android,maven-2,android-gradle-plugin,pom.xml,Android,Maven 2,Android Gradle Plugin,Pom.xml,我正在为Android设计一个aar库,我面临一个问题。 自从我介绍了flavors之后,POM文件就不再上传了。 AAR文件仍然正确上载,但如果没有POM,则无法使用该库 以下是build.gradle文件的一部分: uploadArchives { repositories.mavenDeployer { snapshotRepository(url: nexus_mavenSnapshot) { authentication(userNam
uploadArchives {
repositories.mavenDeployer {
snapshotRepository(url: nexus_mavenSnapshot) {
authentication(userName: nexus_username
, password: nexus_password)
}
addFilter('legacyRelease') { artifact, file ->
artifact.attributes.classifier.equals("legacyRelease")
}
addFilter('nbRelease') { artifact, file ->
artifact.attributes.classifier.equals("nbRelease")
}
pom('nbRelease').artifactId = project.archivesBaseName + "-nb";
pom('legacyRelease').artifactId = project.archivesBaseName + "-legacy";
}
}
我发现唯一相关的文章是:
他们的答案是手动上传POM,我不想:)
有什么建议吗
编辑:
当我试图把POM拿回来时,我去掉了,但仍然没有POM。我需要删除的是,希望它能帮助某人:
publishNonDefault true
嘿,你能找到解决办法吗?