skip publication setup for mirai-console-gradle

This commit is contained in:
Karlatemp 2022-06-22 17:02:23 +08:00
parent f48940a897
commit 3c3657969f
No known key found for this signature in database
GPG Key ID: BA173CA2B9956C59
2 changed files with 4 additions and 1 deletions

View File

@ -75,9 +75,12 @@ inline fun Project.configurePublishing(
vcs: String = "https://github.com/mamoe/mirai",
addProjectComponents: Boolean = true,
setupGpg: Boolean = true,
skipPublicationSetup: Boolean = false,
) {
configureRemoteRepos()
if (skipPublicationSetup) return
val shadowJar = if (!addProjectComponents) null else tasks.register<ShadowJar>("shadowJar") {
archiveClassifier.set("all")
manifest.inheritFrom(tasks.getByName<Jar>("jar").manifest)

View File

@ -119,5 +119,5 @@ tasks {
}
if (System.getenv("MIRAI_IS_SNAPSHOTS_PUBLISHING")?.toBoolean() == true) {
configurePublishing("mirai-console-gradle")
configurePublishing("mirai-console-gradle", skipPublicationSetup = true)
}