diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9786771c4..426cf83e2 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:3c950ed12391ebaffd1ee66d0374766a1c50144ebe6a7a0042300b2e6bb5856b + digest: sha256:b0b1c1c89570e229b1026372a2b8989ba31495007055b8d30178b7648503eefa diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0f4223257..48cb2163b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,3 +5,6 @@ Thank you for opening a Pull Request! Before submitting your PR, there are a few - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ + +If you write sample code, please follow the [samples format]( +https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index 1bb182327..f5fc7d516 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v5 + - uses: actions/github-script@v6 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 18e23230d..7a106d007 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-please') steps: - - uses: actions/github-script@v5 + - uses: actions/github-script@v6 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml new file mode 100644 index 000000000..59635c48a --- /dev/null +++ b/.github/workflows/downstream.yaml @@ -0,0 +1,144 @@ +on: + pull_request: + types: [ labeled ] + branches: + - main +name: downstream +jobs: + dependencies: + if: ${{ github.event.label.name == 'downstream-check:run' }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + java: [17] + repo: + # This list needs to be updated manually until an automated solution is in place. + - accessapproval + - accesscontextmanager + - aiplatform + - analytics-admin + - analytics-data + - api-gateway + - apigee-connect + - appengine-admin + - area120-tables + - artifact-registry + - asset + - assured-workloads + - automl + - bigquery + - bigqueryconnection + - bigquerydatatransfer + - bigquerymigration + - bigqueryreservation + - bigtable + - billing + - billingbudgets + - binary-authorization + - channel + - cloudbuild + - compute + - contact-center-insights + - container + - containeranalysis + - data-fusion + - datacatalog + - dataflow + - datalabeling + - dataproc + - dataproc-metastore + - datastore + - datastream + - debugger-client + - deploy + - dialogflow + - dialogflow-cx + - dlp + - dms + - dns + - document-ai + - domains + - errorreporting + - essential-contacts + - eventarc + - filestore + - firestore + - functions + - game-servers + - gke-connect-gateway + - gkehub + - gsuite-addons + - iam-admin + - iamcredentials + - iot + - kms + - language + - life-sciences + - logging + - logging-logback + - managed-identities + - mediatranslation + - memcache + - monitoring + - monitoring-dashboards + - network-management + - network-security + - networkconnectivity + - notebooks + - orchestration-airflow + - orgpolicy + - os-config + - os-login + - phishingprotection + - policy-troubleshooter + - private-catalog + - profiler + - pubsublite + - recaptchaenterprise + - recommendations-ai + - recommender + - redis + - resource-settings + - resourcemanager + - retail + - scheduler + - secretmanager + - security-private-ca + - securitycenter + - securitycenter-settings + - service-control + - service-management + - service-usage + - servicedirectory + - shell + - spanner + - spanner-jdbc + - speech + - storage + - storage-nio + - storage-transfer + - talent + - tasks + - texttospeech + - tpu + - trace + - translate + - video-intelligence + - video-transcoder + - vision + - vpcaccess + - webrisk + - websecurityscanner + - workflow-executions + - workflows + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v3 + with: + distribution: zulu + java-version: ${{matrix.java}} + - run: java -version + - run: sudo apt-get update -y + - run: sudo apt-get install libxml2-utils + - run: .kokoro/downstream-client-library-check.sh google-oauth-client-bom ${{matrix.repo}} diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index d5d964df1..912ed8b2b 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -20,9 +20,10 @@ jobs: checkstyle: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: + distribution: zulu java-version: 8 - name: Run checkstyle run: mvn -P lint --quiet --batch-mode checkstyle:check diff --git a/.kokoro/build.bat b/.kokoro/build.bat index cc602c9eb..067cf4a4c 100644 --- a/.kokoro/build.bat +++ b/.kokoro/build.bat @@ -1,18 +1,18 @@ +:: Copyright 2022 Google LLC +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. +:: Github action job to test core java library features on +:: downstream client libraries before they are released. :: See documentation in type-shell-output.bat -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Github action job to test core java library features on -# downstream client libraries before they are released. "C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh new file mode 100755 index 000000000..852db9e21 --- /dev/null +++ b/.kokoro/downstream-client-library-check.sh @@ -0,0 +1,104 @@ +#!/bin/bash +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail +# Display commands being run. +set -x + + +CORE_LIBRARY_ARTIFACT=$1 +CLIENT_LIBRARY=$2 +## Get the directory of the build script +scriptDir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" +## cd to the parent directory, i.e. the root of the git repo +cd "${scriptDir}"/.. + +# Make java core library artifacts available for 'mvn verify' at the bottom +mvn verify install -B -V -ntp -fae \ +-DskipTests=true \ +-Dmaven.javadoc.skip=true \ +-Dgcloud.download.skip=true \ +-Denforcer.skip=true + +# Read the current version of this java core library in the POM. Example version: '0.116.1-alpha-SNAPSHOT' +CORE_VERSION_POM=pom.xml +# Namespace (xmlns) prevents xmllint from specifying tag names in XPath +CORE_VERSION=$(sed -e 's/xmlns=".*"//' ${CORE_VERSION_POM} | xmllint --xpath '/project/version/text()' -) + +if [ -z "${CORE_VERSION}" ]; then + echo "Version is not found in ${CORE_VERSION_POM}" + exit 1 +fi +echo "Version: ${CORE_VERSION}" + +# Round 1 +# Check this java core library against HEAD of java-shared dependencies + +git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1 +pushd java-shared-dependencies/first-party-dependencies + +# replace version +xmllint --shell <(cat pom.xml) << EOF +setns x=http://maven.apache.org/POM/4.0.0 +cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"] +cd ../x:version +set ${CORE_VERSION} +save pom.xml +EOF + +# run dependencies script +cd .. +mvn verify install -B -V -ntp -fae \ +-DskipTests=true \ +-Dmaven.javadoc.skip=true \ +-Dgcloud.download.skip=true \ +-Denforcer.skip=true + +SHARED_DEPS_VERSION_POM=pom.xml +# Namespace (xmlns) prevents xmllint from specifying tag names in XPath +SHARED_DEPS_VERSION=$(sed -e 's/xmlns=".*"//' ${SHARED_DEPS_VERSION_POM} | xmllint --xpath '/project/version/text()' -) + +if [ -z "${SHARED_DEPS_VERSION}" ]; then + echo "Version is not found in ${SHARED_DEPS_VERSION_POM}" + exit 1 +fi + +# Round 2 + +# Check this BOM against java client libraries +git clone "https://github.com/googleapis/java-${CLIENT_LIBRARY}.git" --depth=1 +pushd java-"${CLIENT_LIBRARY}" + +if [[ $CLIENT_LIBRARY == "bigtable" ]]; then + pushd google-cloud-bigtable-deps-bom +fi + +# replace version +xmllint --shell <(cat pom.xml) << EOF +setns x=http://maven.apache.org/POM/4.0.0 +cd .//x:artifactId[text()="google-cloud-shared-dependencies"] +cd ../x:version +set ${SHARED_DEPS_VERSION} +save pom.xml +EOF + +if [[ $CLIENT_LIBRARY == "bigtable" ]]; then + popd +fi + +mvn verify install -B -V -ntp -fae \ +-Dmaven.javadoc.skip=true \ +-Dgcloud.download.skip=true \ +-Denforcer.skip=true diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index e51c7b4c6..a2907a257 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -13,12 +13,12 @@ env_vars: { # TODO: remove this after we've migrated all tests and scripts env_vars: { key: "GCLOUD_PROJECT" - value: "gcloud-devel" + value: "java-docs-samples-testing" } env_vars: { key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" + value: "java-docs-samples-testing" } env_vars: { diff --git a/CHANGELOG.md b/CHANGELOG.md index 418dd9f21..32fd01556 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.33.2](https://github.com/googleapis/google-oauth-java-client/compare/v1.33.1...v1.33.2) (2022-04-07) + + +### Dependencies + +* update project.http.version to v1.41.5 ([e945b8d](https://github.com/googleapis/google-oauth-java-client/commit/e945b8d7233038f417f40771508d171f6f0cbaf5)) + ### [1.33.1](https://github.com/googleapis/google-oauth-java-client/compare/v1.33.0...v1.33.1) (2022-02-08) diff --git a/google-oauth-client-appengine/pom.xml b/google-oauth-client-appengine/pom.xml index 6d66d11e8..aecaf3bb2 100644 --- a/google-oauth-client-appengine/pom.xml +++ b/google-oauth-client-appengine/pom.xml @@ -4,7 +4,7 @@ com.google.oauth-client google-oauth-client-parent - 1.33.1 + 1.33.2 ../pom.xml google-oauth-client-appengine @@ -15,7 +15,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.1.2 + 3.3.0 com.google.appengine:appengine-api-stubs diff --git a/google-oauth-client-assembly/pom.xml b/google-oauth-client-assembly/pom.xml index 2b029c845..fe7bf85d6 100644 --- a/google-oauth-client-assembly/pom.xml +++ b/google-oauth-client-assembly/pom.xml @@ -4,7 +4,7 @@ com.google.oauth-client google-oauth-client-parent - 1.33.1 + 1.33.2 ../pom.xml com.google.oauth-client diff --git a/google-oauth-client-bom/pom.xml b/google-oauth-client-bom/pom.xml index 6c39565a6..9a859e1d7 100644 --- a/google-oauth-client-bom/pom.xml +++ b/google-oauth-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.oauth-client google-oauth-client-bom - 1.33.1 + 1.33.2 pom Google OAuth Client Library for Java BOM @@ -63,27 +63,27 @@ com.google.oauth-client google-oauth-client - 1.33.1 + 1.33.2 com.google.oauth-client google-oauth-client-appengine - 1.33.1 + 1.33.2 com.google.oauth-client google-oauth-client-java6 - 1.33.1 + 1.33.2 com.google.oauth-client google-oauth-client-jetty - 1.33.1 + 1.33.2 com.google.oauth-client google-oauth-client-servlet - 1.33.1 + 1.33.2 @@ -92,7 +92,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.12 true sonatype-nexus-staging @@ -102,14 +102,14 @@ maven-javadoc-plugin - 3.3.1 + 3.3.2 true maven-site-plugin - 3.10.0 + 3.11.0 true @@ -126,7 +126,7 @@ com.google.googlejavaformat google-java-format - 1.13.0 + 1.15.0 diff --git a/google-oauth-client-java6/pom.xml b/google-oauth-client-java6/pom.xml index 7b768ba0e..2884535a3 100644 --- a/google-oauth-client-java6/pom.xml +++ b/google-oauth-client-java6/pom.xml @@ -4,7 +4,7 @@ com.google.oauth-client google-oauth-client-parent - 1.33.1 + 1.33.2 ../pom.xml google-oauth-client-java6 diff --git a/google-oauth-client-jetty/pom.xml b/google-oauth-client-jetty/pom.xml index ac34f6556..ad16ec989 100644 --- a/google-oauth-client-jetty/pom.xml +++ b/google-oauth-client-jetty/pom.xml @@ -4,7 +4,7 @@ com.google.oauth-client google-oauth-client-parent - 1.33.1 + 1.33.2 ../pom.xml google-oauth-client-jetty diff --git a/google-oauth-client-servlet/pom.xml b/google-oauth-client-servlet/pom.xml index af44873de..2170f72bc 100644 --- a/google-oauth-client-servlet/pom.xml +++ b/google-oauth-client-servlet/pom.xml @@ -4,7 +4,7 @@ com.google.oauth-client google-oauth-client-parent - 1.33.1 + 1.33.2 ../pom.xml google-oauth-client-servlet diff --git a/google-oauth-client/pom.xml b/google-oauth-client/pom.xml index 7ec5e17f7..758f2f4ea 100644 --- a/google-oauth-client/pom.xml +++ b/google-oauth-client/pom.xml @@ -4,7 +4,7 @@ com.google.oauth-client google-oauth-client-parent - 1.33.1 + 1.33.2 ../pom.xml google-oauth-client diff --git a/pom.xml b/pom.xml index 0a68cef65..2abf51894 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.google.oauth-client google-oauth-client-parent - 1.33.1 + 1.33.2 pom Parent for the Google OAuth Client Library for Java Google OAuth Client Library for Java @@ -184,7 +184,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.12 true ossrh @@ -220,7 +220,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.3.2 attach-javadocs @@ -244,7 +244,7 @@ maven-surefire-plugin - 3.0.0-M5 + 3.0.0-M6 -Xmx1024m sponge_log @@ -272,12 +272,12 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.1.2 + 3.2.2 org.apache.maven.plugins maven-site-plugin - 3.10.0 + 3.11.0 @@ -443,7 +443,7 @@ com.google.googlejavaformat google-java-format - 1.13.0 + 1.15.0 @@ -459,18 +459,18 @@ - google-api-java-client/google-api-client-assembly/android-properties (make the filenames match the version here) - Internally, update the default features.json file --> - 1.9.94 + 2.0.4 UTF-8 - 1.41.2 + 1.41.6 3.0.2 - 31.0-android + 31.1-android 1.1.4c 1.1.1 2.3-20090302111651 1.1 - 3.2.2 - 3.2.1 - 5.2.9 + 3.2.15 + 3.2.8 + 5.2.10 5.2.1 2.5 false @@ -534,7 +534,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.3.2 com.microsoft.doclet.DocFxDoclet false diff --git a/samples/dailymotion-cmdline-sample/pom.xml b/samples/dailymotion-cmdline-sample/pom.xml index a5a0843b9..88db2c988 100644 --- a/samples/dailymotion-cmdline-sample/pom.xml +++ b/samples/dailymotion-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.oauth-client google-oauth-client-parent - 1.33.1 + 1.33.2 ../../pom.xml dailymotion-simple-cmdline-sample @@ -76,7 +76,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.12 true diff --git a/samples/keycloak-pkce-cmdline-sample/pom.xml b/samples/keycloak-pkce-cmdline-sample/pom.xml index 5546ee074..2d147a5a8 100644 --- a/samples/keycloak-pkce-cmdline-sample/pom.xml +++ b/samples/keycloak-pkce-cmdline-sample/pom.xml @@ -4,7 +4,7 @@ com.google.oauth-client google-oauth-client-parent - 1.33.1 + 1.33.2 ../../pom.xml keycloak-pkce-cmdline-sample @@ -76,7 +76,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.12 true diff --git a/samples/pom.xml b/samples/pom.xml index a39458185..d53604cff 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.12 true diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 4105024c4..df9a81459 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.2.0 + 25.1.0 pom import @@ -41,7 +41,7 @@ com.google.oauth-client google-oauth-client - 1.33.0 + 1.33.1 diff --git a/versions.txt b/versions.txt index 4a2d69c6e..b9f36e228 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -google-oauth-client:1.33.1:1.33.1 +google-oauth-client:1.33.2:1.33.2