This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git


The following commit(s) were added to refs/heads/master by this push:
     new ef1db8e  Add optiont to skip signing: -PskipSigning
ef1db8e is described below

commit ef1db8e8b4c5e26b164f5dd7a75012cb18c2224f
Author: Vladimir Sitnikov <[email protected]>
AuthorDate: Mon Nov 18 01:45:17 2019 +0300

    Add optiont to skip signing: -PskipSigning
    
    It helps for release validation purposes when developers want
    to verify if release builds and produces the same artifacts.
---
 build.gradle.kts         | 15 +++++++++++++--
 release/build.gradle.kts |  2 +-
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index f13b0b0..44a157c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -63,6 +63,7 @@ val enableSpotBugs = props.bool("spotbugs", default = false)
 val skipCheckstyle by props()
 val skipSpotless by props()
 val skipJavadoc by props()
+val skipSigning by props(props.bool("skipSign"))
 val enableMavenLocal by props()
 val enableGradleMetadata by props()
 
@@ -251,6 +252,17 @@ allprojects {
         }
     }
 
+    if (!isReleaseVersion || skipSigning) {
+        plugins.withType<SigningPlugin> {
+            afterEvaluate {
+                configure<SigningExtension> {
+                    // It would still try to sign the artifacts,
+                    // but it would refrain from failing the build
+                    isRequired = false
+                }
+            }
+        }
+    }
     plugins.withType<JavaPlugin> {
         configure<JavaPluginConvention> {
             sourceCompatibility = JavaVersion.VERSION_1_8
@@ -275,7 +287,7 @@ allprojects {
             }
         }
 
-        if (isReleaseVersion) {
+        if (isReleaseVersion && !skipSigning) {
             configure<SigningExtension> {
                 // Sign all the publications
                 sign(publishing.publications)
@@ -285,7 +297,6 @@ allprojects {
         if (!skipSpotless) {
             spotless {
                 java {
-//                    targetExclude(*javaccGeneratedPatterns + 
"**/test/java/*.java")
                     licenseHeaderFile(licenseHeaderFile)
                     importOrder(
                         "org.apache.calcite.",
diff --git a/release/build.gradle.kts b/release/build.gradle.kts
index 5234413..99f4616 100644
--- a/release/build.gradle.kts
+++ b/release/build.gradle.kts
@@ -81,7 +81,7 @@ https://people.apache.org/keys/committer/$committerId.asc
 https://www.apache.org/dist/$tlpUrl/KEYS
 
 N.B.
-To create the jars and test $componentName: "./gradlew build".
+To create the jars and test $componentName: "./gradlew build -Prelease 
-PskipSigning".
 
 If you do not have a Java environment available, you can run the tests
 using docker. To do so, install docker and docker-compose, then run

Reply via email to