Skip to content

Commit

Permalink
Manual changes to add proto, build rule and dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-hui committed Aug 24, 2020
1 parent 395ced1 commit b35c1df
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 2 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
<modules>
<module>proto-google-cloud-firestore-admin-v1</module>
<module>proto-google-cloud-firestore-v1</module>
<module>proto-google-cloud-firestore-bundle-v1</module>
<module>grpc-google-cloud-firestore-admin-v1</module>
<module>grpc-google-cloud-firestore-v1</module>
<module>google-cloud-firestore-admin</module>
Expand Down
64 changes: 64 additions & 0 deletions proto-google-cloud-firestore-bundle-v1/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>

<artifactId>proto-google-cloud-firestore-bundle-v1</artifactId>
<version>1.0.0-SNAPSHOT</version>

<name>proto-google-cloud-firestore-bundle-v1</name>
<description>PROTO library for proto-google-cloud-firestore-bundle-v1</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-firestore-parent</artifactId>
<version>2.0.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-firestore-parent:current} -->
</parent>
<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>api-common</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-common-protos</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-firestore-v1</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<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>
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ java_proto_library(

# Open Source Packages
java_gapic_assembly_gradle_pkg(
name = "google-cloud-firestore-bundle-java",
name = "google-cloud-firestore-bundle-v1-java",
deps = [
":firestore_bundle_java_proto",
":firestore_bundle_proto",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ message BundledDocumentMetadata {

// Whether the document exists.
bool exists = 3;

// The names of the queries in this bundle that this document matches to.
repeated string queries = 4;
}

// Metadata describing the bundle file/stream.
Expand Down
7 changes: 7 additions & 0 deletions synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ def generate_client(service, version, proto_path=None, bazel_target=None, packag
include_gapic=True
)

bundle_v1 = generate_client(
service='firestore-bundle',
version='v1',
proto_path='firestore',
bazel_target='//firestore:google-cloud-firestore-bundle-v1-java',
)

java.common_templates(excludes=[
# firestore uses a different project for its integration tests
# due to the default project running datastore
Expand Down
2 changes: 1 addition & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cd "$TEMP_DIR"
git clone --depth 1 https://github.com/googleapis/googleapis.git

# Tell synthtool to use the cloned googleapi repo.
SYNTHTOOL_GOOGLEAPIS="$TEMP_DIR/googleapis"
export SYNTHTOOL_GOOGLEAPIS="$TEMP_DIR/googleapis"

# Patch bundle.proto to local googleapi repo.
mkdir "$SYNTHTOOL_GOOGLEAPIS/firestore"
Expand Down

0 comments on commit b35c1df

Please sign in to comment.