diff --git a/galasa-extensions-parent/build.gradle b/galasa-extensions-parent/build.gradle index cec24719..9635946a 100644 --- a/galasa-extensions-parent/build.gradle +++ b/galasa-extensions-parent/build.gradle @@ -2,17 +2,11 @@ plugins { id 'biz.aQute.bnd.builder' version '5.3.0' apply false id 'dev.galasa.githash' version '0.15.0' apply false id 'maven-publish' + id 'signing' } version = '0.36.0' -task clean { - // make sure the build directory is gone - doFirst { - delete layout.buildDirectory - } -} - //--------------------------------------------------------------- // We need to gather the release and packaging metadata from each // sub-project, to generate a release.yaml document which can act @@ -148,6 +142,18 @@ subprojects { task allDeps(type: DependencyReportTask) {} } +signing { + def signingKeyId = findProperty("signingKeyId") + def signingKey = findProperty("signingKey") + def signingPassword = findProperty("signingPassword") + useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) + sign publishing.publications +} + +tasks.withType(Sign) { + onlyIf { isMainOrRelease.toBoolean() } +} + // Publish the release.yaml as a maven artifact. // Note: The maven co-ordinates are versioned using the version for this bundle. publishing {