y9-build-logic/risenet-gradle-version-catalog/build.gradle.kts.txt

77 lines
2.7 KiB
Plaintext
Raw Normal View History

2024-11-30 13:12:57 +08:00
plugins {
signing
`version-catalog`
`maven-publish`
id("tech.yanand.maven-central-publish")
}
group = "net.risesoft.y9"
version = "0.0.1"
signing {
//useGpgCmd()
val signingInMemoryKey: String? by project
val signingInMemoryKeyId: String? by project
val signingInMemoryKeyPassword: String? by project
useInMemoryPgpKeys(signingInMemoryKeyId, signingInMemoryKey, signingInMemoryKeyPassword)
sign(publishing.publications)
}
publishing {
publications {
create<MavenPublication>("mavenVersionCatalog") {
from(components["versionCatalog"])
artifactId = project.name
pom {
// 设置打包类型为pom
packaging = "pom"
name = project.name
description = "RiseSoft/Digital Infrastructure " + project.name
url = findProperty("PROJECT_GIT_URL").toString()
licenses {
license {
name = "GNU General Public License (GPL) version 3.0"
url = "https://www.gnu.org/licenses/gpl-3.0.en.html"
}
}
developers {
developer {
name = "dingzhaojun"
email = "dingzhaojun@risesoft.net"
}
developer {
name = "qinman"
email = "qinman@risesoft.net"
}
developer {
name = "mengjuhua"
email = "mengjuhua@risesoft.net"
}
developer {
name = "shidaobang"
email = "shidaobang@risesoft.net"
}
}
scm {
connection = findProperty("PROJECT_SCM_URL").toString()
developerConnection = findProperty("PROJECT_SCM_URL").toString()
url = findProperty("PROJECT_GIT_URL").toString()
}
}
}
}
}
mavenCentral {
// 从 Sonatype 官方获取的 Publisher API 调用的 token应为 Base64 编码后的 username:password
authToken = findProperty("mavenCentralAuthToken").toString()
// 上传是否应该自动发布。如果您希望手动执行此操作,请使用 'USER_MANAGED'。
// 该属性是可选的,默认为 'AUTOMATIC'。
publishingType = "AUTOMATIC"
// 当发布类型为 'AUTOMATIC' 时状态API获取 'PUBLISHING' 或 'PUBLISHED' 状态的最大等待时间
// 或者当发布类型为 'USER_MANAGED' 时,获取 'VALIDATED' 状态。
// 该属性是可选的默认为60秒。
maxWait = 60
}