Skip to content
This repository was archived by the owner on Dec 15, 2023. It is now read-only.

Commit 9e89e58

Browse files
build: add jdk 17 to java units and dependency builds (#1216) (#697)
1 parent d1307be commit 9e89e58

File tree

5 files changed

+55
-29
lines changed

5 files changed

+55
-29
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
docker:
22
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
3-
digest: sha256:52b5557b7155a80e6f1684c2376d5eef0df6d8d5c785551e1ff8cc000603b62a
3+
digest: sha256:13b7387edb404234610d30473ac48210ae7fe42a136335ee2b2f8a07c4c7f6a5

.github/blunderbuss.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Configuration for the Blunderbuss GitHub app. For more info see
2-
# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss
2+
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss
33
assign_prs_by:
44
- labels:
55
- samples

.github/workflows/ci.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
on:
22
push:
33
branches:
4-
- master
4+
- main
55
pull_request:
66
name: ci
77
jobs:
88
units:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
java: [8, 11]
12+
java: [8, 11, 17]
1313
steps:
1414
- uses: actions/checkout@v2
1515
- uses: stCarolas/setup-maven@v4
1616
with:
1717
maven-version: 3.8.1
18-
- uses: actions/setup-java@v1
18+
- uses: actions/setup-java@v2
1919
with:
20+
distribution: zulu
2021
java-version: ${{matrix.java}}
2122
- run: java -version
2223
- run: .kokoro/build.sh
@@ -29,8 +30,9 @@ jobs:
2930
- uses: stCarolas/setup-maven@v4
3031
with:
3132
maven-version: 3.8.1
32-
- uses: actions/setup-java@v1
33+
- uses: actions/setup-java@v2
3334
with:
35+
distribution: zulu
3436
java-version: 8
3537
- run: java -version
3638
- run: .kokoro/build.bat
@@ -40,14 +42,15 @@ jobs:
4042
runs-on: ubuntu-latest
4143
strategy:
4244
matrix:
43-
java: [8, 11]
45+
java: [8, 11, 17]
4446
steps:
4547
- uses: actions/checkout@v2
4648
- uses: stCarolas/setup-maven@v4
4749
with:
4850
maven-version: 3.8.1
49-
- uses: actions/setup-java@v1
51+
- uses: actions/setup-java@v2
5052
with:
53+
distribution: zulu
5154
java-version: ${{matrix.java}}
5255
- run: java -version
5356
- run: .kokoro/dependencies.sh
@@ -58,8 +61,9 @@ jobs:
5861
- uses: stCarolas/setup-maven@v4
5962
with:
6063
maven-version: 3.8.1
61-
- uses: actions/setup-java@v1
64+
- uses: actions/setup-java@v2
6265
with:
66+
distribution: zulu
6367
java-version: 8
6468
- run: java -version
6569
- run: .kokoro/build.sh
@@ -72,8 +76,9 @@ jobs:
7276
- uses: stCarolas/setup-maven@v4
7377
with:
7478
maven-version: 3.8.1
75-
- uses: actions/setup-java@v1
79+
- uses: actions/setup-java@v2
7680
with:
81+
distribution: zulu
7782
java-version: 8
7883
- run: java -version
7984
- run: .kokoro/build.sh

.kokoro/dependencies.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,28 @@ source ${scriptDir}/common.sh
2828
java -version
2929
echo $JOB_TYPE
3030

31-
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
31+
function determineMavenOpts() {
32+
local javaVersion=$(
33+
# filter down to the version line, then pull out the version between quotes,
34+
# then trim the version number down to its minimal number (removing any
35+
# update or suffix number).
36+
java -version 2>&1 | grep "version" \
37+
| sed -E 's/^.*"(.*?)".*$/\1/g' \
38+
| sed -E 's/^(1\.[0-9]\.0).*$/\1/g'
39+
)
40+
41+
case $javaVersion in
42+
"17")
43+
# MaxPermSize is no longer supported as of jdk 17
44+
echo -n "-Xmx1024m"
45+
;;
46+
*)
47+
echo -n "-Xmx1024m -XX:MaxPermSize=128m"
48+
;;
49+
esac
50+
}
51+
52+
export MAVEN_OPTS=$(determineMavenOpts)
3253

3354
# this should run maven enforcer
3455
retry_with_backoff 3 10 \

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -139,23 +139,23 @@ Note, to play the file on Unix-like system you may use the following command: `p
139139

140140
## Samples
141141

142-
Samples are in the [`samples/`](https://github.com/googleapis/java-speech/tree/master/samples) directory.
142+
Samples are in the [`samples/`](https://github.com/googleapis/java-speech/tree/main/samples) directory.
143143

144144
| Sample | Source Code | Try it |
145145
| --------------------------- | --------------------------------- | ------ |
146-
| Export To Storage Beta | [source code](https://github.com/googleapis/java-speech/blob/master/samples/snippets/src/main/java/com/example/speech/ExportToStorageBeta.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/ExportToStorageBeta.java) |
147-
| Infinite Stream Recognize | [source code](https://github.com/googleapis/java-speech/blob/master/samples/snippets/src/main/java/com/example/speech/InfiniteStreamRecognize.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/InfiniteStreamRecognize.java) |
148-
| Infinite Stream Recognize Options | [source code](https://github.com/googleapis/java-speech/blob/master/samples/snippets/src/main/java/com/example/speech/InfiniteStreamRecognizeOptions.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/InfiniteStreamRecognizeOptions.java) |
149-
| Quickstart Sample | [source code](https://github.com/googleapis/java-speech/blob/master/samples/snippets/src/main/java/com/example/speech/QuickstartSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/QuickstartSample.java) |
150-
| Recognize | [source code](https://github.com/googleapis/java-speech/blob/master/samples/snippets/src/main/java/com/example/speech/Recognize.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/Recognize.java) |
151-
| Recognize Beta | [source code](https://github.com/googleapis/java-speech/blob/master/samples/snippets/src/main/java/com/example/speech/RecognizeBeta.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/RecognizeBeta.java) |
152-
| Speech Adaptation | [source code](https://github.com/googleapis/java-speech/blob/master/samples/snippets/src/main/java/com/example/speech/SpeechAdaptation.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/SpeechAdaptation.java) |
153-
| Speech Model Adaptation Beta | [source code](https://github.com/googleapis/java-speech/blob/master/samples/snippets/src/main/java/com/example/speech/SpeechModelAdaptationBeta.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/SpeechModelAdaptationBeta.java) |
154-
| Speech Profanity Filter | [source code](https://github.com/googleapis/java-speech/blob/master/samples/snippets/src/main/java/com/example/speech/SpeechProfanityFilter.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/SpeechProfanityFilter.java) |
155-
| Speech Transcribe Multi Region | [source code](https://github.com/googleapis/java-speech/blob/master/samples/snippets/src/main/java/com/example/speech/SpeechTranscribeMultiRegion.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/SpeechTranscribeMultiRegion.java) |
156-
| Transcribe Context Classes | [source code](https://github.com/googleapis/java-speech/blob/master/samples/snippets/src/main/java/com/example/speech/TranscribeContextClasses.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/TranscribeContextClasses.java) |
157-
| Transcribe Diarization | [source code](https://github.com/googleapis/java-speech/blob/master/samples/snippets/src/main/java/com/example/speech/TranscribeDiarization.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/TranscribeDiarization.java) |
158-
| Transcribe Diarization Gcs | [source code](https://github.com/googleapis/java-speech/blob/master/samples/snippets/src/main/java/com/example/speech/TranscribeDiarizationGcs.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/TranscribeDiarizationGcs.java) |
146+
| Export To Storage Beta | [source code](https://github.com/googleapis/java-speech/blob/main/samples/snippets/src/main/java/com/example/speech/ExportToStorageBeta.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/ExportToStorageBeta.java) |
147+
| Infinite Stream Recognize | [source code](https://github.com/googleapis/java-speech/blob/main/samples/snippets/src/main/java/com/example/speech/InfiniteStreamRecognize.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/InfiniteStreamRecognize.java) |
148+
| Infinite Stream Recognize Options | [source code](https://github.com/googleapis/java-speech/blob/main/samples/snippets/src/main/java/com/example/speech/InfiniteStreamRecognizeOptions.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/InfiniteStreamRecognizeOptions.java) |
149+
| Quickstart Sample | [source code](https://github.com/googleapis/java-speech/blob/main/samples/snippets/src/main/java/com/example/speech/QuickstartSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/QuickstartSample.java) |
150+
| Recognize | [source code](https://github.com/googleapis/java-speech/blob/main/samples/snippets/src/main/java/com/example/speech/Recognize.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/Recognize.java) |
151+
| Recognize Beta | [source code](https://github.com/googleapis/java-speech/blob/main/samples/snippets/src/main/java/com/example/speech/RecognizeBeta.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/RecognizeBeta.java) |
152+
| Speech Adaptation | [source code](https://github.com/googleapis/java-speech/blob/main/samples/snippets/src/main/java/com/example/speech/SpeechAdaptation.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/SpeechAdaptation.java) |
153+
| Speech Model Adaptation Beta | [source code](https://github.com/googleapis/java-speech/blob/main/samples/snippets/src/main/java/com/example/speech/SpeechModelAdaptationBeta.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/SpeechModelAdaptationBeta.java) |
154+
| Speech Profanity Filter | [source code](https://github.com/googleapis/java-speech/blob/main/samples/snippets/src/main/java/com/example/speech/SpeechProfanityFilter.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/SpeechProfanityFilter.java) |
155+
| Speech Transcribe Multi Region | [source code](https://github.com/googleapis/java-speech/blob/main/samples/snippets/src/main/java/com/example/speech/SpeechTranscribeMultiRegion.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/SpeechTranscribeMultiRegion.java) |
156+
| Transcribe Context Classes | [source code](https://github.com/googleapis/java-speech/blob/main/samples/snippets/src/main/java/com/example/speech/TranscribeContextClasses.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/TranscribeContextClasses.java) |
157+
| Transcribe Diarization | [source code](https://github.com/googleapis/java-speech/blob/main/samples/snippets/src/main/java/com/example/speech/TranscribeDiarization.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/TranscribeDiarization.java) |
158+
| Transcribe Diarization Gcs | [source code](https://github.com/googleapis/java-speech/blob/main/samples/snippets/src/main/java/com/example/speech/TranscribeDiarizationGcs.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-speech&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/speech/TranscribeDiarizationGcs.java) |
159159

160160

161161

@@ -268,10 +268,10 @@ Java is a registered trademark of Oracle and/or its affiliates.
268268
[developer-console]: https://console.developers.google.com/
269269
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
270270
[cloud-sdk]: https://cloud.google.com/sdk/
271-
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting
272-
[contributing]: https://github.com/googleapis/java-speech/blob/master/CONTRIBUTING.md
273-
[code-of-conduct]: https://github.com/googleapis/java-speech/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct
274-
[license]: https://github.com/googleapis/java-speech/blob/master/LICENSE
271+
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting
272+
[contributing]: https://github.com/googleapis/java-speech/blob/main/CONTRIBUTING.md
273+
[code-of-conduct]: https://github.com/googleapis/java-speech/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
274+
[license]: https://github.com/googleapis/java-speech/blob/main/LICENSE
275275

276276
[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=speech.googleapis.com
277277
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM

0 commit comments

Comments
 (0)