-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·108 lines (95 loc) · 3.6 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
plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'maven-publish'
id 'java-library'
id 'me.qoomon.git-versioning' version '4.3.0'
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
repositories {
mavenCentral()
mavenLocal()
}
group = "com.github.vinted"
gitVersioning.apply {
tag {
pattern = '(?<tagVersion>\\d+\\.\\d+\\.\\d+$)'
versionFormat = '${tagVersion}'
}
branch {
pattern = '.+'
versionFormat = '${branch}-SNAPSHOT'
}
preferTags = false
}
ext {
flinkVersion = '1.18.1'
bigqueryVersion = '2.36.0'
bigqueryStorageVersion = '3.2.0'
json4sVersion = '4.0.3'
}
dependencies {
// Flink provided dependencies
compileOnly "org.apache.flink:flink-connector-base:$flinkVersion"
compileOnly "org.apache.flink:flink-streaming-java:$flinkVersion"
compileOnly "org.apache.flink:flink-core:$flinkVersion"
implementation "com.google.cloud:google-cloud-bigquery:$bigqueryVersion"
implementation "com.google.cloud:google-cloud-bigquerystorage:$bigqueryStorageVersion"
testImplementation platform('org.junit:junit-bom:5.9.1')
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
testImplementation 'org.mockito:mockito-junit-jupiter:4.11.0'
testImplementation "org.assertj:assertj-core:3.24.0"
testImplementation "org.apache.flink:flink-connector-base:$flinkVersion"
testImplementation "org.mockito:mockito-inline:4.7.0"
testImplementation "org.apache.flink:flink-test-utils:$flinkVersion"
testImplementation 'commons-io:commons-io:2.11.0'
}
jar {
archiveClassifier.set("slim")
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
shadowJar {
archiveClassifier.set('')
relocate 'io.grpc', 'com.vinted.flink.bigquery.shaded.io.grpc'
relocate 'io.netty', 'com.vinted.flink.bigquery.shaded.io.netty'
mergeServiceFiles()
}
publishing {
publications {
java(MavenPublication) {
artifactId = project.name
artifact shadowJar
}
}
}
tasks.withType(Test).configureEach {
doFirst {
jvmArgs = [
'--add-exports=java.base/sun.net.util=ALL-UNNAMED',
'--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED',
'--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED',
'--add-opens=java.base/java.lang=ALL-UNNAMED',
'--add-opens=java.base/java.net=ALL-UNNAMED',
'--add-opens=java.base/java.io=ALL-UNNAMED',
'--add-opens=java.base/java.nio=ALL-UNNAMED',
'--add-opens=java.base/sun.nio.ch=ALL-UNNAMED',
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED',
'--add-opens=java.base/java.text=ALL-UNNAMED',
'--add-opens=java.base/java.time=ALL-UNNAMED',
'--add-opens=java.base/java.util=ALL-UNNAMED',
'--add-opens=java.base/java.util.concurrent=ALL-UNNAMED',
'--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED',
'--add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED'
]
}
}