-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathbuild.gradle
126 lines (116 loc) · 6.36 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
import java.nio.file.Files
import java.nio.file.Paths
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING
plugins {
id 'java'
id 'idea'
id 'maven-publish'
}
group "org.logstash.outputs"
version Files.readAllLines(Paths.get("version")).first()
repositories {
mavenCentral()
}
dependencies {
// Core dependency for BigQuery clients
implementation "com.google.cloud:google-cloud-bigquery:2.36.0"
implementation "com.fasterxml.jackson.core:jackson-annotations:2.16.0"
implementation "com.fasterxml.jackson.core:jackson-core:2.16.0"
implementation "com.fasterxml.jackson.core:jackson-databind:2.16.0"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.16.0"
implementation "com.google.api-client:google-api-client:2.2.0"
implementation "com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1:2.47.0"
implementation "com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.171.0"
implementation "com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta2:0.171.0"
implementation "com.google.api.grpc:proto-google-cloud-bigquerystorage-v1:2.47.0"
implementation "com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta1:0.171.0"
implementation "com.google.api.grpc:proto-google-cloud-bigquerystorage-v1beta2:0.171.0"
implementation "com.google.api.grpc:proto-google-common-protos:2.30.0"
implementation "com.google.api.grpc:proto-google-iam-v1:1.25.0"
implementation "com.google.api:api-common:2.22.0"
implementation "com.google.api:gax-grpc:2.39.0"
implementation "com.google.api:gax-httpjson:2.39.0"
implementation "com.google.api:gax:2.39.0"
implementation "com.google.apis:google-api-services-bigquery:v2-rev20231111-2.0.0"
implementation "com.google.auth:google-auth-library-credentials:1.21.0"
implementation "com.google.auth:google-auth-library-oauth2-http:1.21.0"
implementation "com.google.auto.value:auto-value:1.10.4"
implementation "com.google.cloud:google-cloud-bigquerystorage:2.47.0"
implementation "com.google.cloud:google-cloud-core-http:2.29.0"
implementation "com.google.cloud:google-cloud-core:2.29.0"
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation "com.google.code.gson:gson:2.10.1"
implementation "com.google.errorprone:error_prone_annotations:2.23.0"
implementation "com.google.flatbuffers:flatbuffers-java:1.12.0"
implementation "com.google.guava:failureaccess:1.0.1"
implementation "com.google.guava:guava:32.1.3-jre"
implementation "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava"
implementation "com.google.http-client:google-http-client-apache-v2:1.43.3"
implementation "com.google.http-client:google-http-client-appengine:1.43.3"
implementation "com.google.http-client:google-http-client-gson:1.43.3"
implementation "com.google.http-client:google-http-client:1.43.3"
implementation "com.google.j2objc:j2objc-annotations:2.8"
implementation "com.google.oauth-client:google-oauth-client:1.34.1"
implementation "com.google.protobuf:protobuf-java-util:3.25.1"
implementation "com.google.protobuf:protobuf-java:3.25.1"
implementation "commons-codec:commons-codec:1.16.0"
implementation "commons-logging:commons-logging:1.2"
implementation "io.grpc:grpc-alts:1.60.0"
implementation "io.grpc:grpc-api:1.60.0"
implementation "io.grpc:grpc-auth:1.60.0"
implementation "io.grpc:grpc-context:1.60.0"
implementation "io.grpc:grpc-core:1.60.0"
implementation "io.grpc:grpc-grpclb:1.60.0"
implementation "io.grpc:grpc-inprocess:1.60.0"
implementation "io.grpc:grpc-netty-shaded:1.60.0"
implementation "io.grpc:grpc-protobuf-lite:1.60.0"
implementation "io.grpc:grpc-protobuf:1.60.0"
implementation "io.grpc:grpc-stub:1.60.0"
implementation "io.grpc:grpc-util:1.60.0"
implementation "io.netty:netty-common:4.1.96.Final"
implementation "io.opencensus:opencensus-api:0.31.1"
implementation "io.opencensus:opencensus-contrib-http-util:0.31.1"
implementation "javax.annotation:javax.annotation-api:1.3.2"
implementation "org.apache.arrow:arrow-format:14.0.2"
implementation "org.apache.arrow:arrow-memory-core:14.0.2"
implementation "org.apache.arrow:arrow-vector:14.0.2"
implementation "org.apache.httpcomponents:httpclient:4.5.14"
implementation "org.apache.httpcomponents:httpcore:4.4.16"
implementation "org.checkerframework:checker-compat-qual:2.5.6"
implementation "org.checkerframework:checker-qual:3.40.0"
implementation "org.conscrypt:conscrypt-openjdk-uber:2.5.2"
implementation "org.json:json:20231013"
implementation "org.slf4j:slf4j-api:1.7.25"
implementation "org.threeten:threeten-extra:1.7.2"
implementation "org.threeten:threetenbp:1.6.8"
}
task generateGemJarRequiresFile {
doLast {
File jars_file = file('lib/logstash-output-google_bigquery_jars.rb')
jars_file.newWriter().withWriter { w ->
w << "# AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.\n\n"
w << "require \'jar_dependencies\'\n"
configurations.runtimeClasspath.allDependencies.each {
w << "require_jar(\'${it.group}\', \'${it.name}\', \'${it.version}\')\n"
}
w << "require_jar(\'${project.group}\', \'${project.name}\', \'${project.version}\')\n"
}
}
}
task vendor {
doLast {
String vendorPathPrefix = "vendor/jar-dependencies"
configurations.runtimeClasspath.allDependencies.each { dep ->
File f = configurations.runtimeClasspath.filter { it.absolutePath.contains("${dep.group}/${dep.name}/${dep.version}") }.singleFile
String groupPath = dep.group.replaceAll('\\.', '/')
File newJarFile = file("${vendorPathPrefix}/${groupPath}/${dep.name}/${dep.version}/${dep.name}-${dep.version}.jar")
newJarFile.mkdirs()
Files.copy(f.toPath(), newJarFile.toPath(), REPLACE_EXISTING)
}
String projectGroupPath = project.group.replaceAll('\\.', '/')
File projectJarFile = file("${vendorPathPrefix}/${projectGroupPath}/${project.name}/${project.version}/${project.name}-${project.version}.jar")
projectJarFile.mkdirs()
Files.copy(file("$buildDir/libs/${project.name}-${project.version}.jar").toPath(), projectJarFile.toPath(), REPLACE_EXISTING)
}
}
vendor.dependsOn(jar, generateGemJarRequiresFile)