GEODE-3199: Make signing with a gpg key optional

Make it optional to sign the archives with a gpg key, to avoid annoying
users trying to build the examples. You must specify the property
-PsignArchives to sign with a gpg key.

(cherry picked from commit 76cce858773dd390c27de717a5d7c92a9d7aaf9b)
diff --git a/gradle/release.gradle b/gradle/release.gradle
index bd5aada..526ebeb 100644
--- a/gradle/release.gradle
+++ b/gradle/release.gradle
@@ -33,7 +33,7 @@
       ant.checksum file:"${archive.archivePath}", algorithm:"md5", format: 'MD5SUM'
       ant.checksum file:"${archive.archivePath}", algorithm:"sha-256", format: 'MD5SUM', fileext:".sha256"
       signing {
-        required { !version.endsWith("SNAPSHOT") }
+        required { project.hasProperty("signArchives") }
         sign archive.archivePath
       }
     }
@@ -41,7 +41,7 @@
 })
 
 gradle.taskGraph.whenReady { taskGraph ->
-  if (!version.endsWith('SNAPSHOT')) {
+  if (project.hasProperty('signArchives')) {
     if(!project.hasProperty('signing.keyId') || !project.hasProperty('signing.secretKeyRingFile')) {
       println "You must configure your signing.keyId and signing.secretKeyRingFile"
       println "in ~/.gradle/gradle.properties in order to sign jars\n"