This repository has been archived by the owner on Feb 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
55 lines (41 loc) · 1.53 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
apply plugin: 'java'
apply plugin: 'application'
version "0.1.0-SNAPSHOT"
repositories {
jcenter()
}
mainClassName = "com.teambition.kafka.admin.Main"
dependencies {
compile 'org.slf4j:slf4j-api:1.7.21'
compile group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.4.0.v20161208'
compile group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.4.0.v20161208'
compile group: 'org.glassfish.jersey.core', name: 'jersey-server', version: '2.25'
compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-servlet', version: '2.25'
compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-servlet-core', version: '2.25'
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-json-jackson', version: '2.25'
compile group: 'org.influxdb', name: 'influxdb-java', version: '2.5'
compile group: 'org.apache.kafka', name: 'kafka_2.11', version: '0.10.1.1'
testCompile 'junit:junit:4.12'
}
task createVersion(dependsOn: processResources) << {
new File("$buildDir/resources/main/version.properties").withWriter { w ->
Properties p = new Properties()
p['version'] = project.version.toString()
// p['timestamp'] = project
p.store w, null
}
}
classes {
dependsOn createVersion
}
tasks.withType(Tar) {
compression = Compression.GZIP
}
task sampleProducer(type: JavaExec) {
main = 'demo.SampleProducer'
classpath = sourceSets.main.runtimeClasspath
}
task sampleConsumer(type: JavaExec) {
main = 'demo.SampleConsumer'
classpath = sourceSets.main.runtimeClasspath
}