无效出版物' maven':具有相同扩展程序和分类器的多个文物(jar
未能将出版物“ maven”发布到存储库“ githubpackages” 无效的出版物“ maven”:具有相同扩展程序和分类器的多个工件(“ jar','source')。
在运行GitHub操作以在GitHub软件包上发布我的Android库时出现此错误,
这是我的代码。
这是build.gradle(库)
android{
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}
afterEvaluate {
publishing {
publications {
maven(MavenPublication) {
groupId mGroupId
artifactId mArtifactId
version mVersionName
from components.release
artifact androidSourcesJar
pom {
name = mLibraryName
description = mLibraryDescription
}
}
}
// Update repository details and credentials.
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/codebrust/andoid.library")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
}
在GitHub包装上发布Android库时存在错误
Failed to publish publication 'maven' to repository 'GitHubPackages'
Invalid publication 'maven': multiple artifacts with the identical extension and classifier ('jar', 'sources').
This error appeared when running GitHub Actions to publish my android library on GitHub Packages
Here is my code.
this is build.gradle(library)
android{
publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}
}
afterEvaluate {
publishing {
publications {
maven(MavenPublication) {
groupId mGroupId
artifactId mArtifactId
version mVersionName
from components.release
artifact androidSourcesJar
pom {
name = mLibraryName
description = mLibraryDescription
}
}
}
// Update repository details and credentials.
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/codebrust/andoid.library")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
}
There is an error when publishing android library on GitHub-Packages
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论