Fix publishing; fix #1733

This commit is contained in:
Karlatemp
2021-12-13 13:07:29 +08:00
parent 5816d4951e
commit bca536b107
2 changed files with 15 additions and 3 deletions

View File

@@ -73,7 +73,8 @@ fun Project.configureRemoteRepos() {
inline fun Project.configurePublishing(
artifactId: String,
vcs: String = "https://github.com/mamoe/mirai",
addProjectComponents: Boolean = true
addProjectComponents: Boolean = true,
setupGpg: Boolean = true,
) {
configureRemoteRepos()
apply<ShadowPlugin>()
@@ -105,6 +106,8 @@ inline fun Project.configurePublishing(
stubJavadoc?.get()?.let { artifact(it) }
}
}
configGpgSign(this@configurePublishing)
if (setupGpg) {
configGpgSign(this@configurePublishing)
}
}
}

View File

@@ -33,7 +33,16 @@ dependencies {
}
}
configurePublishing("mirai-bom", addProjectComponents = false)
configurePublishing(
"mirai-bom",
addProjectComponents = false,
setupGpg = false,
)
publishing.publications.getByName<MavenPublication>("mavenJava") {
from(components["javaPlatform"])
}
publishing {
configGpgSign(project)
}