-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
115 lines (106 loc) · 5.64 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
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.inputs"
version Files.readAllLines(Paths.get("version")).first()
repositories {
mavenCentral()
}
dependencies {
// Core dependency for Logstash Output Google Cloud Storage
implementation "com.google.cloud:google-cloud-storage:2.26.1"
implementation "com.fasterxml.jackson.core:jackson-core:2.15.2"
implementation "com.google.android:annotations:4.1.1.4"
implementation "com.google.api-client:google-api-client:2.2.0"
implementation "com.google.api.grpc:gapic-google-cloud-storage-v2:2.26.1-alpha"
implementation "com.google.api.grpc:grpc-google-cloud-storage-v2:2.26.1-alpha"
implementation "com.google.api.grpc:proto-google-cloud-storage-v2:2.26.1-alpha"
implementation "com.google.api.grpc:proto-google-common-protos:2.23.0"
implementation "com.google.api.grpc:proto-google-iam-v1:1.18.0"
implementation "com.google.api:api-common:2.15.0"
implementation "com.google.api:gax-grpc:2.32.0"
implementation "com.google.api:gax-httpjson:2.32.0"
implementation "com.google.api:gax:2.32.0"
implementation "com.google.apis:google-api-services-storage:v1-rev20230617-2.0.0"
implementation "com.google.auth:google-auth-library-credentials:1.19.0"
implementation "com.google.auth:google-auth-library-oauth2-http:1.19.0"
implementation "com.google.auto.value:auto-value-annotations:1.10.2"
implementation "com.google.cloud:google-cloud-core-grpc:2.22.0"
implementation "com.google.cloud:google-cloud-core-http:2.22.0"
implementation "com.google.cloud:google-cloud-core:2.22.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.18.0"
implementation "com.google.guava:failureaccess:1.0.1"
implementation "com.google.guava:guava:32.1.2-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-jackson2: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.23.2"
implementation "com.google.protobuf:protobuf-java:3.23.2"
implementation "com.google.re2j:re2j:1.7"
implementation "commons-codec:commons-codec:1.15"
implementation "io.grpc:grpc-alts:1.56.1"
implementation "io.grpc:grpc-api:1.56.1"
implementation "io.grpc:grpc-auth:1.56.1"
implementation "io.grpc:grpc-context:1.56.1"
implementation "io.grpc:grpc-core:1.56.1"
implementation "io.grpc:grpc-googleapis:1.56.1"
implementation "io.grpc:grpc-grpclb:1.56.1"
implementation "io.grpc:grpc-netty-shaded:1.56.1"
implementation "io.grpc:grpc-protobuf-lite:1.56.1"
implementation "io.grpc:grpc-protobuf:1.56.1"
implementation "io.grpc:grpc-rls:1.56.1"
implementation "io.grpc:grpc-services:1.56.1"
implementation "io.grpc:grpc-stub:1.56.1"
implementation "io.grpc:grpc-xds:1.56.1"
implementation "io.opencensus:opencensus-api:0.31.1"
implementation "io.opencensus:opencensus-contrib-http-util:0.31.1"
implementation "io.opencensus:opencensus-proto:0.2.0"
implementation "io.perfmark:perfmark-api:0.26.0"
implementation "javax.annotation:javax.annotation-api:1.3.2"
implementation "org.checkerframework:checker-qual:3.33.0"
implementation "org.codehaus.mojo:animal-sniffer-annotations:1.23"
implementation "org.conscrypt:conscrypt-openjdk-uber:2.5.2"
implementation "org.threeten:threetenbp:1.6.8"
}
task generateGemJarRequiresFile {
doLast {
File jars_file = file('lib/logstash-input-google_cloud_storage_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)