-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
115 lines (95 loc) · 3.2 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
plugins {
// Provide convenience executables for trying out the examples.
id 'application'
// ASSUMES GRADLE 5.6 OR HIGHER. Use plugin version 0.8.10 with earlier gradle versions
id 'com.google.protobuf' version '0.9.1'
// Generate IntelliJ IDEA's .idea & .iml project files
id 'idea'
// Generate standalone executable
id 'org.beryx.runtime' version '1.13.1'
id 'java'
}
repositories {
maven { // The google mirror is less flaky than mavenCentral()
url "https://maven-central.storage-download.googleapis.com/maven2/"
artifactUrls "https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/"
}
mavenCentral()
}
version = '1.0.5'
sourceCompatibility = 1.8
targetCompatibility = 1.8
def grpcVersion = '1.59.1'
def protobufVersion = '3.25.1'
def protocVersion = protobufVersion
dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
compileOnly "org.apache.tomcat:annotations-api:6.0.53"
implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}"
runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}"
implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.1'
implementation "com.fasterxml.jackson.core:jackson-core:2.14.1"
implementation 'com.singlestore:singlestore-jdbc-client:1.2.0'
implementation 'com.opencsv:opencsv:5.8'
implementation 'com.github.luben:zstd-jni:1.5.5-10'
implementation 'commons-cli:commons-cli:1.6.0'
implementation 'ch.qos.logback:logback-core:1.4.14'
implementation 'org.slf4j:slf4j-api:2.0.12'
implementation 'ch.qos.logback:logback-classic:1.4.14'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}
protobuf {
protoc { artifact = "com.google.protobuf:protoc:${protocVersion}" }
plugins {
grpc { artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" }
}
generateProtoTasks {
all()*.plugins { grpc {} }
}
}
// Inform IDEs like IntelliJ IDEA, Eclipse or NetBeans about the generated code.
sourceSets {
main {
java {
srcDirs 'build/generated/source/proto/main/grpc'
srcDirs 'build/generated/source/proto/main/java'
}
}
}
application {
mainClass = 'com.singlestore.fivetran.destination.SingleStoreDestination'
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes(
'Main-Class' : 'com.singlestore.fivetran.destination.SingleStoreDestination'
)
}
from {
configurations.runtimeClasspath.filter{ it.exists() }.collect { it.isDirectory() ? it : zipTree(it) }
}
}
test {
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
}
}
runtime {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
}
task createProperties(dependsOn: processResources) {
doLast {
new File(buildDir, "resources/main/version.properties").withWriter { w ->
Properties p = new Properties()
p['version'] = project.version.toString()
p.store w, null
}
}
}
classes {
dependsOn createProperties
}