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