Skip to content

Commit

Permalink
deps: upgrade gax to 2.7.1, protobuf to 3.19.1, grpc to 1.42.1, and t…
Browse files Browse the repository at this point in the history
…ruth to 1.1.2, upgrade Bazel in GitHub Actions, and fix build error (#875)

* chore: upgrade protobuf and grpc, and fix build error
* chore: fix build
* chore: re-order load
* chore: upgrade gax
* chore: upgrade google truth
* chore: upgrade bazel
  • Loading branch information
chanseokoh committed Dec 3, 2021
1 parent 7c76256 commit 78d9147
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 14 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yaml
Expand Up @@ -7,11 +7,6 @@ name: ci
jobs:
build:
runs-on: ubuntu-latest
container: gcr.io/gapic-images/googleapis-bazel:20210105
# Dockerfile for this image: https://github.com/googleapis/googleapis-discovery/blob/main/Dockerfile
# If you update its version, please also update it below in
# 'Cache Bazel files' - unfortunately it cannot accept variables at this
# time.

strategy:
matrix:
Expand All @@ -28,7 +23,7 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.cache/bazel
key: ${{ runner.os }}-bazel-20210105-${{ secrets.CACHE_VERSION }}
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}

- name: Bazel Cache Not Found
if: steps.cache-bazel.outputs.cache-hit != 'true'
Expand Down
24 changes: 22 additions & 2 deletions WORKSPACE
Expand Up @@ -33,7 +33,7 @@ jvm_maven_import_external(
# which in its turn, prioritizes actual generated clients runtime dependencies
# over the generator dependencies.

_gax_java_version = "2.7.0"
_gax_java_version = "2.7.1"

http_archive(
name = "com_google_api_gax_java",
Expand Down Expand Up @@ -65,7 +65,27 @@ load("//:repositories.bzl", "gapic_generator_java_repositories")
gapic_generator_java_repositories()

# protobuf
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
RULES_JVM_EXTERNAL_TAG = "4.2"
RULES_JVM_EXTERNAL_SHA = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca"

http_archive(
name = "rules_jvm_external",
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
sha256 = RULES_JVM_EXTERNAL_SHA,
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
)

load("@com_google_protobuf//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS", "protobuf_deps")

load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
artifacts = PROTOBUF_MAVEN_ARTIFACTS,
generate_compat_repositories = True,
repositories = [
"https://repo.maven.apache.org/maven2/",
],
)

protobuf_deps()

Expand Down
8 changes: 4 additions & 4 deletions dependencies.properties
Expand Up @@ -7,19 +7,19 @@
# Target workspace name: gapic_generator_java

# Versions only, for dependencies which actual artifacts differ between Bazel and Gradle
version.com_google_protobuf=3.15.8
version.com_google_protobuf=3.19.1
# Version of google-java-format is downgraded from 1.8 to 1.7, because 1.8 supports java 11 minimum, while our JRE is java 8.
version.google_java_format=1.7
version.com_google_api_common_java=1.9.3
version.io_grpc_java=1.30.2
version.io_grpc_java=1.42.1

# Common deps.
maven.com_google_guava_guava=com.google.guava:guava:30.1-android
maven.com_google_code_findbugs_jsr305=com.google.code.findbugs:jsr305:3.0.0
maven.com_google_auto_value_auto_value=com.google.auto.value:auto-value:1.7.2
maven.com_google_auto_value_auto_value_annotations=com.google.auto.value:auto-value-annotations:1.7.2
maven.com_google_code_gson=com.google.code.gson:gson:2.8.6
maven.com_google_protobuf_protobuf_java=com.google.protobuf:protobuf-java:3.15.8
maven.com_google_protobuf_protobuf_java=com.google.protobuf:protobuf-java:3.19.1
maven.io_github_java_diff_utils=io.github.java-diff-utils:java-diff-utils:4.0
maven.javax_annotation_javax_annotation_api=javax.annotation:javax.annotation-api:1.3.2
maven.javax_validation_javax_validation_api=javax.validation:validation-api:2.0.1.Final
Expand All @@ -37,4 +37,4 @@ maven.junit_junit=junit:junit:4.13.1
maven.org_hamcrest_hamcrest_core=org.hamcrest:hamcrest-core:1.3
maven.org_mockito_mockito_core=org.mockito:mockito-core:2.21.0
# Keep in sync with gax-java.
maven.com_google_truth_truth=com.google.truth:truth:1.0
maven.com_google_truth_truth=com.google.truth:truth:1.1.2
2 changes: 1 addition & 1 deletion repositories.bzl
Expand Up @@ -109,7 +109,7 @@ def gapic_generator_java_repositories():
)

# grpc-proto doesn't have releases, so we use hashes instead.
_io_grpc_proto_prefix = "0020624375a8ee4c7dd9b3e513e443b90bc28990" # Aug. 20, 2020.
_io_grpc_proto_prefix = "8e3fec8612bc0708e857950dccadfd5063703e04" # Nov. 6, 2021.
_maybe(
http_archive,
name = "io_grpc_proto",
Expand Down
Expand Up @@ -474,7 +474,7 @@ private MethodInvocationExpr getExpr(VariableExpr var, String num) {
private List<Expr> setOperationSnapshotFactoryExpr(
Method protoMethod, Map<String, Message> messageTypes) {

// Generate input varibles for create()
// Generate input variables for create()
VariableExpr requestVarExpr =
VariableExpr.withVariable(
Variable.builder().setType(protoMethod.inputType()).setName("request").build());
Expand Down

0 comments on commit 78d9147

Please sign in to comment.