-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.gradle
177 lines (136 loc) · 6.9 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
group 'com.couchbase.qe'
version '1.0.0-alpha.1'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8
repositories {
mavenCentral()
mavenLocal()
jcenter()
maven { url 'http://files.couchbase.com/maven2/' }
maven { url 'https://repo.spring.io/milestone' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
// Pull in any jars in folder 'libs'
flatDir {
dirs 'libs'
}
}
dependencies {
def java_client = "3.6.3"
if (project.hasProperty("client_version")) {
java_client = project.property("client_version")
}
if (java_client != "default") {
println("Using Java_client :: " + java_client)
implementation 'com.couchbase.client:java-client:' + java_client
}
// This will transitively pull in all dependencies of transactions, including Couchbase java-client
// compile group: 'com.couchbase.client', name: 'couchbase-transactions', version: trans_version
// compile group: 'com.couchbase.client', name: 'java-client', version: java_client
// For creating ssh sessions for testing
compile group: 'com.jcraft', name: 'jsch', version: '0.1.54'
// For fetching SDK logs
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.11.1'
// https://mvnrepository.com/artifact/commons-cli/commons-cli
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
// https://mvnrepository.com/artifact/com.azure/azure-storage-blob - Azure blob
compile group: 'com.azure', name: 'azure-storage-blob', version: '12.20.3'
// https://mvnrepository.com/artifact/com.spotify/docker-client
compile group: 'com.spotify', name: 'docker-client', version: '8.16.0'
compile group: 'com.github.javafaker', name: 'javafaker', version: '0.15'
implementation 'dnsjava:dnsjava:3.5.1'
implementation 'org.mongodb:mongodb-driver-sync:4.11.0'
compile group: 'co.elastic.clients' , name: 'elasticsearch-java', version:'8.11.3'
compile group: 'com.fasterxml.jackson.core' , name:'jackson-databind', version:'2.12.3'
// https://mvnrepository.com/artifact/ai.djl.pytorch/pytorch-engine
compile group: 'ai.djl.pytorch', name: 'pytorch-engine', version: '0.25.0'
// https://mvnrepository.com/artifact/ai.djl.huggingface/tokenizers
compile group: 'ai.djl.huggingface', name: 'tokenizers', version: '0.25.0'
// https://mvnrepository.com/artifact/ai.djl.pytorch/pytorch-model-zoo
compile group: 'ai.djl.pytorch', name: 'pytorch-model-zoo', version: '0.25.0'
// https://mvnrepository.com/artifact/org.apache.kafka/kafka-clients
compile group: 'org.apache.kafka', name: 'kafka-clients', version: '3.7.0'
// https://mvnrepository.com/artifact/org.asynchttpclient/async-http-client
compile group: 'org.asynchttpclient', name: 'async-http-client', version: '2.4.5'
// https://mvnrepository.com/artifact/commons-codec/commons-codec
compile group: 'commons-codec', name: 'commons-codec', version: '1.16.0'
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.16.0'
// https://mvnrepository.com/artifact/commons-io/commons-io
compile group: 'commons-io', name: 'commons-io', version: '2.4'
implementation 'io.opentelemetry:opentelemetry-api:1.29.0'
}
task copyDeps(type: Copy) {
from configurations.compileClasspath
into 'jars'
}
task iptables(type:Exec) {
if (project.hasProperty("args") && project.hasProperty("jython")) {
def jythonpath = sourceSets.main.runtimeClasspath.asPath
def jythonLocation = project.property("jython")
def testRunnerArgs = project.property("args").split()
// Add the build output containing the built Java source. Should get this from a gradle variable really but it's
// very unlikely to ever change.
def cmd = [jythonLocation, '-J-cp', jythonpath, 'scripts/ssh.py']
testRunnerArgs.each { cmd.add(it) }
println("Running: " + cmd.join(" "))
commandLine cmd
}
}
task sniffer(type:Exec) {
if (project.hasProperty("args") && project.hasProperty("jython")) {
def jythonpath = sourceSets.main.runtimeClasspath.asPath
def jythonLocation = project.property("jython")
def testRunnerArgs = project.property("args").split()
def cmd = [jythonLocation, '-J-cp', jythonpath, 'scripts/eagles_all_around.py']
testRunnerArgs.each { cmd.add(it) }
println("Running: " + cmd.join(" "))
commandLine cmd
}
}
task install(type:Exec) {
if (project.hasProperty("args") && project.hasProperty("jython")) {
def jythonpath = sourceSets.main.runtimeClasspath.asPath
def jythonLocation = project.property("jython")
def testRunnerArgs = project.property("args").split()
// Add the build output containing the built Java source. Should get this from a gradle variable really but it's
// very unlikely to ever change.
def cmd = [jythonLocation, '-J-cp', jythonpath + ":build/classes/java/main", 'scripts/install.py']
testRunnerArgs.each { cmd.add(it) }
println("Running: " + cmd.join(" "))
commandLine cmd
}
}
tasks.withType(JavaCompile).all {
options.forkOptions.jvmArgs += '-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'
}
// Task that runs "jython testrunner.py" with the correct CLASSPATH
task testrunner(type:Exec) {
if (project.hasProperty("args") && project.hasProperty("jython")) {
def jythonpath = sourceSets.main.runtimeClasspath.asPath
def jythonLocation = project.property("jython")
def testRunnerArgs = project.property("args").split()
// Add the build output containing the built Java source. Should get this from a gradle variable really but it's
// very unlikely to ever change.
def cmd = [jythonLocation, '-J-cp', jythonpath + ":build/classes/java/main:src/main/resources", 'testrunner.py']
testRunnerArgs.each { cmd.add(it) }
println("Running: " + cmd.join(" "))
commandLine cmd
}
}
// This is needed to compile the src folder which will build java doc ops code in TAF
testrunner.dependsOn(compileJava)
task rerun_job(type:Exec) {
if (project.hasProperty("args") && project.hasProperty("jython")) {
def jythonpath = sourceSets.main.runtimeClasspath.asPath
def jythonLocation = project.property("jython")
def rerunArgs = project.property("args").split()
// Add the build output containing the built Java source. Should get this from a gradle variable really but it's
// very unlikely to ever change.
def cmd = [jythonLocation, '-J-cp', jythonpath + ":build/classes/java/main:src/main/resources", 'scripts/rerun_jobs.py']
rerunArgs.each { cmd.add(it) }
println("Running: " + cmd.join(" "))
commandLine cmd
}
}
rerun_job.dependsOn(compileJava)