kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joest...@apache.org
Subject git commit: KAFKA-1502 source jar is empty patch by Jun Rao reviewed by Joe Stein
Date Sat, 30 Aug 2014 16:14:58 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 953e35b5c -> 3abe3403a


KAFKA-1502 source jar is empty patch by Jun Rao reviewed by Joe Stein


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

Branch: refs/heads/trunk
Commit: 3abe3403a1a9dfb2eae4b73f79e60b99401079f6
Parents: 953e35b
Author: Joe Stein <joe.stein@stealth.ly>
Authored: Sat Aug 30 12:14:54 2014 -0400
Committer: Joe Stein <joe.stein@stealth.ly>
Committed: Sat Aug 30 12:14:54 2014 -0400

----------------------------------------------------------------------
 build.gradle | 66 +++++++++++++++++++++++++------------------------------
 1 file changed, 30 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/3abe3403/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 45cf502..6d6f1a4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -74,47 +74,31 @@ subprojects {
     from '../NOTICE'
   }
 
-  tasks.withType(Javadoc) {
-    task srcJar(type:Jar) {
-      classifier = 'sources'
-      from '../LICENSE'
-      from '../NOTICE'
-      from sourceSets.main.java
-    }
-
-    task javadocJar(type: Jar, dependsOn: javadoc) {
-      classifier 'javadoc'
-      from '../LICENSE'
-      from '../NOTICE'
-      from javadoc.destinationDir
-    }
-
-    task docsJar(type: Jar, dependsOn: javadocJar) { }
-
-    artifacts {
-      archives srcJar
-      archives javadocJar
-    }
+  task srcJar(type:Jar) {
+    classifier = 'sources'
+    from '../LICENSE'
+    from '../NOTICE'
+    from sourceSets.main.java
   }
 
-  tasks.withType(ScalaCompile) {
-    task srcJar(type:Jar, overwrite: true) {
-      classifier = 'sources'
-      from '../LICENSE'
-      from '../NOTICE'
-      from sourceSets.main.scala
-      from sourceSets.main.java
-    }
+  task javadocJar(type: Jar, dependsOn: javadoc) {
+    classifier 'javadoc'
+    from '../LICENSE'
+    from '../NOTICE'
+    from javadoc.destinationDir
+  }
 
-    scalaCompileOptions.useAnt = false
+  task docsJar(dependsOn: javadocJar)
 
-    configure(scalaCompileOptions.forkOptions) {
-      memoryMaximumSize = '1g'
-      jvmArgs = ['-XX:MaxPermSize=512m']
-    }
+  artifacts {
+    archives srcJar
+    archives javadocJar
   }
+  
+  plugins.withType(ScalaPlugin) {
+    //source jar should also contain scala source:
+    srcJar.from sourceSets.main.scala
 
-  tasks.withType(ScalaDoc) {
     task scaladocJar(type:Jar) {
       classifier = 'scaladoc'
       from '../LICENSE'
@@ -122,12 +106,22 @@ subprojects {
       from scaladoc
     }
 
-    task docsJar(type: Jar, dependsOn: ['javadocJar', 'scaladocJar'], overwrite: true) {
}
+    //documentation task should also trigger building scala doc jar
+    docsJar.dependsOn scaladocJar
 
     artifacts {
       archives scaladocJar
     }
   }
+
+  tasks.withType(ScalaCompile) {
+    scalaCompileOptions.useAnt = false
+
+    configure(scalaCompileOptions.forkOptions) {
+      memoryMaximumSize = '1g'
+      jvmArgs = ['-XX:MaxPermSize=512m']
+    }
+  }
 }
 
 for ( sv in ['2_9_1', '2_9_2', '2_10_1', '2_11'] ) {


Mime
View raw message