| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | // Licensed to the Apache Software Foundation (ASF) under one or more
 | 
					
						
							|  |  |  | // contributor license agreements.  See the NOTICE file distributed with
 | 
					
						
							|  |  |  | // this work for additional information regarding copyright ownership.
 | 
					
						
							|  |  |  | // The ASF licenses this file to You under the Apache License, Version 2.0
 | 
					
						
							|  |  |  | // (the "License"); you may not use this file except in compliance with
 | 
					
						
							|  |  |  | // the License.  You may obtain a copy of the License at
 | 
					
						
							|  |  |  | // 
 | 
					
						
							|  |  |  | //    http://www.apache.org/licenses/LICENSE-2.0
 | 
					
						
							|  |  |  | // 
 | 
					
						
							|  |  |  | // Unless required by applicable law or agreed to in writing, software
 | 
					
						
							|  |  |  | // distributed under the License is distributed on an "AS IS" BASIS,
 | 
					
						
							|  |  |  | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
					
						
							|  |  |  | // See the License for the specific language governing permissions and
 | 
					
						
							|  |  |  | // limitations under the License.
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | buildscript { | 
					
						
							|  |  |  |   repositories { | 
					
						
							|  |  |  |     mavenCentral() | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  |   apply from: file('gradle/buildscript.gradle'), to: buildscript | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-03-04 01:35:21 +08:00
										 |  |  | def slf4jlog4j='org.slf4j:slf4j-log4j12:1.7.6' | 
					
						
							| 
									
										
										
										
											2014-03-01 05:53:37 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | allprojects { | 
					
						
							|  |  |  |   apply plugin: 'idea' | 
					
						
							|  |  |  |   repositories { | 
					
						
							|  |  |  |     mavenCentral() | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-24 00:06:17 +08:00
										 |  |  | ext { | 
					
						
							|  |  |  |     gradleVersion = "2.0" | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-21 06:43:51 +08:00
										 |  |  | def isVerificationRequired(project) { | 
					
						
							| 
									
										
										
										
											2014-10-18 03:30:41 +08:00
										 |  |  |     project.gradle.startParameter.taskNames.any { it.contains("upload") } | 
					
						
							| 
									
										
										
										
											2014-09-21 06:43:51 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-24 00:06:17 +08:00
										 |  |  | apply from: file('wrapper.gradle') | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | apply from: file('gradle/license.gradle') | 
					
						
							| 
									
										
										
										
											2014-02-13 00:22:51 +08:00
										 |  |  | apply from: file('scala.gradle') | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | subprojects { | 
					
						
							|  |  |  |   apply plugin: 'java' | 
					
						
							|  |  |  |   apply plugin: 'eclipse' | 
					
						
							|  |  |  |   apply plugin: 'maven' | 
					
						
							| 
									
										
										
										
											2014-02-15 03:15:32 +08:00
										 |  |  |   apply plugin: 'signing' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-21 06:43:51 +08:00
										 |  |  |   licenseTest.onlyIf { isVerificationRequired(project) } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |   uploadArchives { | 
					
						
							|  |  |  |     repositories { | 
					
						
							| 
									
										
										
										
											2014-02-15 03:15:32 +08:00
										 |  |  |       signing { | 
					
						
							| 
									
										
										
										
											2014-09-21 06:43:51 +08:00
										 |  |  |           if (isVerificationRequired(project)) { | 
					
						
							|  |  |  |               sign configurations.archives | 
					
						
							| 
									
										
										
										
											2014-02-15 03:15:32 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-21 06:43:51 +08:00
										 |  |  |               // 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' | 
					
						
							|  |  |  |                               } | 
					
						
							|  |  |  |                           } | 
					
						
							|  |  |  |                       } | 
					
						
							|  |  |  |                   } | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |               } | 
					
						
							|  |  |  |           } | 
					
						
							|  |  |  |       } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-19 04:10:34 +08:00
										 |  |  |   jar { | 
					
						
							|  |  |  |     from '../LICENSE' | 
					
						
							|  |  |  |     from '../NOTICE' | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-08-31 00:14:54 +08:00
										 |  |  |   task srcJar(type:Jar) { | 
					
						
							|  |  |  |     classifier = 'sources' | 
					
						
							|  |  |  |     from '../LICENSE' | 
					
						
							|  |  |  |     from '../NOTICE' | 
					
						
							|  |  |  |     from sourceSets.main.java | 
					
						
							| 
									
										
										
										
											2014-04-19 04:10:34 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-08-31 00:14:54 +08:00
										 |  |  |   task javadocJar(type: Jar, dependsOn: javadoc) { | 
					
						
							|  |  |  |     classifier 'javadoc' | 
					
						
							|  |  |  |     from '../LICENSE' | 
					
						
							|  |  |  |     from '../NOTICE' | 
					
						
							|  |  |  |     from javadoc.destinationDir | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2014-04-19 04:10:34 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-08-31 00:14:54 +08:00
										 |  |  |   task docsJar(dependsOn: javadocJar) | 
					
						
							| 
									
										
										
										
											2014-04-19 04:10:34 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-08-31 00:14:54 +08:00
										 |  |  |   artifacts { | 
					
						
							|  |  |  |     archives srcJar | 
					
						
							|  |  |  |     archives javadocJar | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |   } | 
					
						
							| 
									
										
										
										
											2014-08-31 00:14:54 +08:00
										 |  |  |    | 
					
						
							|  |  |  |   plugins.withType(ScalaPlugin) { | 
					
						
							|  |  |  |     //source jar should also contain scala source:
 | 
					
						
							|  |  |  |     srcJar.from sourceSets.main.scala | 
					
						
							| 
									
										
										
										
											2014-04-19 04:10:34 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     task scaladocJar(type:Jar) { | 
					
						
							|  |  |  |       classifier = 'scaladoc' | 
					
						
							|  |  |  |       from '../LICENSE' | 
					
						
							|  |  |  |       from '../NOTICE' | 
					
						
							|  |  |  |       from scaladoc | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-08-31 00:14:54 +08:00
										 |  |  |     //documentation task should also trigger building scala doc jar
 | 
					
						
							|  |  |  |     docsJar.dependsOn scaladocJar | 
					
						
							| 
									
										
										
										
											2014-04-19 04:10:34 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     artifacts { | 
					
						
							|  |  |  |       archives scaladocJar | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2014-08-31 00:14:54 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   tasks.withType(ScalaCompile) { | 
					
						
							|  |  |  |     scalaCompileOptions.useAnt = false | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     configure(scalaCompileOptions.forkOptions) { | 
					
						
							|  |  |  |       memoryMaximumSize = '1g' | 
					
						
							|  |  |  |       jvmArgs = ['-XX:MaxPermSize=512m'] | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-20 03:18:23 +08:00
										 |  |  | for ( sv in ['2_9_1', '2_9_2', '2_10_4', '2_11_5'] ) { | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |   String svInDot = sv.replaceAll( "_", ".") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   tasks.create(name: "jar_core_${sv}", type: GradleBuild) { | 
					
						
							|  |  |  |     buildFile = './build.gradle' | 
					
						
							|  |  |  |     tasks = ['core:jar'] | 
					
						
							|  |  |  |     startParameter.projectProperties = [scalaVersion: "${svInDot}"] | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   tasks.create(name: "test_core_${sv}", type: GradleBuild) { | 
					
						
							|  |  |  |     buildFile = './build.gradle' | 
					
						
							|  |  |  |     tasks = ['core:test'] | 
					
						
							|  |  |  |     startParameter.projectProperties = [scalaVersion: "${svInDot}"] | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-04-19 04:10:34 +08:00
										 |  |  |   tasks.create(name: "srcJar_${sv}", type: GradleBuild) { | 
					
						
							|  |  |  |     buildFile = './build.gradle' | 
					
						
							|  |  |  |     tasks = ['core:srcJar'] | 
					
						
							|  |  |  |     startParameter.projectProperties = [scalaVersion: "${svInDot}"] | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   tasks.create(name: "docsJar_${sv}", type: GradleBuild) { | 
					
						
							|  |  |  |     buildFile = './build.gradle' | 
					
						
							|  |  |  |     tasks = ['core:docsJar'] | 
					
						
							|  |  |  |     startParameter.projectProperties = [scalaVersion: "${svInDot}"] | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |   tasks.create(name: "releaseTarGz_${sv}", type: GradleBuild) { | 
					
						
							|  |  |  |     buildFile = './build.gradle' | 
					
						
							|  |  |  |     tasks = ['releaseTarGz'] | 
					
						
							|  |  |  |     startParameter.projectProperties = [scalaVersion: "${svInDot}"] | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   tasks.create(name: "uploadCoreArchives_${sv}", type: GradleBuild) { | 
					
						
							|  |  |  |     buildFile = './build.gradle' | 
					
						
							|  |  |  |     tasks = ['core:uploadArchives'] | 
					
						
							|  |  |  |     startParameter.projectProperties = [scalaVersion: "${svInDot}"] | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-20 03:18:23 +08:00
										 |  |  | tasks.create(name: "jarAll", dependsOn: ['jar_core_2_9_1', 'jar_core_2_9_2', 'jar_core_2_10_4', 'jar_core_2_11_5', 'clients:jar', 'examples:jar', 'contrib:hadoop-consumer:jar', 'contrib:hadoop-producer:jar']) { | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-20 03:18:23 +08:00
										 |  |  | tasks.create(name: "srcJarAll", dependsOn: ['srcJar_2_9_1', 'srcJar_2_9_2', 'srcJar_2_10_4', 'srcJar_2_11_5', 'clients:srcJar', 'examples:srcJar', 'contrib:hadoop-consumer:srcJar', 'contrib:hadoop-producer:srcJar']) { } | 
					
						
							| 
									
										
										
										
											2014-04-19 04:10:34 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-20 03:18:23 +08:00
										 |  |  | tasks.create(name: "docsJarAll", dependsOn: ['docsJar_2_9_1', 'docsJar_2_9_2', 'docsJar_2_10_4', 'docsJar_2_11_5', 'clients:docsJar', 'examples:docsJar', 'contrib:hadoop-consumer:docsJar', 'contrib:hadoop-producer:docsJar']) { } | 
					
						
							| 
									
										
										
										
											2014-04-19 04:10:34 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-20 03:18:23 +08:00
										 |  |  | tasks.create(name: "testAll", dependsOn: ['test_core_2_9_1', 'test_core_2_9_2', 'test_core_2_10_4', 'test_core_2_11_5', 'clients:test']) { | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-20 03:18:23 +08:00
										 |  |  | tasks.create(name: "releaseTarGzAll", dependsOn: ['releaseTarGz_2_9_1', 'releaseTarGz_2_9_2', 'releaseTarGz_2_10_4', 'releaseTarGz_2_11_5']) { | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-20 03:18:23 +08:00
										 |  |  | tasks.create(name: "uploadArchivesAll", dependsOn: ['uploadCoreArchives_2_9_1', 'uploadCoreArchives_2_9_2', 'uploadCoreArchives_2_10_4', 'uploadCoreArchives_2_11_5', 'clients:uploadArchives', 'examples:uploadArchives', 'contrib:hadoop-consumer:uploadArchives', 'contrib:hadoop-producer:uploadArchives']) { | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | project(':core') { | 
					
						
							|  |  |  |   println "Building project 'core' with Scala version $scalaVersion" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   apply plugin: 'scala' | 
					
						
							| 
									
										
										
										
											2014-02-13 00:22:51 +08:00
										 |  |  |   archivesBaseName = "kafka_${baseScalaVersion}" | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   def (major, minor, trivial) = scalaVersion.tokenize('.') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   dependencies { | 
					
						
							| 
									
										
										
										
											2014-02-11 13:40:34 +08:00
										 |  |  |     compile project(':clients') | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |     compile "org.scala-lang:scala-library:$scalaVersion" | 
					
						
							| 
									
										
										
										
											2014-08-29 09:15:10 +08:00
										 |  |  |     compile 'org.apache.zookeeper:zookeeper:3.4.6' | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |     compile 'com.101tec:zkclient:0.3' | 
					
						
							|  |  |  |     compile 'com.yammer.metrics:metrics-core:2.2.0' | 
					
						
							|  |  |  |     compile 'net.sf.jopt-simple:jopt-simple:3.2' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-26 11:15:51 +08:00
										 |  |  |     testCompile 'junit:junit:4.6' | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |     testCompile 'org.easymock:easymock:3.0' | 
					
						
							|  |  |  |     testCompile 'org.objenesis:objenesis:1.2' | 
					
						
							| 
									
										
										
										
											2014-02-12 06:25:31 +08:00
										 |  |  |     testCompile project(':clients') | 
					
						
							| 
									
										
										
										
											2014-08-11 12:20:30 +08:00
										 |  |  |     if (scalaVersion.startsWith('2.10')) { | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |       testCompile 'org.scalatest:scalatest_2.10:1.9.1' | 
					
						
							| 
									
										
										
										
											2014-08-11 12:20:30 +08:00
										 |  |  |     } else if (scalaVersion.startsWith('2.11')) { | 
					
						
							|  |  |  |       compile 'org.scala-lang.modules:scala-xml_2.11:1.0.2' | 
					
						
							|  |  |  |       compile 'org.scala-lang.modules:scala-parser-combinators_2.11:1.0.2' | 
					
						
							|  |  |  |       testCompile "org.scalatest:scalatest_2.11:2.2.0" | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |     } else { | 
					
						
							|  |  |  |       testCompile "org.scalatest:scalatest_$scalaVersion:1.8" | 
					
						
							| 
									
										
										
										
											2014-08-11 12:20:30 +08:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2014-03-01 05:53:37 +08:00
										 |  |  |     testRuntime "$slf4jlog4j" | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-08-11 12:20:30 +08:00
										 |  |  |     zinc 'com.typesafe.zinc:zinc:0.3.1' | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   configurations { | 
					
						
							|  |  |  |     // manually excludes some unnecessary dependencies
 | 
					
						
							|  |  |  |     compile.exclude module: 'javax' | 
					
						
							|  |  |  |     compile.exclude module: 'jline' | 
					
						
							|  |  |  |     compile.exclude module: 'jms' | 
					
						
							|  |  |  |     compile.exclude module: 'jmxri' | 
					
						
							|  |  |  |     compile.exclude module: 'jmxtools' | 
					
						
							|  |  |  |     compile.exclude module: 'mail' | 
					
						
							| 
									
										
										
										
											2014-10-21 02:07:44 +08:00
										 |  |  |     compile.exclude module: 'netty' | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   tasks.create(name: "copyDependantLibs", type: Copy) { | 
					
						
							| 
									
										
										
										
											2014-03-04 01:35:21 +08:00
										 |  |  |     from (configurations.testRuntime) { | 
					
						
							|  |  |  |       include('slf4j-log4j12*') | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     from (configurations.runtime) { | 
					
						
							|  |  |  |       exclude('kafka-clients*') | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |     into "$buildDir/dependant-libs-${scalaVersion}" | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   tasks.create(name: "releaseTarGz", dependsOn: configurations.archives.artifacts, type: Tar) {  | 
					
						
							| 
									
										
										
										
											2014-03-05 04:49:12 +08:00
										 |  |  |     into "kafka_${baseScalaVersion}-${version}" | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |     compression = Compression.GZIP  | 
					
						
							|  |  |  |     from(project.file("../bin")) { into "bin/" } | 
					
						
							|  |  |  |     from(project.file("../config")) { into "config/" } | 
					
						
							|  |  |  |     from '../LICENSE' | 
					
						
							|  |  |  |     from '../NOTICE' | 
					
						
							|  |  |  |     from(configurations.runtime) { into("libs/") } | 
					
						
							|  |  |  |     from(configurations.archives.artifacts.files) { into("libs/") } | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2014-04-19 04:10:34 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-13 00:22:51 +08:00
										 |  |  |   jar { | 
					
						
							|  |  |  |     dependsOn 'copyDependantLibs' | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-20 09:57:41 +08:00
										 |  |  |   jar.manifest { | 
					
						
							|  |  |  |     attributes( | 
					
						
							|  |  |  |       'Version': "${version}" | 
					
						
							|  |  |  |     ) | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |   task testJar(type: Jar) { | 
					
						
							| 
									
										
										
										
											2014-07-03 06:01:06 +08:00
										 |  |  |     classifier = 'test' | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |     from sourceSets.test.output | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   test { | 
					
						
							|  |  |  |     testLogging { | 
					
						
							|  |  |  |         events "passed", "skipped", "failed" | 
					
						
							|  |  |  |         exceptionFormat = 'full' | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2014-04-19 04:10:34 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-07-03 06:01:06 +08:00
										 |  |  |   artifacts { | 
					
						
							|  |  |  |     archives testJar | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | project(':contrib:hadoop-consumer') { | 
					
						
							|  |  |  |   archivesBaseName = "kafka-hadoop-consumer" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   dependencies { | 
					
						
							|  |  |  |     compile project(':core') | 
					
						
							|  |  |  |     compile "org.apache.avro:avro:1.4.0" | 
					
						
							|  |  |  |     compile "org.apache.pig:pig:0.8.0" | 
					
						
							|  |  |  |     compile "commons-logging:commons-logging:1.0.4" | 
					
						
							|  |  |  |     compile "org.codehaus.jackson:jackson-core-asl:1.5.5" | 
					
						
							|  |  |  |     compile "org.codehaus.jackson:jackson-mapper-asl:1.5.5" | 
					
						
							|  |  |  |     compile "org.apache.hadoop:hadoop-core:0.20.2" | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   configurations { | 
					
						
							|  |  |  |     // manually excludes some unnecessary dependencies
 | 
					
						
							|  |  |  |     compile.exclude module: 'javax' | 
					
						
							|  |  |  |     compile.exclude module: 'jms' | 
					
						
							|  |  |  |     compile.exclude module: 'jmxri' | 
					
						
							|  |  |  |     compile.exclude module: 'jmxtools' | 
					
						
							|  |  |  |     compile.exclude module: 'mail' | 
					
						
							|  |  |  |     compile.exclude module: 'netty' | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | project(':contrib:hadoop-producer') { | 
					
						
							|  |  |  |   archivesBaseName = "kafka-hadoop-producer" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   dependencies { | 
					
						
							|  |  |  |     compile project(':core') | 
					
						
							| 
									
										
										
										
											2014-09-25 12:13:21 +08:00
										 |  |  |     compile("org.apache.avro:avro:1.4.0") { force = true } | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |     compile "org.apache.pig:pig:0.8.0" | 
					
						
							|  |  |  |     compile "commons-logging:commons-logging:1.0.4" | 
					
						
							|  |  |  |     compile "org.codehaus.jackson:jackson-core-asl:1.5.5" | 
					
						
							|  |  |  |     compile "org.codehaus.jackson:jackson-mapper-asl:1.5.5" | 
					
						
							|  |  |  |     compile "org.apache.hadoop:hadoop-core:0.20.2" | 
					
						
							| 
									
										
										
										
											2014-09-25 12:13:21 +08:00
										 |  |  |     compile "org.apache.pig:piggybank:0.12.0" | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   configurations { | 
					
						
							|  |  |  |     // manually excludes some unnecessary dependencies
 | 
					
						
							|  |  |  |     compile.exclude module: 'javax' | 
					
						
							|  |  |  |     compile.exclude module: 'jms' | 
					
						
							|  |  |  |     compile.exclude module: 'jmxri' | 
					
						
							|  |  |  |     compile.exclude module: 'jmxtools' | 
					
						
							|  |  |  |     compile.exclude module: 'mail' | 
					
						
							|  |  |  |     compile.exclude module: 'netty' | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | project(':examples') { | 
					
						
							|  |  |  |   archivesBaseName = "kafka-examples" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   dependencies { | 
					
						
							|  |  |  |     compile project(':core') | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2014-02-13 00:22:51 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | project(':clients') { | 
					
						
							|  |  |  |   archivesBaseName = "kafka-clients" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   dependencies { | 
					
						
							| 
									
										
										
										
											2014-02-21 12:17:01 +08:00
										 |  |  |     compile "org.slf4j:slf4j-api:1.7.6" | 
					
						
							| 
									
										
										
										
											2014-11-15 07:15:14 +08:00
										 |  |  |     compile 'org.xerial.snappy:snappy-java:1.1.1.6' | 
					
						
							| 
									
										
										
										
											2014-05-26 23:34:50 +08:00
										 |  |  |     compile 'net.jpountz.lz4:lz4:1.2.0' | 
					
						
							| 
									
										
										
										
											2014-03-27 12:48:55 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |     testCompile 'com.novocode:junit-interface:0.9' | 
					
						
							| 
									
										
										
										
											2014-03-01 05:53:37 +08:00
										 |  |  |     testRuntime "$slf4jlog4j" | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   task testJar(type: Jar) { | 
					
						
							| 
									
										
										
										
											2014-07-03 06:01:06 +08:00
										 |  |  |     classifier = 'test' | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  |     from sourceSets.test.output | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   test { | 
					
						
							|  |  |  |     testLogging { | 
					
						
							|  |  |  |         events "passed", "skipped", "failed" | 
					
						
							|  |  |  |         exceptionFormat = 'full' | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							| 
									
										
										
										
											2014-11-18 10:53:16 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   javadoc { | 
					
						
							|  |  |  |     include "**/org/apache/kafka/clients/producer/*" | 
					
						
							| 
									
										
										
										
											2015-01-13 14:01:43 +08:00
										 |  |  |     include "**/org/apache/kafka/common/*" | 
					
						
							| 
									
										
										
										
											2014-11-18 10:53:16 +08:00
										 |  |  |     include "**/org/apache/kafka/common/errors/*" | 
					
						
							| 
									
										
										
										
											2015-01-07 03:07:46 +08:00
										 |  |  |     include "**/org/apache/kafka/common/serialization/*" | 
					
						
							| 
									
										
										
										
											2014-11-18 10:53:16 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-08 05:48:04 +08:00
										 |  |  | } |