Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Gradle to 7.4 and Bigquery client to 1.137.2 #67

Merged
merged 7 commits into from
Sep 23, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
import:
- logstash-plugins/.ci:travis/travis.yml@1.x
- logstash-plugins/.ci:travis/defaults.yml@1.x
- logstash-plugins/.ci:travis/exec.yml@1.x

env:
jobs:
# lock on version 8.x because use of Guava 26+ available from 8.2.0
- ELASTIC_STACK_VERSION=8.x DOCKER_ENV=dockerjdk17.env
- SNAPSHOT=true ELASTIC_STACK_VERSION=8.x DOCKER_ENV=dockerjdk17.env
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 4.1.6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do a minor update and explicitly call out the requirement for logstash version

- Updated Google Cloud Storage client library [#67](https://github.com/logstash-plugins/logstash-output-google_bigquery/pull/67)

## 4.1.5
- [DOC] Updated links to use shared attributes [#61](https://github.com/logstash-plugins/logstash-output-google_bigquery/pull/61)

Expand Down
92 changes: 52 additions & 40 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,55 +1,62 @@
import java.nio.file.Files
import java.nio.file.Paths

import static java.nio.file.StandardCopyOption.REPLACE_EXISTING

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven-publish'

group "org.logstash.outputs"
version Files.readAllLines(Paths.get("version")).first()

repositories {
mavenCentral()
}


dependencies {
// Core dependency for BigQuery clients
compile "com.google.cloud:google-cloud-bigquery:1.24.1"
implementation "com.google.cloud:google-cloud-bigquery:1.137.2"

// Dependencies of com.google.cloud:google-cloud-bigquery:1.24.1
compile "com.fasterxml.jackson.core:jackson-core:2.1.3"
compile "com.google.api:api-common:1.5.0"
compile "com.google.api-client:google-api-client:1.23.0"
compile "com.google.api:gax:1.23.0"
compile "com.google.api:gax-httpjson:0.40.0"
compile "com.google.api.grpc:proto-google-common-protos:1.7.0"
compile "com.google.api.grpc:proto-google-iam-v1:0.8.0"
compile "com.google.apis:google-api-services-bigquery:v2-rev377-1.23.0"
compile "com.google.auth:google-auth-library-credentials:0.9.0"
compile "com.google.auth:google-auth-library-oauth2-http:0.9.0"
compile "com.google.auto.value:auto-value:1.4"
compile "com.google.cloud:google-cloud-core:1.24.1"
compile "com.google.cloud:google-cloud-core-http:1.24.1"
compile "com.google.code.findbugs:jsr305:3.0.1"
compile "com.google.code.gson:gson:2.7"
compile "com.google.errorprone:error_prone_annotations:2.2.0"
compile "com.google.guava:guava:20.0"
compile "com.google.http-client:google-http-client:1.23.0"
compile "com.google.http-client:google-http-client-appengine:1.23.0"
compile "com.google.http-client:google-http-client-jackson:1.23.0"
compile "com.google.http-client:google-http-client-jackson2:1.23.0"
compile "com.google.oauth-client:google-oauth-client:1.23.0"
compile "com.google.protobuf:protobuf-java:3.5.1"
compile "com.google.protobuf:protobuf-java-util:3.5.1"
compile "commons-codec:commons-codec:1.9"
compile "commons-logging:commons-logging:1.2"
compile "io.grpc:grpc-context:1.9.0"
compile "io.opencensus:opencensus-api:0.11.1"
compile "io.opencensus:opencensus-contrib-http-util:0.11.1"
compile "joda-time:joda-time:2.9.2"
compile "org.apache.httpcomponents:httpclient:4.5.2"
compile "org.apache.httpcomponents:httpcore:4.4.4"
compile "org.codehaus.jackson:jackson-core-asl:1.9.11"
compile "org.threeten:threetenbp:1.3.3"
implementation "com.google.cloud:google-cloud-core:2.0.2"
implementation "com.google.protobuf:protobuf-java-util:3.17.3"
implementation "com.google.code.gson:gson:2.8.7"
implementation "com.google.api.grpc:proto-google-common-protos:2.3.2"
implementation "com.google.api.grpc:proto-google-iam-v1:1.0.14"
implementation "com.google.auth:google-auth-library-credentials:1.0.0"
implementation "com.google.http-client:google-http-client-gson:1.39.2"
implementation "com.google.protobuf:protobuf-java:3.17.3"
implementation "com.google.cloud:google-cloud-core-http:2.0.2"
implementation "com.google.api-client:google-api-client:1.32.1"
implementation "com.google.oauth-client:google-oauth-client:1.31.5"
implementation "com.google.http-client:google-http-client-apache-v2:1.39.2"
implementation "com.google.http-client:google-http-client-appengine:1.39.2"
implementation "com.google.api:gax-httpjson:0.85.0"
implementation "io.opencensus:opencensus-api:0.28.0"
implementation "io.grpc:grpc-context:1.39.0"
implementation "io.opencensus:opencensus-contrib-http-util:0.28.0"
implementation "com.google.http-client:google-http-client-jackson2:1.39.2"
implementation "com.fasterxml.jackson.core:jackson-core:2.13.3"
implementation "com.google.http-client:google-http-client:1.39.2"
implementation "org.apache.httpcomponents:httpclient:4.5.13"
implementation "commons-logging:commons-logging:1.2"
implementation "commons-codec:commons-codec:1.15"
implementation "org.apache.httpcomponents:httpcore:4.4.14"
implementation "com.google.j2objc:j2objc-annotations:1.3"
implementation "org.checkerframework:checker-compat-qual:2.5.5"
implementation "com.google.auth:google-auth-library-oauth2-http:1.0.0"
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation "com.google.apis:google-api-services-bigquery:v2-rev20210726-1.32.1"
implementation "com.google.api:api-common:2.0.0"
implementation "javax.annotation:javax.annotation-api:1.3.2"
implementation "com.google.guava:guava:30.1.1-jre"
implementation "com.google.guava:failureaccess:1.0.1"
implementation "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava"
implementation "org.checkerframework:checker-qual:3.8.0"
implementation "com.google.api:gax:2.0.0"
implementation "org.threeten:threetenbp:1.5.1"
implementation "com.google.errorprone:error_prone_annotations:2.8.1"
}

task generateGemJarRequiresFile {
Expand All @@ -58,24 +65,29 @@ task generateGemJarRequiresFile {
jars_file.newWriter().withWriter { w ->
w << "# AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.\n\n"
w << "require \'jar_dependencies\'\n"
configurations.runtime.allDependencies.each {
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.runtime.allDependencies.each { dep ->
File f = configurations.runtime.filter { it.absolutePath.contains("${dep.group}/${dep.name}/${dep.version}") }.singleFile
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(generateGemJarRequiresFile)
vendor.dependsOn(jar, generateGemJarRequiresFile)
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
73 changes: 39 additions & 34 deletions lib/logstash-output-google_bigquery_jars.rb
Original file line number Diff line number Diff line change
@@ -1,38 +1,43 @@
# AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.

require 'jar_dependencies'
require_jar('com.google.cloud', 'google-cloud-bigquery', '1.24.1')
require_jar('com.fasterxml.jackson.core', 'jackson-core', '2.1.3')
require_jar('com.google.api', 'api-common', '1.5.0')
require_jar('com.google.api-client', 'google-api-client', '1.23.0')
require_jar('com.google.api', 'gax', '1.23.0')
require_jar('com.google.api', 'gax-httpjson', '0.40.0')
require_jar('com.google.api.grpc', 'proto-google-common-protos', '1.7.0')
require_jar('com.google.api.grpc', 'proto-google-iam-v1', '0.8.0')
require_jar('com.google.apis', 'google-api-services-bigquery', 'v2-rev377-1.23.0')
require_jar('com.google.auth', 'google-auth-library-credentials', '0.9.0')
require_jar('com.google.auth', 'google-auth-library-oauth2-http', '0.9.0')
require_jar('com.google.auto.value', 'auto-value', '1.4')
require_jar('com.google.cloud', 'google-cloud-core', '1.24.1')
require_jar('com.google.cloud', 'google-cloud-core-http', '1.24.1')
require_jar('com.google.code.findbugs', 'jsr305', '3.0.1')
require_jar('com.google.code.gson', 'gson', '2.7')
require_jar('com.google.errorprone', 'error_prone_annotations', '2.2.0')
require_jar('com.google.guava', 'guava', '20.0')
require_jar('com.google.http-client', 'google-http-client', '1.23.0')
require_jar('com.google.http-client', 'google-http-client-appengine', '1.23.0')
require_jar('com.google.http-client', 'google-http-client-jackson', '1.23.0')
require_jar('com.google.http-client', 'google-http-client-jackson2', '1.23.0')
require_jar('com.google.oauth-client', 'google-oauth-client', '1.23.0')
require_jar('com.google.protobuf', 'protobuf-java', '3.5.1')
require_jar('com.google.protobuf', 'protobuf-java-util', '3.5.1')
require_jar('commons-codec', 'commons-codec', '1.9')
require_jar('com.google.cloud', 'google-cloud-bigquery', '1.137.2')
require_jar('com.google.cloud', 'google-cloud-core', '2.0.2')
require_jar('com.google.protobuf', 'protobuf-java-util', '3.17.3')
require_jar('com.google.code.gson', 'gson', '2.8.7')
require_jar('com.google.api.grpc', 'proto-google-common-protos', '2.3.2')
require_jar('com.google.api.grpc', 'proto-google-iam-v1', '1.0.14')
require_jar('com.google.auth', 'google-auth-library-credentials', '1.0.0')
require_jar('com.google.http-client', 'google-http-client-gson', '1.39.2')
require_jar('com.google.protobuf', 'protobuf-java', '3.17.3')
require_jar('com.google.cloud', 'google-cloud-core-http', '2.0.2')
require_jar('com.google.api-client', 'google-api-client', '1.32.1')
require_jar('com.google.oauth-client', 'google-oauth-client', '1.31.5')
require_jar('com.google.http-client', 'google-http-client-apache-v2', '1.39.2')
require_jar('com.google.http-client', 'google-http-client-appengine', '1.39.2')
require_jar('com.google.api', 'gax-httpjson', '0.85.0')
require_jar('io.opencensus', 'opencensus-api', '0.28.0')
require_jar('io.grpc', 'grpc-context', '1.39.0')
require_jar('io.opencensus', 'opencensus-contrib-http-util', '0.28.0')
require_jar('com.google.http-client', 'google-http-client-jackson2', '1.39.2')
require_jar('com.fasterxml.jackson.core', 'jackson-core', '2.13.3')
require_jar('com.google.http-client', 'google-http-client', '1.39.2')
require_jar('org.apache.httpcomponents', 'httpclient', '4.5.13')
require_jar('commons-logging', 'commons-logging', '1.2')
require_jar('io.grpc', 'grpc-context', '1.9.0')
require_jar('io.opencensus', 'opencensus-api', '0.11.1')
require_jar('io.opencensus', 'opencensus-contrib-http-util', '0.11.1')
require_jar('joda-time', 'joda-time', '2.9.2')
require_jar('org.apache.httpcomponents', 'httpclient', '4.5.2')
require_jar('org.apache.httpcomponents', 'httpcore', '4.4.4')
require_jar('org.codehaus.jackson', 'jackson-core-asl', '1.9.11')
require_jar('org.threeten', 'threetenbp', '1.3.3')
require_jar('commons-codec', 'commons-codec', '1.15')
require_jar('org.apache.httpcomponents', 'httpcore', '4.4.14')
require_jar('com.google.j2objc', 'j2objc-annotations', '1.3')
require_jar('org.checkerframework', 'checker-compat-qual', '2.5.5')
require_jar('com.google.auth', 'google-auth-library-oauth2-http', '1.0.0')
require_jar('com.google.code.findbugs', 'jsr305', '3.0.2')
require_jar('com.google.apis', 'google-api-services-bigquery', 'v2-rev20210726-1.32.1')
require_jar('com.google.api', 'api-common', '2.0.0')
require_jar('javax.annotation', 'javax.annotation-api', '1.3.2')
require_jar('com.google.guava', 'guava', '30.1.1-jre')
require_jar('com.google.guava', 'failureaccess', '1.0.1')
require_jar('com.google.guava', 'listenablefuture', '9999.0-empty-to-avoid-conflict-with-guava')
require_jar('org.checkerframework', 'checker-qual', '3.8.0')
require_jar('com.google.api', 'gax', '2.0.0')
require_jar('org.threeten', 'threetenbp', '1.5.1')
require_jar('com.google.errorprone', 'error_prone_annotations', '2.8.1')
require_jar('org.logstash.outputs', 'logstash-output-google_bigquery', '4.1.6')
5 changes: 3 additions & 2 deletions logstash-output-google_bigquery.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'logstash-output-google_bigquery'
s.version = '4.1.5'
s.version = ::File.read('version').split("\n").first
s.licenses = ['Apache License (2.0)']
s.summary = "Writes events to Google BigQuery"
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
Expand All @@ -19,12 +19,13 @@ Gem::Specification.new do |s|
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }

# Gem dependencies
s.add_runtime_dependency 'logstash-core', '>= 8.3.0'
s.add_runtime_dependency 'logstash-codec-plain'
s.add_runtime_dependency 'mime-types', '~> 2' # last version compatible with ruby 2.x
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"

s.add_development_dependency 'logstash-devutils'
s.add_development_dependency 'jar-dependencies', '~> 0.3.4'
s.add_development_dependency 'jar-dependencies', '~> 0.4'

s.platform = 'java'
end
Expand Down
1 change: 1 addition & 0 deletions version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.1.6