chore: update project files

This commit is contained in:
2025-02-11 09:17:06 +08:00
parent 598dd1f71a
commit 9ab5be20e9

View File

@@ -43,9 +43,11 @@ publishing {
}
scm {
val (vcsHost, vcsUser, vcsRepo) = property("VCS_URL").toString()
.substringAfter("https://")
.split("/")
val (vcsHost, vcsUser, vcsRepo) =
property("VCS_URL")
.toString()
.substringAfter("https://")
.split("/")
url.set(property("VCS_URL").toString())
connection.set("scm:git:git://$vcsHost/$vcsUser/$vcsRepo.git")
developerConnection.set("scm:git:ssh://git@$vcsHost:$vcsUser/$vcsRepo.git")
@@ -71,13 +73,13 @@ publishing {
}
}
//signing {
// val signingKey = System.getenv("GPG_SIGNING_KEY")
// val signingPassword = System.getenv("GPG_SIGNING_PASSWORD")
// useInMemoryPgpKeys(signingKey.chunked(64).joinToString("\n"), signingPassword)
// sign(tasks["jar"])
// sign(publishing.publications["mavenJava"])
//}
// signing {
// val signingKey = System.getenv("GPG_SIGNING_KEY")
// val signingPassword = System.getenv("GPG_SIGNING_PASSWORD")
// useInMemoryPgpKeys(signingKey.chunked(64).joinToString("\n"), signingPassword)
// sign(tasks["jar"])
// sign(publishing.publications["mavenJava"])
// }
gradlePlugin {
plugins {
@@ -97,16 +99,16 @@ gradlePlugin {
vcsUrl.set(property("VCS_URL").toString())
}
tasks.create("setupPluginUploadFromEnvironment") {
doLast {
val key = System.getenv("GRADLE_PUBLISH_KEY")
val secret = System.getenv("GRADLE_PUBLISH_SECRET")
if (key == null || secret == null) {
throw GradleException("gradlePublishKey and/or gradlePublishSecret are not defined environment variables")
}
System.setProperty("gradle.publish.key", key)
System.setProperty("gradle.publish.secret", secret)
}
}
// tasks.create("setupPluginUploadFromEnvironment") {
// doLast {
// val key = System.getenv("GRADLE_PUBLISH_KEY")
// val secret = System.getenv("GRADLE_PUBLISH_SECRET")
//
// if (key == null || secret == null) {
// throw GradleException("gradlePublishKey and/or gradlePublishSecret are not defined environment variables")
// }
//
// System.setProperty("gradle.publish.key", key)
// System.setProperty("gradle.publish.secret", secret)
// }
// }