Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
[gg] update api-common to 1.9.2, auto-value to 1.7.2, and guava to 29…
Browse files Browse the repository at this point in the history
….0-jre (#3204)

* chore: update api-common to 1.9.1, auto-value to 1.7.2, and guava to 28.2

* fix: update guava to 29.0-jre and fix tests

* fix: add guava failureaccess dep

* fix: update to api-common=java 1.9.2
  • Loading branch information
miraleung committed Jun 4, 2020
1 parent bdaf640 commit 7bc867f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
11 changes: 7 additions & 4 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ _COMPILE_DEPS = [
"@com_google_code_findbugs_jsr305//jar",
"@com_google_code_gson_gson//jar",
"@com_google_guava_guava__com_google_api_codegen//jar",
"@com_google_guava_failureaccess//jar",
"@com_google_inject_guice//jar",
"@com_google_protobuf//:protobuf_java",
"@com_google_protobuf//:protobuf_java_util",
Expand Down Expand Up @@ -78,18 +79,20 @@ proto_library(
proto_library(
name = "grpc_service_config_proto",
srcs = ["src/main/proto/com/google/api/codegen/grpc/service_config.proto"],
deps = ["@com_google_protobuf//:wrappers_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_googleapis//google/rpc:code_proto"],
deps = [
"@com_google_googleapis//google/rpc:code_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:wrappers_proto",
],
)

java_proto_library(
name = "config_java_proto",
deps = [
":config_proto",
":config_v2_proto",
":grpc_service_config_proto",
":sample_config_proto",
":grpc_service_config_proto"
],
)

Expand Down
9 changes: 5 additions & 4 deletions dependencies.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ maven.com_atlassian_commonmark_commonmark=com.atlassian.commonmark:commonmark:0.
maven.com_fasterxml_jackson_core_jackson_annotations=com.fasterxml.jackson.core:jackson-annotations:2.9.0
maven.com_fasterxml_jackson_core_jackson_core=com.fasterxml.jackson.core:jackson-core:2.9.0
maven.com_fasterxml_jackson_core_jackson_databind=com.fasterxml.jackson.core:jackson-databind:2.9.0
maven.com_google_api_api_common=com.google.api:api-common:1.7.0
maven.com_google_api_api_common=com.google.api:api-common:1.9.2
maven.com_google_api_api_compiler=com.google.api:api-compiler:0.0.8
maven.com_google_api_grpc_proto_google_common_protos__com_google_api_codegen=com.google.api.grpc:proto-google-common-protos:1.17.0
maven.com_google_auto_value_auto_value=com.google.auto.value:auto-value:1.6
maven.com_google_auto_value_auto_value_annotations=com.google.auto.value:auto-value-annotations:1.6
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_findbugs_jsr305=com.google.code.findbugs:jsr305:3.0.0
maven.com_google_code_gson_gson=com.google.code.gson:gson:2.7
maven.com_google_guava_guava__com_google_api_codegen=com.google.guava:guava:26.0-jre
maven.com_google_guava_guava__com_google_api_codegen=com.google.guava:guava:29.0-jre
maven.com_google_guava_failureaccess=com.google.guava:failureaccess:1.0.1
maven.com_google_inject_guice=com.google.inject:guice:4.0
maven.commons_cli_commons_cli=commons-cli:commons-cli:1.4
maven.io_grpc_grpc_core=io.grpc:grpc-core:1.23.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ google-appengine-v1_version:

api_common_version:
java:
lower: '1.6.0'
lower: '1.9.2'

# Dependencies of helper packages used by SampleGen only

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,30 @@ public class ResourceNamePatternConfigTest {

@Test
public void testIsFixedPattern() {
assertThat(new ResourceNamePatternConfig("_deleted_topic_").isFixedPattern()).isEqualTo(true);
assertThat(new ResourceNamePatternConfig("_deleted-topic_").isFixedPattern()).isEqualTo(true);
assertThat(new ResourceNamePatternConfig("states/{state}/cities/{city}").isFixedPattern())
.isEqualTo(false);
}

@Test
public void testGetCreateMethodName() {
assertThat(new ResourceNamePatternConfig("_deleted_topic_").getCreateMethodName())
assertThat(new ResourceNamePatternConfig("_deleted-topic_").getCreateMethodName())
.isEqualTo("ofDeletedTopicName");
assertThat(new ResourceNamePatternConfig("states/{state}/cities/{city}").getCreateMethodName())
.isEqualTo("ofStateCityName");
}

@Test
public void testGetBindingVariables() {
assertThat(new ResourceNamePatternConfig("_deleted_topic_").getBindingVariables()).isEmpty();
assertThat(new ResourceNamePatternConfig("_deleted-topic_").getBindingVariables()).isEmpty();
assertThat(new ResourceNamePatternConfig("states/{state}/cities/{city}").getBindingVariables())
.containsExactly("state", "city");
}

@Test
public void testGetPatternId() {
ResourceNamePatternConfig pattern;
pattern = new ResourceNamePatternConfig("_deleted_topic");
pattern = new ResourceNamePatternConfig("_deleted-topic_");
assertThat(pattern.getPatternId()).isEqualTo("deleted_topic");
pattern = new ResourceNamePatternConfig("states/{state}/cities/{city}");
assertThat(pattern.getPatternId()).isEqualTo("state_city");
Expand Down

0 comments on commit 7bc867f

Please sign in to comment.