forked from elodina/scala-kafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
140 lines (124 loc) · 4.25 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
apply plugin: 'scala'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
version = '0.1.0.0'
def scalaVersion = '2.10.3'
configurations {
deployerJars
}
uploadArchives {
signing {
sign configurations.archives
repositories.mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
pom.groupId = 'ly.stealth'
pom.artifactId = 'scala-kafka'
pom.version = version
pom.project {
name 'Scala Kafka'
packaging 'jar'
url 'http://github.com/stealthly/scala-kafka'
description 'Quick up and running using Scala for Apache Kafka'
scm {
url 'http://github.com/stealthly/scala-kafka'
connection 'scm:https://github.com/stealthly/scala-kafka'
developerConnection 'scm:git:git://github.com/stealthly/scala-kafka'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'stealthly'
name 'Joe Stein'
email '[email protected]'
}
}
}
configuration = configurations.deployerJars
repository(url: "${mavenURL}") {
authentication(userName: "${mavenUsername}", password: "${mavenPassword}")
}
}
}
}
tasks.withType(ScalaDoc) {
task srcJar(type:Jar) {
classifier = 'sources'
from '../LICENSE'
from '../NOTICE'
from sourceSets.main.scala
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier 'javadoc'
from '../LICENSE'
from javadoc.destinationDir
}
task docsJar(type: Jar, dependsOn: javadocJar) { }
artifacts {
archives srcJar
archives javadocJar
}
}
task specs(type: JavaExec, dependsOn: testClasses) {
main = 'org.specs2.files'
args = ['console']
classpath sourceSets.main.runtimeClasspath
classpath sourceSets.test.runtimeClasspath
classpath configurations.testRuntime
classpath configurations.runtime
}
task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}
task scalago(type: Jar) {
dependsOn compileJava, compileScala, processResources, classes
def mainClassName = "scalago.ScalaGoKafka"
jar {
doFirst {
from(configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }) {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
exclude "org/apache/storm/*"
exclude "defaults.yaml"
}
}
manifest.attributes("Main-Class": mainClassName)
}
}
test.dependsOn specs
repositories {
mavenCentral()
maven {
url = 'http://repo.typesafe.com/typesafe/releases/'
url = 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies {
compile 'org.scala-lang:scala-library:$scalaVersion'
compile 'org.apache.kafka:kafka_2.10:0.8.2-beta'
compile 'com.101tec:zkclient:0.3'
compile 'log4j:log4j:1.2.17'
compile 'net.sf.jopt-simple:jopt-simple:4.5'
compile 'org.apache.avro:avro:1.7.5'
compile 'com.github.scopt:scopt_2.9.2:3.1.0'
compile 'com.yammer.metrics:metrics-core:2.2.0'
compile 'nl.grons:metrics-scala_2.9.2:3.0.3'
compile group: 'com.typesafe.akka', name: 'akka-actor_2.10', version: '2.3.1'
compile 'org.apache.thrift:libthrift:0.9.1'
compile 'joda-time:joda-time:2.3'
compile 'org.joda:joda-convert:1.5'
compile 'com.sclasen:akka-kafka_2.10:0.0.9-0.8.2-beta-SNAPSHOT'
compile 'com.typesafe.akka:akka-slf4j_2.10:2.3.1'
compile 'com.typesafe.akka:akka-testkit_2.10:2.3.1'
compile 'org.slf4j:log4j-over-slf4j:1.6.6'
testCompile 'org.scalatest:scalatest_2.10:2.0'
testCompile 'org.specs2:specs2_2.10:2.2.2'
deployerJars "org.apache.maven.wagon:wagon-http:2.2"
}