Skip to content

Commit 94a0068

Browse files
committed
chore(java-shared-config): migrate java-shared-config into monorepo
2 parents 6436ced + 6f06dbc commit 94a0068

34 files changed

Lines changed: 2979 additions & 5 deletions

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@
2020
/java-bigtable/ @googleapis/bigtable-team @googleapis/cloud-sdk-java-team @googleapis/cloud-sdk-librarian-team
2121
/java-firestore/ @googleapis/firestore-team @googleapis/cloud-sdk-java-team @googleapis/cloud-sdk-librarian-team
2222
/librarian.yaml @googleapis/cloud-sdk-java-team @googleapis/cloud-sdk-librarian-team
23+
/java-shared-config/ @googleapis/cloud-sdk-java-team @googleapis/cloud-sdk-java-team

.github/workflows/ci.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ jobs:
4646
workflows:
4747
- '.github/workflows/**'
4848
src:
49-
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquery-jdbc|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/*.java'
50-
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquery-jdbc|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-spanner|java-storage)/**/pom.xml'
49+
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquery-jdbc|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-shared-config|java-spanner|java-storage)/**/*.java'
50+
- '!(google-auth-library-java|grpc-gcp-java|java-bigquery|java-bigquery-jdbc|java-bigquerystorage|java-bigtable|java-datastore|java-firestore|java-logging|java-logging-logback|java-pubsub|java-shared-config|java-spanner|java-storage)/**/pom.xml'
5151
- 'pom.xml'
5252
ci:
5353
- '.github/workflows/ci.yaml'
@@ -219,6 +219,13 @@ jobs:
219219
- 'sdk-platform-java/**/*.java'
220220
- 'sdk-platform-java/java-shared-dependencies/**/pom.xml'
221221
- 'sdk-platform-java/gapic-generator-java-pom-parent/pom.xml'
222+
java-shared-config:
223+
- 'java-shared-config/**'
224+
- 'google-auth-library-java/**/*.java'
225+
- 'google-auth-library-java/**/pom.xml'
226+
- 'sdk-platform-java/**/*.java'
227+
- 'sdk-platform-java/java-shared-dependencies/**/pom.xml'
228+
- 'sdk-platform-java/gapic-generator-java-pom-parent/pom.xml'
222229
split-units:
223230
runs-on: ubuntu-latest
224231
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-shared-config ci
22+
env:
23+
BUILD_SUBDIR: java-shared-config
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-shared-config/**'
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]
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: 11
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-shared-config
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
name: java-shared-config downstream
7+
env:
8+
BUILD_SUBDIR: java-shared-config
9+
jobs:
10+
filter:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
library: ${{ steps.filter.outputs.library }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: dorny/paths-filter@v3
17+
id: filter
18+
with:
19+
filters: |
20+
library:
21+
- 'java-shared-config/**'
22+
dependencies:
23+
needs: filter
24+
if: ${{ needs.filter.outputs.library == 'true' }}
25+
runs-on: ubuntu-latest
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
java: [11]
30+
repo:
31+
- java-bigquery
32+
- java-bigquerystorage
33+
- java-spanner
34+
- java-storage
35+
- java-pubsub
36+
steps:
37+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
38+
- uses: actions/setup-java@v4
39+
with:
40+
distribution: zulu
41+
java-version: ${{matrix.java}}
42+
- run: java -version
43+
- run: sudo apt-get update -y
44+
- run: sudo apt-get install libxml2-utils
45+
- run: .kokoro/client-library-check.sh ${{matrix.repo}} dependencies
46+
47+
flatten-plugin-check:
48+
needs: filter
49+
if: ${{ needs.filter.outputs.library == 'true' }}
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
53+
- uses: actions/setup-java@v4
54+
with:
55+
distribution: zulu
56+
java-version: 11
57+
- run: java -version
58+
- run: sudo apt-get update -y
59+
- run: sudo apt-get install libxml2-utils
60+
- run: .kokoro/client-library-check.sh java-storage flatten-plugin
61+
env:
62+
REPO_TAG: v2.9.3
63+
EXPECTED_DEPENDENCIES_LIST: java-storage-v2.9.3-expected-flattened-dependencies.txt
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
7+
# Keeping this file separate as the dependencies check would use more
8+
# repositories than needed this downstream check for GraalVM native image and
9+
# other Maven plugins.
10+
name: java-shared-config downstream
11+
env:
12+
BUILD_SUBDIR: java-shared-config
13+
jobs:
14+
filter:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
library: ${{ steps.filter.outputs.library }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: dorny/paths-filter@v3
21+
id: filter
22+
with:
23+
filters: |
24+
library:
25+
- 'java-shared-config/**'
26+
build:
27+
needs: filter
28+
if: ${{ needs.filter.outputs.library == 'true' }}
29+
runs-on: ubuntu-latest
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
java: [8, 11]
34+
repo:
35+
- java-bigquery
36+
- java-bigtable
37+
job-type:
38+
- test # maven-surefire-plugin
39+
- clirr # clirr-maven-plugin
40+
- javadoc # maven-javadoc-plugin
41+
- javadoc-with-doclet # test javadoc generation with doclet
42+
steps:
43+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
44+
- uses: actions/setup-java@v4
45+
with:
46+
distribution: zulu
47+
java-version: ${{matrix.java}}
48+
- run: java -version
49+
- run: sudo apt-get update -y
50+
- run: sudo apt-get install libxml2-utils
51+
- run: .kokoro/client-library-check.sh ${{matrix.repo}} ${{matrix.job-type}}
52+
lint:
53+
needs: filter
54+
if: ${{ needs.filter.outputs.library == 'true' }}
55+
runs-on: ubuntu-latest
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
java: [17, 21]
60+
repo:
61+
- java-bigquery
62+
- java-bigtable
63+
job-type:
64+
- lint # fmt-maven-plugin and google-java-format
65+
steps:
66+
- uses: actions/checkout@v4
67+
with:
68+
fetch-depth: 0
69+
- uses: actions/setup-java@v4
70+
with:
71+
distribution: zulu
72+
java-version: ${{matrix.java}}
73+
- run: java -version
74+
- run: sudo apt-get update -y
75+
- run: sudo apt-get install libxml2-utils
76+
- run: .kokoro/client-library-check.sh ${{matrix.repo}} ${{matrix.job-type}}
77+
javadoc-with-doclet:
78+
needs: filter
79+
if: ${{ needs.filter.outputs.library == 'true' }}
80+
runs-on: ubuntu-latest
81+
strategy:
82+
fail-fast: false
83+
matrix:
84+
repo:
85+
- java-bigtable
86+
- java-bigquery
87+
- java-storage
88+
- java-storage-nio
89+
- java-spanner
90+
- java-spanner-jdbc
91+
- java-pubsub
92+
- java-pubsublite
93+
- java-logging
94+
- java-logging-logback
95+
- java-firestore
96+
- java-datastore
97+
- java-bigquerystorage
98+
steps:
99+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
100+
- uses: actions/setup-java@v4
101+
with:
102+
distribution: temurin
103+
java-version: 17
104+
- run: java -version
105+
- run: sudo apt-get update -y
106+
- run: sudo apt-get install libxml2-utils
107+
- run: .kokoro/client-library-check-doclet.sh ${{matrix.repo}}

.kokoro/common.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ excluded_modules=(
3737
'google-auth-library-java/oauth2_http'
3838
'java-storage'
3939
'java-storage-nio'
40+
'java-shared-config'
4041
'java-firestore'
4142
'java-bigtable'
4243
'java-pubsub'

0 commit comments

Comments
 (0)