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

chore: start generating storage v2 gapic #922

Merged
merged 4 commits into from
Aug 11, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
93 changes: 93 additions & 0 deletions gapic-google-cloud-storage-v2/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>gapic-google-cloud-storage-v2</artifactId>
<version>2.0.0-alpha-SNAPSHOT</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
<name>gapic-google-cloud-storage-v2</name>
<description>GRPC library for gapic-google-cloud-storage-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.0.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-api</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-v2</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-storage-v2</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-common-protos</artifactId>
</dependency>
<dependency>
<groupId>org.threeten</groupId>
<artifactId>threetenbp</artifactId>
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>api-common</artifactId>
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax</artifactId>
</dependency>

<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax-grpc</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>

<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax-grpc</artifactId>
<classifier>testlib</classifier>
<scope>test</scope>
</dependency>

</dependencies>

<profiles>
<profile>
<id>java9</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
56 changes: 56 additions & 0 deletions grpc-google-cloud-storage-v2/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-storage-v2</artifactId>
<version>2.0.0-alpha-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
<name>grpc-google-cloud-storage-v2</name>
<description>GRPC library for grpc-google-cloud-storage-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.0.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-api</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-v2</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
</dependencies>

<profiles>
<profile>
<id>java9</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
18 changes: 18 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,21 @@
<version>2.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-v2</artifactId>
<version>2.0.0-alpha-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-storage-v2</artifactId>
<version>2.0.0-alpha-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>gapic-google-cloud-storage-v2</artifactId>
<version>2.0.0-alpha-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-conformance-tests</artifactId>
Expand Down Expand Up @@ -149,6 +164,9 @@
</build>

<modules>
<module>proto-google-cloud-storage-v2</module>
<module>grpc-google-cloud-storage-v2</module>
<module>gapic-google-cloud-storage-v2</module>
<module>google-cloud-storage</module>
</modules>

Expand Down
29 changes: 29 additions & 0 deletions proto-google-cloud-storage-v2/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-v2</artifactId>
<version>2.0.0-alpha-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
<name>proto-google-cloud-storage-v2</name>
<description>PROTO library for proto-google-cloud-storage-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.0.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-common-protos</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-iam-v1</artifactId>
</dependency>
</dependencies>
</project>
21 changes: 21 additions & 0 deletions synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,34 @@

"""This script is used to synthesize generated parts of this library."""

import os
import synthtool as s
import synthtool.languages.java as java

AUTOSYNTH_MULTIPLE_COMMITS = True

service = 'storage'
version = 'v2'

library = java.bazel_library(
service=service,
version=version,
proto_path=f'google/{service}/{version}',
bazel_target=f'//google/{service}/{version}:google-cloud-{service}-{version}-java',
preserve_gapic=True,
)

java.common_templates(excludes=[
'.kokoro/nightly/integration.cfg',
'.kokoro/presubmit/integration.cfg',
'CONTRIBUTING.md'
])

gapic_main_dir = f'gapic-google-cloud-{service}-{version}/src/main'
gapic_resource_dir = gapic_main_dir + '/resources/com/google/storage/v2'
if not os.path.exists(gapic_resource_dir):
os.makedirs(gapic_resource_dir)
os.rename(
gapic_main_dir + '/java/com/google/storage/v2/gapic_metadata.json',
gapic_resource_dir + '/gapic_metadata.json',
)
5 changes: 4 additions & 1 deletion versions.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Format:
# module:released-version:current-version

google-cloud-storage:2.0.0:2.0.1-SNAPSHOT
google-cloud-storage:2.0.0:2.0.1-SNAPSHOT
gapic-google-cloud-storage-v2::2.0.0-alpha-SNAPSHOT
grpc-google-cloud-storage-v2::2.0.0-alpha-SNAPSHOT
proto-google-cloud-storage-v2::2.0.0-alpha-SNAPSHOT