From b213aaa4341f956bab44f06e4b3c4357a57ea9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Berg=20Glasius?= Date: Sat, 30 Dec 2023 16:36:34 +0100 Subject: [PATCH] New group id (io.github.gpc) --- build.gradle | 34 ++++++++++++++++++++++++++-------- gradle.properties | 5 ++--- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index b51bfc90..cea4657f 100644 --- a/build.gradle +++ b/build.gradle @@ -14,9 +14,7 @@ plugins { id 'org.asciidoctor.jvm.convert' version '3.2.0' } -version project.projectVersion - -group 'org.grails.plugins' +group 'io.github.gpc' apply plugin: 'org.grails.grails-plugin' apply plugin: 'org.grails.grails-gsp' @@ -111,15 +109,35 @@ publishing { ext.isReleaseVersion = !version.endsWith("SNAPSHOT") -import io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository -tasks.withType(InitializeNexusStagingRepository).configureEach { - onlyIf { isReleaseVersion } - shouldRunAfter(tasks.withType(Sign)) +afterEvaluate { + signing { + if (System.getenv('SIGN_ARMORED_KEY')) { + String signingKey = System.getenv('SIGN_ARMORED_KEY') + String signingPassword = System.getenv('SIGN_PASSWORD') + useInMemoryPgpKeys(signingKey, signingPassword) + } else { + ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') + ext["signing.password"] = System.getenv('SIGNING_PASSPHRASE') + ext["signing.secretKeyRingFile"] = System.getenv('SECRING_FILE') + } + required { + isReleaseVersion + } + + sign publishing.publications.maven + } } -tasks.withType(Sign) { +tasks.withType(Sign).configureEach { + onlyIf { isReleaseVersion } +} + +import io.github.gradlenexus.publishplugin.InitializeNexusStagingRepository + +tasks.withType(InitializeNexusStagingRepository).configureEach { onlyIf { isReleaseVersion } + shouldRunAfter(tasks.withType(Sign)) } nexusPublishing { diff --git a/gradle.properties b/gradle.properties index aa73d233..8880ff89 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,15 +1,14 @@ version=3.0.0.BUILD-SNAPSHOT -#projectVersion=2.2.7https://github.com/grails-fields-plugin/grails-fields/blob/master/gradle.properties grailsVersion=4.1.2 scaffoldingVersion=2.0.0.RC1 cglibNodepVersion=3.2.9 joddWotVersion=3.3.8 servletApiVersion=4.0.1 asciidoc=true -githubSlug=grails-fields-plugin/grails-fields +githubSlug=gpc/fields githubBranch=master title=Grails Fields Plugin projectDesc=Customizable form-field rendering based on overrideable GSP template guide=../../guide -projectUrl=https://github.com/fields/grails-fields +projectUrl=https://github.com/gpc/fields developers=Robert Fletcher, Graeme Rocher, Søren Berg Glasius