Skip to content

Commit d825997

Browse files
Merge branch 'main' into renovate/com.google.googlejavaformat-google-java-format-1.x
2 parents acf5a8e + 510a887 commit d825997

36 files changed

+1064
-270
lines changed

.cloudbuild/library_generation/library_generation.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ FROM gcr.io/cloud-devrel-public-resources/python
1717

1818
# install tools
1919
RUN apt-get update && apt-get install -y \
20-
unzip openjdk-17-jdk rsync maven \
20+
unzip openjdk-17-jdk rsync maven jq \
2121
&& apt-get clean
2222

2323
COPY library_generation /src

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ jobs:
327327
run: |
328328
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
329329
- name: Validate gapic-generator-java-bom
330-
uses: googleapis/java-cloud-bom/tests/validate-bom@ac9893c4ba759cda192b11c2e8bac0d5a6bd60a5
330+
uses: googleapis/java-cloud-bom/tests/validate-bom@3f93d58a049cf6089a930c55cc23ff0c0869a12f
331331
with:
332332
bom-path: gapic-generator-java-bom/pom.xml
333333

.github/workflows/verify_library_generation.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
java: [ 11 ]
1616
runs-on: ubuntu-22.04
1717
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-java@v3
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-java@v4
2020
with:
2121
java-version: ${{ matrix.java }}
2222
distribution: temurin
2323
cache: maven
24-
- uses: actions/setup-python@v4
24+
- uses: actions/setup-python@v5
2525
with:
2626
python-version: 3.11
2727
- name: install pyenv
@@ -58,14 +58,14 @@ jobs:
5858
os: [ ubuntu-22.04, macos-12 ]
5959
runs-on: ${{ matrix.os }}
6060
steps:
61-
- uses: actions/checkout@v3
61+
- uses: actions/checkout@v4
6262
- name: install utils (macos)
6363
if: matrix.os == 'macos-12'
6464
shell: bash
6565
run: |
6666
brew update --preinstall
6767
brew install coreutils
68-
- uses: actions/setup-python@v4
68+
- uses: actions/setup-python@v5
6969
with:
7070
python-version: 3.11
7171
- name: install python dependencies
@@ -97,11 +97,11 @@ jobs:
9797
- name: Run python unit tests
9898
run: |
9999
set -x
100-
python -m unittest library_generation/test/unit_tests.py
100+
python -m unittest discover -s library_generation/test/ -p "*unit_tests.py"
101101
lint-shell:
102102
runs-on: ubuntu-22.04
103103
steps:
104-
- uses: actions/checkout@v3
104+
- uses: actions/checkout@v4
105105
- name: Run ShellCheck
106106
uses: ludeeus/[email protected]
107107
with:
@@ -111,7 +111,7 @@ jobs:
111111
lint-python:
112112
runs-on: ubuntu-22.04
113113
steps:
114-
- uses: actions/checkout@v3
114+
- uses: actions/checkout@v4
115115
- name: install python dependencies
116116
shell: bash
117117
run: |

api-common-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<dependency>
7878
<groupId>com.google.truth</groupId>
7979
<artifactId>truth</artifactId>
80-
<version>1.4.1</version>
80+
<version>1.4.2</version>
8181
<scope>test</scope>
8282
</dependency>
8383
</dependencies>

gapic-generator-java/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@
351351
<plugin>
352352
<groupId>org.apache.maven.plugins</groupId>
353353
<artifactId>maven-shade-plugin</artifactId>
354-
<version>3.5.1</version>
354+
<version>3.5.2</version>
355355
<executions>
356356
<execution>
357357
<phase>package</phase>
@@ -467,7 +467,7 @@
467467
<dependency>
468468
<groupId>com.google.truth</groupId>
469469
<artifactId>truth</artifactId>
470-
<version>1.4.1</version>
470+
<version>1.4.2</version>
471471
<scope>test</scope>
472472
</dependency>
473473
<dependency>

gax-java/dependencies.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ version.io_grpc=1.62.2
3535
# It should be constructed the following way:
3636
# 1) Take full artifact id (including the group and classifier (if any) portions) and remove version portion.
3737
# 2) Replace all characters which are neither alphabetic nor digits with the underscore ('_') character
38-
maven.com_google_api_grpc_proto_google_common_protos=com.google.api.grpc:proto-google-common-protos:2.33.0
39-
maven.com_google_api_grpc_grpc_google_common_protos=com.google.api.grpc:grpc-google-common-protos:2.33.0
38+
maven.com_google_api_grpc_proto_google_common_protos=com.google.api.grpc:proto-google-common-protos:2.34.0
39+
maven.com_google_api_grpc_grpc_google_common_protos=com.google.api.grpc:grpc-google-common-protos:2.34.0
4040
maven.com_google_auth_google_auth_library_oauth2_http=com.google.auth:google-auth-library-oauth2-http:1.23.0
4141
maven.com_google_auth_google_auth_library_credentials=com.google.auth:google-auth-library-credentials:1.23.0
4242
maven.io_opencensus_opencensus_api=io.opencensus:opencensus-api:0.31.1
@@ -66,10 +66,10 @@ maven.com_google_errorprone_error_prone_annotations=com.google.errorprone:error_
6666
maven.com_google_j2objc_j2objc_annotations=com.google.j2objc:j2objc-annotations:2.8
6767
maven.com_google_auto_value_auto_value=com.google.auto.value:auto-value:1.10.4
6868
maven.com_google_auto_value_auto_value_annotations=com.google.auto.value:auto-value-annotations:1.10.4
69-
maven.com_google_api_api_common=com.google.api:api-common:2.25.0
69+
maven.com_google_api_api_common=com.google.api:api-common:2.26.0
7070
maven.org_threeten_threetenbp=org.threeten:threetenbp:1.6.8
71-
maven.com_google_api_grpc_grpc_google_iam_v1=com.google.api.grpc:grpc-google-iam-v1:1.28.0
72-
maven.com_google_api_grpc_proto_google_iam_v1=com.google.api.grpc:proto-google-iam-v1:1.28.0
71+
maven.com_google_api_grpc_grpc_google_iam_v1=com.google.api.grpc:grpc-google-iam-v1:1.29.0
72+
maven.com_google_api_grpc_proto_google_iam_v1=com.google.api.grpc:proto-google-iam-v1:1.29.0
7373
maven.com_google_http_client_google_http_client=com.google.http-client:google-http-client:1.44.1
7474
maven.com_google_http_client_google_http_client_gson=com.google.http-client:google-http-client-gson:1.44.1
7575
maven.org_codehaus_mojo_animal_sniffer_annotations=org.codehaus.mojo:animal-sniffer-annotations:1.23
@@ -80,7 +80,7 @@ maven.org_graalvm_sdk=org.graalvm.sdk:graal-sdk:22.3.5
8080
maven.junit_junit=junit:junit:4.13.2
8181
maven.org_mockito_mockito_core=org.mockito:mockito-core:2.28.2
8282
maven.org_hamcrest_hamcrest_core=org.hamcrest:hamcrest-core:1.3
83-
maven.com_google_truth_truth=com.google.truth:truth:1.4.1
83+
maven.com_google_truth_truth=com.google.truth:truth:1.4.2
8484
maven.com_googlecode_java_diff_utils_diffutils=com.googlecode.java-diff-utils:diffutils:1.3.0
8585
maven.net_bytebuddy_byte_buddy=net.bytebuddy:byte-buddy:1.14.11
8686
maven.org_objenesis_objenesis=org.objenesis:objenesis:2.6

gax-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
<dependency>
177177
<groupId>com.google.truth</groupId>
178178
<artifactId>truth</artifactId>
179-
<version>1.4.1</version>
179+
<version>1.4.2</version>
180180
<exclusions>
181181
<exclusion>
182182
<groupId>org.checkerframework</groupId>

java-common-protos/.OwlBot.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,20 @@ deep-copy-regex:
2828
- source: "/google/cloud/audit/google-cloud-audit-java/proto-google-cloud-audit-java/src"
2929
dest: "/owl-bot-staging/java-common-protos/v1/proto-google-common-protos/src"
3030

31+
# For geo common protos
3132
- source: "/google/geo/type/google-geo-type-java/proto-google-geo-type-java/src"
3233
dest: "/owl-bot-staging/java-common-protos/v1/proto-google-common-protos/src"
3334

35+
# For shopping common protos
36+
- source: "/google/shopping/merchant/reports/v1beta/google-cloud-merchant-reports-v1beta-java"
37+
dest: "/owl-bot-staging/java-common-protos/v1/proto-google-common-protos/src"
38+
39+
# It is only used once in https://github.com/googleapis/googleapis/blob/master/google/chat/v1/BUILD.bazel#L47,
40+
# and technically not a common proto, maybe a violation of AIP-215 if it is not.
41+
# However, it's better to put it here so that we don't have to manually add it to BUILD.bazel file and hermetic build scripts.
42+
- source: "/google/apps/card/v1/google-apps-card-v1-java/proto-google-apps-card-v1-java"
43+
dest: "/owl-bot-staging/java-common-protos/v1/proto-google-common-protos/src"
44+
3445
- source: "/google/logging/type/google-logging-type-java/proto-google-logging-type-java/src"
3546
dest: "/owl-bot-staging/java-common-protos/v1/proto-google-common-protos/src"
3647

java-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<dependency>
4848
<groupId>com.google.truth</groupId>
4949
<artifactId>truth</artifactId>
50-
<version>1.4.1</version>
50+
<version>1.4.2</version>
5151
<scope>test</scope>
5252
<exclusions>
5353
<exclusion>

java-shared-dependencies/unmanaged-dependency-check/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<dependency>
6868
<groupId>com.google.truth</groupId>
6969
<artifactId>truth</artifactId>
70-
<version>1.4.1</version>
70+
<version>1.4.2</version>
7171
<scope>test</scope>
7272
</dependency>
7373
<dependency>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
import click as click
15+
16+
from library_generation.utils.pom_generator import generate_gapic_bom
17+
from library_generation.utils.pom_generator import generate_root_pom
18+
19+
20+
@click.group(invoke_without_command=False)
21+
@click.pass_context
22+
@click.version_option(message="%(version)s")
23+
def main(ctx):
24+
pass
25+
26+
27+
@main.command()
28+
@click.option(
29+
"--repository-path",
30+
required=True,
31+
type=str,
32+
help="""
33+
Path to which the generated pom.xml goes.
34+
""",
35+
)
36+
@click.option(
37+
"--versions-file",
38+
required=True,
39+
type=str,
40+
help="""
41+
The file containing version of libraries.
42+
Throw FileNotFoundError if the file doesn't exist.
43+
""",
44+
)
45+
def generate(repository_path: str, versions_file: str) -> None:
46+
generate_gapic_bom(repository_path=repository_path, versions_file=versions_file)
47+
48+
49+
if __name__ == "__main__":
50+
main()
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
import click as click
15+
from library_generation.utils.pom_generator import generate_root_pom
16+
17+
18+
@click.group(invoke_without_command=False)
19+
@click.pass_context
20+
@click.version_option(message="%(version)s")
21+
def main(ctx):
22+
pass
23+
24+
25+
@main.command()
26+
@click.option(
27+
"--repository-path",
28+
required=True,
29+
type=str,
30+
help="""
31+
Path to which the generated pom.xml goes.
32+
""",
33+
)
34+
def generate(repository_path: str) -> None:
35+
generate_root_pom(repository_path=repository_path)
36+
37+
38+
if __name__ == "__main__":
39+
main()

library_generation/configuration/owlbot-cli-sha

Lines changed: 0 additions & 2 deletions
This file was deleted.

library_generation/configuration/python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

library_generation/configuration/synthtool-commitish

Lines changed: 0 additions & 1 deletion
This file was deleted.

library_generation/generate_library.sh

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,6 @@ case "${proto_path}" in
175175
removed_proto="google/rpc/http.proto"
176176
proto_files="${proto_files//${removed_proto}/}"
177177
;;
178-
"google/shopping"*)
179-
# this proto is included in //google/shopping/css/v1:google-cloud-shopping-css-v1-java
180-
# and //google/shopping/merchant/inventories/v1beta:google-cloud-merchant-inventories-v1beta-java
181-
# and //google/shopping/merchant/reports/v1beta:google-cloud-merchant-reports-v1beta-java
182-
proto_files="${proto_files} google/shopping/type/types.proto"
183-
;;
184178
esac
185179
# download gapic-generator-java, protobuf and grpc plugin.
186180
download_tools "${gapic_generator_version}" "${protobuf_version}" "${grpc_version}" "${os_architecture}"
@@ -284,8 +278,7 @@ case "${proto_path}" in
284278
esac
285279
# copy proto files to proto-*/src/main/proto
286280
for proto_src in ${proto_files}; do
287-
if [[ "${proto_src}" == "google/cloud/common/operation_metadata.proto" ]] ||
288-
[[ "${proto_src}" == "google/shopping/type/types.proto" ]]; then
281+
if [[ "${proto_src}" == "google/cloud/common/operation_metadata.proto" ]]; then
289282
continue
290283
fi
291284
mkdir -p "${temp_destination_path}/proto-${folder_name}/src/main/proto"

0 commit comments

Comments
 (0)