-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
200 lines (168 loc) · 7.19 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
import java.time.Instant
import java.time.ZoneId
import java.time.format.DateTimeFormatter
buildscript {
repositories {
mavenCentral()
mavenLocal()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
classpath "org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}"
}
}
plugins {
id 'java'
id 'groovy'
id 'idea'
id 'maven-publish'
id 'application'
id "org.jetbrains.kotlin.jvm" version '1.7.10'
id 'org.jetbrains.kotlin.plugin.spring' version '1.7.10'
id 'org.springframework.boot' version '2.5.6'
id 'com.google.cloud.tools.jib' version '3.2.0'
id "org.jlleitschuh.gradle.ktlint" version "11.5.0"
}
group = 'io.emeraldpay.dshackle.archiver'
version = '0.3.0-SNAPSHOT'
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
maven { url "https://maven.emrld.io" }
maven { url "https://linkedin.jfrog.io/artifactory/avro-util/" }
}
configurations {
compile.exclude group: "commons-logging"
compile.exclude group: "ch.qos.logback"
compile.exclude group: "org.slf4j", module: "slf4j-jdk14"
compile.exclude group: "org.slf4j", module: "slf4j-log4j12"
compile.exclude group: "org.slf4j", module: "log4j-over-slf4j"
// should be used only for generation of the stubs, the lib contains grpc classes
compile.exclude group: "com.salesforce.servicelibs", module: "reactor-grpc"
}
dependencies {
implementation 'io.emeraldpay.dshackle.archive:dshackle-archive-avro:0.1'
implementation "io.emeraldpay.etherjar:etherjar-domain:$etherjarVersion"
implementation "io.emeraldpay.etherjar:etherjar-hex:$etherjarVersion"
implementation "io.emeraldpay.etherjar:etherjar-rpc-api:$etherjarVersion"
implementation "io.emeraldpay.etherjar:etherjar-rpc-emerald:$etherjarVersion"
implementation "io.emeraldpay:emerald-api:0.12-alpha.5"
implementation "io.grpc:grpc-stub:$grpcVersion"
implementation "io.grpc:grpc-protobuf:$grpcVersion"
implementation "io.grpc:grpc-protobuf-lite:$grpcVersion"
implementation "io.grpc:grpc-api:$grpcVersion"
implementation "io.grpc:grpc-core:$grpcVersion"
implementation "io.grpc:grpc-netty:$grpcVersion"
implementation 'io.projectreactor:reactor-core:' + reactorVersion
implementation 'io.projectreactor.netty:reactor-netty:' + reactorNettyVersion
implementation 'io.projectreactor:reactor-tools:' + reactorVersion
implementation "com.fasterxml.jackson.module:jackson-module-kotlin"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310"
implementation "org.springframework:spring-core:$springVersion"
implementation("org.springframework.boot:spring-boot-starter:" + springBootVersion) {
exclude module: 'spring-boot-starter-logging'
}
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'commons-cli:commons-cli:1.5.0'
implementation 'commons-codec:commons-codec:1.15'
// implementation 'org.apache.hadoop:hadoop-hdfs-client:' + hadoopVersion
// implementation 'org.apache.hadoop:hadoop-common:' + hadoopVersion
implementation 'org.apache.avro:avro:1.11.0'
implementation 'com.github.luben:zstd-jni:1.5.0-4'
implementation 'org.xerial.snappy:snappy-java:1.1.8.4'
//https://linkedin.jfrog.io/artifactory/avro-util/com/linkedin/avroutil1/avro-fastserde/0.2.68
implementation "com.linkedin.avroutil1:helper-all:0.2.68"
implementation("com.linkedin.avroutil1:avro-fastserde:0.2.68") {
exclude group: "com.linkedin.avroutil1", module: "helper"
}
implementation platform('com.google.cloud:libraries-bom:26.4.0')
implementation "com.google.cloud:google-cloud-nio"
implementation 'com.google.cloud:google-cloud-storage'
implementation 'com.google.cloud:google-cloud-pubsub'
implementation 'software.amazon.awssdk:s3:2.20.153'
implementation "software.amazon.awssdk:url-connection-client:2.20.153"
implementation "org.apache.pulsar:pulsar-client-reactive-adapter:0.4.0"
implementation "org.apache.pulsar:pulsar-client-reactive-producer-cache-caffeine:0.4.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "org.jetbrains.kotlin:kotlin-reflect"
implementation "org.slf4j:slf4j-api:$slf4jVersion"
implementation "org.slf4j:jul-to-slf4j:$slf4jVersion"
implementation "org.slf4j:jcl-over-slf4j:$slf4jVersion"
implementation "org.apache.logging.log4j:log4j-slf4j2-impl:2.20.0"
testImplementation "org.codehaus.groovy:groovy:$groovyVersion"
testImplementation 'org.spockframework:spock-core:' + spockVersion
testImplementation 'org.spockframework:spock-spring:' + spockVersion
testImplementation(platform("org.junit:junit-bom:5.8.2"))
testImplementation("org.springframework.boot:spring-boot-starter-test:" + springBootVersion){
exclude module: 'spring-boot-starter-logging'
}
testImplementation "org.testcontainers:testcontainers:1.19.1"
testImplementation "org.testcontainers:gcloud:1.19.1"
testImplementation "org.testcontainers:pulsar:1.19.1"
testImplementation "com.adobe.testing:s3mock-testcontainers:3.1.0"
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = '17'
}
}
ktlint {
version = "0.50.0"
}
test {
jvmArgs(
'-ea', "-Dspring.profiles.active=test", "-Dlogging.level.io.emeraldpay=DEBUG",
// see https://github.com/apache/pulsar/issues/20282
"--add-opens=java.base/sun.net=ALL-UNNAMED"
)
testLogging.showStandardStreams = false
testLogging.exceptionFormat = 'full'
useJUnitPlatform()
}
jar {
enabled = true
}
application {
getMainClass().set('io.emeraldpay.dshackle.archive.AppKt')
}
jib {
from {
image = "azul/zulu-openjdk-debian:17"
}
to {
// execute with -Platest=true
// $ gradle jib -Platest=true
// by default publish as:
// dshackle-archive:shapshot,
// dshackle-archive:t<yyyyMMddHHmm>,
// dshackle-archive:<versionFull> and
// dshackle-archive:<versionMajor.versionMinor>
image = [
project.hasProperty('docker') ? project.property('docker') : 'emeraldpay',
'/dshackle-archive:',
'snapshot'
].join('')
tags = [project.version].with(true) {
add "t" + DateTimeFormatter.ofPattern("yyyyMMddHHmm").withZone(ZoneId.of('UTC')).format(Instant.now())
add project.version.toString().replaceAll('(\\d+\\.\\d+).+', '$1')
}
}
container {
jvmFlags = [
'-Xms512m',
// see https://github.com/apache/pulsar/issues/20282
"--add-opens=java.base/sun.net=ALL-UNNAMED"
]
mainClass = 'io.emeraldpay.dshackle.archive.AppKt'
ports = []
}
}