Skip to content

Commit a810569

Browse files
authored
chore(firestore): migrate java-firestore to monorepo (#12985)
Using script from here: #12962.
2 parents 5471bb1 + f1d3dd2 commit a810569

634 files changed

Lines changed: 378499 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@
1616
/java-storage-nio/ @googleapis/gcs-team @googleapis/cloud-sdk-java-team
1717
/java-pubsub/ @googleapis/pubsub-team @googleapis/cloud-sdk-java-team
1818
/java-bigtable/ @googleapis/bigtable-team @googleapis/cloud-sdk-java-team
19+
/java-firestore/ @googleapis/firestore-team @googleapis/cloud-sdk-java-team

.github/workflows/ci.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
with:
3737
filters: |
3838
src:
39-
- '!(google-auth-library-java|java-bigquery|java-bigquerystorage|java-bigtable|java-datastore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/*.java'
40-
- '!(google-auth-library-java|java-bigquery|java-bigquerystorage|java-bigtable|java-datastore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/pom.xml'
39+
- '!(google-auth-library-java|java-bigquery|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/*.java'
40+
- '!(google-auth-library-java|java-bigquery|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/pom.xml'
4141
- 'pom.xml'
4242
ci:
4343
- '.github/workflows/ci.yaml'
@@ -185,6 +185,13 @@ jobs:
185185
- 'sdk-platform-java/**/*.java'
186186
- 'sdk-platform-java/java-shared-dependencies/**/pom.xml'
187187
- 'sdk-platform-java/gapic-generator-java-pom-parent/pom.xml'
188+
java-firestore:
189+
- 'java-firestore/**'
190+
- 'google-auth-library-java/**/*.java'
191+
- 'google-auth-library-java/**/pom.xml'
192+
- 'sdk-platform-java/**/*.java'
193+
- 'sdk-platform-java/java-shared-dependencies/**/pom.xml'
194+
- 'sdk-platform-java/gapic-generator-java-pom-parent/pom.xml'
188195
split-units:
189196
runs-on: ubuntu-latest
190197
needs: changes
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Copyright 2022 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+
# http://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+
# Github action job to test core java library features on
15+
# downstream client libraries before they are released.
16+
on:
17+
push:
18+
branches:
19+
- main
20+
pull_request:
21+
name: java-firestore ci
22+
env:
23+
BUILD_SUBDIR: java-firestore
24+
jobs:
25+
filter:
26+
runs-on: ubuntu-latest
27+
outputs:
28+
library: ${{ steps.filter.outputs.library }}
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: dorny/paths-filter@v3
32+
id: filter
33+
with:
34+
filters: |
35+
library:
36+
- 'java-firestore/**'
37+
units:
38+
needs: filter
39+
if: ${{ needs.filter.outputs.library == 'true' }}
40+
runs-on: ubuntu-latest
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
java: [11, 17, 21, 25]
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: actions/setup-java@v4
48+
with:
49+
distribution: temurin
50+
java-version: ${{matrix.java}}
51+
- run: java -version
52+
- run: .kokoro/build.sh
53+
env:
54+
JOB_TYPE: test
55+
units-java8:
56+
needs: filter
57+
if: ${{ needs.filter.outputs.library == 'true' }}
58+
# Building using Java 17 and run the tests with Java 8 runtime
59+
name: "units (8)"
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: actions/setup-java@v4
64+
with:
65+
java-version: 11
66+
distribution: temurin
67+
- name: "Set jvm system property environment variable for surefire plugin (unit tests)"
68+
# Maven surefire plugin (unit tests) allows us to specify JVM to run the tests.
69+
# https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
70+
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java -P !java17" >> $GITHUB_ENV
71+
shell: bash
72+
- uses: actions/setup-java@v4
73+
with:
74+
java-version: 17
75+
distribution: temurin
76+
- run: .kokoro/build.sh
77+
env:
78+
JOB_TYPE: test
79+
windows:
80+
needs: filter
81+
if: ${{ needs.filter.outputs.library == 'true' }}
82+
runs-on: windows-latest
83+
steps:
84+
- name: Support longpaths
85+
run: git config --system core.longpaths true
86+
- uses: actions/checkout@v4
87+
- uses: actions/setup-java@v4
88+
with:
89+
distribution: temurin
90+
java-version: 11
91+
- run: java -version
92+
- run: .kokoro/build.sh
93+
env:
94+
JOB_TYPE: test
95+
dependencies:
96+
needs: filter
97+
if: ${{ needs.filter.outputs.library == 'true' }}
98+
runs-on: ubuntu-latest
99+
strategy:
100+
matrix:
101+
java: [17]
102+
steps:
103+
- uses: actions/checkout@v4
104+
- uses: actions/setup-java@v4
105+
with:
106+
distribution: temurin
107+
java-version: ${{matrix.java}}
108+
- run: java -version
109+
- run: .kokoro/dependencies.sh
110+
javadoc:
111+
needs: filter
112+
if: ${{ needs.filter.outputs.library == 'true' }}
113+
runs-on: ubuntu-latest
114+
steps:
115+
- uses: actions/checkout@v4
116+
- uses: actions/setup-java@v4
117+
with:
118+
distribution: temurin
119+
java-version: 17
120+
- run: java -version
121+
- run: .kokoro/build.sh
122+
env:
123+
JOB_TYPE: javadoc
124+
lint:
125+
needs: filter
126+
if: ${{ needs.filter.outputs.library == 'true' }}
127+
runs-on: ubuntu-latest
128+
steps:
129+
- uses: actions/checkout@v4
130+
with:
131+
fetch-depth: 0
132+
- uses: actions/setup-java@v4
133+
with:
134+
distribution: temurin
135+
java-version: 17
136+
- run: java -version
137+
- run: .kokoro/build.sh
138+
env:
139+
JOB_TYPE: lint
140+
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
141+
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
142+
clirr:
143+
needs: filter
144+
if: ${{ needs.filter.outputs.library == 'true' }}
145+
runs-on: ubuntu-latest
146+
steps:
147+
- uses: actions/checkout@v4
148+
- uses: actions/setup-java@v4
149+
with:
150+
distribution: temurin
151+
java-version: 11
152+
- run: java -version
153+
- run: .kokoro/build.sh
154+
env:
155+
JOB_TYPE: clirr
156+
BUILD_SUBDIR: java-firestore

.kokoro/common.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ excluded_modules=(
3636
'google-auth-library-java/oauth2_http'
3737
'java-storage'
3838
'java-storage-nio'
39+
'java-firestore'
3940
'java-bigtable'
4041
'java-pubsub'
4142
)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.62.0" # {x-version-update:google-cloud-shared-dependencies:current}
7+
}
8+
9+
env_vars: {
10+
key: "JOB_TYPE"
11+
value: "graalvm-single"
12+
}
13+
14+
env_vars: {
15+
key: "INTEGRATION_TEST_ARGS"
16+
value: "-DFIRESTORE_EDITION=standard"
17+
}
18+
19+
env_vars: {
20+
key: "GOOGLE_CLOUD_PROJECT"
21+
value: "java-review"
22+
}
23+
24+
env_vars: {
25+
key: "GOOGLE_APPLICATION_CREDENTIALS"
26+
value: "secret_manager/java-review_firestore-java-it"
27+
}
28+
29+
env_vars: {
30+
key: "SECRET_MANAGER_KEYS"
31+
value: "java-review_firestore-java-it"
32+
}
33+
34+
env_vars: {
35+
key: "BUILD_SUBDIR"
36+
value: "java-firestore"
37+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
7+
}
8+
9+
env_vars: {
10+
key: "JOB_TYPE"
11+
value: "integration-single"
12+
}
13+
14+
env_vars: {
15+
key: "INTEGRATION_TEST_ARGS"
16+
value: "-DFIRESTORE_DATABASE_ID=enterprise -DFIRESTORE_EDITION=enterprise"
17+
}
18+
19+
env_vars: {
20+
key: "GCLOUD_PROJECT"
21+
value: "java-review"
22+
}
23+
24+
env_vars: {
25+
key: "GOOGLE_APPLICATION_CREDENTIALS"
26+
value: "secret_manager/java-review_firestore-java-it"
27+
}
28+
29+
env_vars: {
30+
key: "SECRET_MANAGER_KEYS"
31+
value: "java-review_firestore-java-it"
32+
}
33+
34+
env_vars: {
35+
key: "BUILD_SUBDIR"
36+
value: "java-firestore"
37+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
7+
}
8+
9+
env_vars: {
10+
key: "JOB_TYPE"
11+
value: "integration-single"
12+
}
13+
14+
env_vars: {
15+
key: "INTEGRATION_TEST_ARGS"
16+
value: "-DFIRESTORE_EDITION=standard"
17+
}
18+
19+
env_vars: {
20+
key: "GCLOUD_PROJECT"
21+
value: "java-review"
22+
}
23+
24+
env_vars: {
25+
key: "GOOGLE_APPLICATION_CREDENTIALS"
26+
value: "secret_manager/java-review_firestore-java-it"
27+
}
28+
29+
env_vars: {
30+
key: "SECRET_MANAGER_KEYS"
31+
value: "java-review_firestore-java-it"
32+
}
33+
34+
env_vars: {
35+
key: "BUILD_SUBDIR"
36+
value: "java-firestore"
37+
}

gapic-libraries-bom/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,13 @@
698698
<type>pom</type>
699699
<scope>import</scope>
700700
</dependency>
701+
<dependency>
702+
<groupId>com.google.cloud</groupId>
703+
<artifactId>google-cloud-firestore-bom</artifactId>
704+
<version>3.42.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-firestore:current} -->
705+
<type>pom</type>
706+
<scope>import</scope>
707+
</dependency>
701708
<dependency>
702709
<groupId>com.google.cloud</groupId>
703710
<artifactId>google-cloud-functions-bom</artifactId>

generation/check_non_release_please_versions.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ for pomFile in $(find . -mindepth 2 -name pom.xml | sort ); do
2323
[[ "${pomFile}" =~ .*java-storage-nio.* ]] || \
2424
[[ "${pomFile}" =~ .*java-pubsub.* ]] || \
2525
[[ "${pomFile}" =~ .*java-bigtable.* ]] || \
26+
[[ "${pomFile}" =~ .*java-firestore.* ]] || \
2627
[[ "${pomFile}" =~ .*java-vertexai.* ]] || \
2728
[[ "${pomFile}" =~ .*java-compute.* ]] || \
2829
[[ "${pomFile}" =~ .*.github*. ]]; then

generation_config.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3133,3 +3133,27 @@ libraries:
31333133
GAPICs:
31343134
- proto_path: google/bigtable/v2
31353135
- proto_path: google/bigtable/admin/v2
3136+
- api_shortname: firestore
3137+
name_pretty: Cloud Firestore
3138+
product_documentation: https://cloud.google.com/firestore
3139+
client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-firestore/latest/history
3140+
issue_tracker: https://issuetracker.google.com/savedsearches/5337669
3141+
release_level: stable
3142+
language: java
3143+
distribution_name: com.google.cloud:google-cloud-firestore
3144+
codeowner_team: '@googleapis/firestore-team'
3145+
api_id: firestore.googleapis.com
3146+
library_type: GAPIC_COMBO
3147+
api_description: is a fully-managed NoSQL document database for mobile, web, and
3148+
server development from Firebase and Google Cloud Platform. It's backed by a
3149+
multi-region replicated database that ensures once data is committed, it's durable
3150+
even in the face of unexpected disasters. Not only that, but despite being a distributed
3151+
database, it's also strongly consistent and offers seamless integration with other
3152+
Firebase and Google Cloud Platform products, including Google Cloud Functions.
3153+
transport: grpc
3154+
excluded_poms: google-cloud-firestore,google-cloud-firestore-bom
3155+
recommended_package: com.google.cloud.firestore
3156+
GAPICs:
3157+
- proto_path: google/firestore/v1
3158+
- proto_path: google/firestore/admin/v1
3159+
- proto_path: google/firestore/bundle

0 commit comments

Comments
 (0)