-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
70 lines (58 loc) · 1.86 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
import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage
import com.bmuschko.gradle.docker.tasks.image.DockerPushImage
plugins {
id 'io.deephaven.crypto.java-application-conventions'
id 'com.bmuschko.docker-java-application' version '6.7.0'
}
repositories {
mavenCentral()
maven {
url 'https://packages.confluent.io/maven/'
}
}
String base = project.property('publisher.base')
String image = project.property('publisher.image')
dependencies {
implementation 'org.apache.kafka:kafka-clients:7.0.1-ccs'
implementation 'io.confluent:kafka-avro-serializer:7.0.1'
implementation project(':common')
implementation project(':schemas')
implementation project(':xchange-adapter')
// exchanges
[ 'binance', 'bitfinex', 'bitflyer', 'bitstamp', 'coinbase-pro', 'gemini', 'kraken', 'lgo', 'okcoin', 'okex', 'poloniex' ].each { String exchangeName ->
if ('true' == project.findProperty("exchange.${exchangeName}.enabled")) {
runtimeOnly project(":${exchangeName}")
}
}
runtimeOnly 'ch.qos.logback:logback-classic:1.3.0-alpha12'
}
application {
mainClass = 'io.deephaven.crypto.kafka.KafkaPublisher'
applicationDefaultJvmArgs = [
'-server',
'-Xmx1g',
'-XX:+UseG1GC',
'-XX:MaxGCPauseMillis=100',
'-XshowSettings:vm'
]
}
docker {
javaApplication {
baseImage = base
images = [ image ]
maintainer = project.property('maintainer')
jvmArgs = [
'-server',
'-Xmx1g',
'-XX:+UseG1GC',
'-XX:MaxGCPauseMillis=100',
'-XshowSettings:vm'
]
}
}
project.tasks.register('pushImage', DockerPushImage) {
it.dependsOn dockerBuildImage
it.inputs.files dockerBuildImage.outputs.files
it.images.add(image)
}
assemble.dependsOn dockerBuildImage