kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject git commit: kafka-1622; project shouldn't require signing to build; patched by Ivan Lyutov; reviewed by Jun Rao
Date Sat, 20 Sep 2014 22:48:04 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 8eac7d789 -> 6d7057566


kafka-1622; project shouldn't require signing to build; patched by Ivan Lyutov; reviewed by
Jun Rao


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/6d705756
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/6d705756
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/6d705756

Branch: refs/heads/trunk
Commit: 6d7057566f0c3a872f625957aa086b993e76071f
Parents: 8eac7d7
Author: Ivan Lyutov <ivanlyutov@gmail.com>
Authored: Sat Sep 20 15:43:51 2014 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Sat Sep 20 15:47:49 2014 -0700

----------------------------------------------------------------------
 build.gradle | 52 ++++++++++++++++++++++++++++++----------------------
 1 file changed, 30 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/6d705756/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 74c8c8a..f6e4f8b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -29,6 +29,10 @@ allprojects {
   }
 }
 
+def isVerificationRequired(project) {
+    project.gradle.startParameter.taskNames.contains("uploadArchives")
+}
+
 apply from: file('gradle/license.gradle')
 apply from: file('scala.gradle')
 
@@ -38,33 +42,37 @@ subprojects {
   apply plugin: 'maven'
   apply plugin: 'signing'
 
+  licenseTest.onlyIf { isVerificationRequired(project) }
+
   uploadArchives {
     repositories {
       signing {
-        sign configurations.archives
-
-        // To test locally, replace mavenUrl in ~/.gradle/gradle.properties to file://localhost/tmp/myRepo/
-        mavenDeployer {
-          beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment)
}
-          repository(url: "${mavenUrl}") {
-            authentication(userName: "${mavenUsername}", password: "${mavenPassword}")
-          }
-          afterEvaluate {
-            pom.artifactId = "${archivesBaseName}"
-            pom.project {
-              name 'Apache Kafka'
-              packaging 'jar'
-              url 'http://kafka.apache.org'
-              licenses {
-                license {
-                  name 'The Apache Software License, Version 2.0'
-                  url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
-                  distribution 'repo'
-                }
+          if (isVerificationRequired(project)) {
+              sign configurations.archives
+
+              // To test locally, replace mavenUrl in ~/.gradle/gradle.properties to file://localhost/tmp/myRepo/
+              mavenDeployer {
+                  beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment)
}
+                  repository(url: "${mavenUrl}") {
+                      authentication(userName: "${mavenUsername}", password: "${mavenPassword}")
+                  }
+                  afterEvaluate {
+                      pom.artifactId = "${archivesBaseName}"
+                      pom.project {
+                          name 'Apache Kafka'
+                          packaging 'jar'
+                          url 'http://kafka.apache.org'
+                          licenses {
+                              license {
+                                  name 'The Apache Software License, Version 2.0'
+                                  url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+                                  distribution 'repo'
+                              }
+                          }
+                      }
+                  }
               }
-            }
           }
-        }
       }
     }
   }


Mime
View raw message