diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 731a0eb4a..a454a61e8 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,17 @@ +# 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. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:491a007c6bd6e77f9e9b1bebcd6cdf08a4a4ef2c228c123d9696845204cb685d + digest: sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 +# created: 2022-06-29T23:17:33.110417661Z diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index f69f0c445..5ff895436 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -21,7 +21,7 @@ If you are still having issues, please include as much information as possible: General, Core, and Other are also allowed as types 2. OS type and version: 3. Java version: -4. google-api-client version(s): +4. version(s): #### Steps to reproduce diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index cbe6adac4..e2feb1e97 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/auto-label.yaml b/.github/auto-label.yaml new file mode 100644 index 000000000..4caef688b --- /dev/null +++ b/.github/auto-label.yaml @@ -0,0 +1,15 @@ +# Copyright 2021 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. +requestsize: + enabled: true diff --git a/.github/release-please.yml b/.github/release-please.yml index f526582ab..918b136f6 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -10,3 +10,7 @@ branches: handleGHRelease: true releaseType: java-backport branch: 1.32.x + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-backport + branch: 1.34.x diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 008ab887f..8ba866728 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -45,6 +45,20 @@ branchProtectionRules: - lint - clirr - cla/google + - pattern: 1.34.x + isAdminEnforced: true + requiredApprovingReviewCount: 1 + requiresCodeOwnerReviews: true + requiresStrictStatusChecks: false + requiredStatusCheckContexts: + - units (8) + - units (11) + - windows + - dependencies (8) + - dependencies (11) + - lint + - clirr + - cla/google permissionRules: - team: yoshi-admins permission: admin diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index 7513acaeb..f5fc7d516 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -1,3 +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. on: pull_request: name: auto-merge-readme @@ -6,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v3 + - 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 9b4fd4d83..7a106d007 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -1,3 +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. on: pull_request: name: auto-release @@ -6,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-please') steps: - - uses: actions/github-script@v3 + - uses: actions/github-script@v6 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true @@ -16,13 +31,13 @@ jobs: return; } - // only approve PRs like "chore: release " - if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + // only approve PRs like "chore(main): release " + if ( !context.payload.pull_request.title.startsWith("chore(main): release") ) { return; } // only approve PRs with pom.xml and versions.txt changes - const filesPromise = github.pulls.listFiles.endpoint({ + const filesPromise = github.rest.pulls.listFiles.endpoint({ owner: context.repo.owner, repo: context.repo.repo, pull_number: context.payload.pull_request.number, @@ -54,7 +69,7 @@ jobs: return; } - const promise = github.pulls.list.endpoint({ + const promise = github.rest.pulls.list.endpoint({ owner: context.repo.owner, repo: context.repo.repo, state: 'open' @@ -71,7 +86,7 @@ jobs: } // approve release PR - await github.pulls.createReview({ + await github.rest.pulls.createReview({ owner: context.repo.owner, repo: context.repo.repo, body: 'Rubber stamped release!', @@ -80,7 +95,7 @@ jobs: }); // attach kokoro:force-run and automerge labels - await github.issues.addLabels({ + await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.payload.pull_request.number, diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ab6ba39e6..2419b7cff 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -62,20 +62,6 @@ jobs: - run: java -version - run: .kokoro/install_dependencies.sh - run: .kokoro/dependencies.sh - linkage-monitor: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 8 - - run: java -version - - run: .kokoro/install_dependencies.sh - - name: Install artifacts to local Maven repository - run: .kokoro/build.sh - shell: bash - - name: Validate dependencies with regard to com.google.cloud:libraries-bom (latest release) - uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor lint: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/downstream.yaml b/.github/workflows/downstream.yaml new file mode 100644 index 000000000..e9845f88e --- /dev/null +++ b/.github/workflows/downstream.yaml @@ -0,0 +1,143 @@ +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: [8] + repo: + - 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-api-client-bom ${{matrix.repo}} diff --git a/.kokoro/build.bat b/.kokoro/build.bat index 05826ad93..067cf4a4c 100644 --- a/.kokoro/build.bat +++ b/.kokoro/build.bat @@ -1,3 +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 "C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 7b7fb24f5..f50e638d9 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -74,6 +74,11 @@ graalvm) mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test RETURN_CODE=$? ;; +graalvm17) + # Run Unit and Integration Tests with Native Image + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test + RETURN_CODE=$? + ;; samples) SAMPLES_DIR=samples # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. diff --git a/.kokoro/common.sh b/.kokoro/common.sh index ace89f45a..f8f957af1 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -55,4 +55,6 @@ function retry_with_backoff { ## Helper functionss function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } function msg() { println "$*" >&2; } -function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file +function println() { printf '%s\n' "$(now) $*"; } + +## Helper comment to trigger updated repo dependency release \ No newline at end of file diff --git a/.kokoro/downstream-client-library-check.sh b/.kokoro/downstream-client-library-check.sh new file mode 100755 index 000000000..a165ccb70 --- /dev/null +++ b/.kokoro/downstream-client-library-check.sh @@ -0,0 +1,116 @@ +#!/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]}")) + +# Building this library locally requires a one time set up of google-play-services-basement +mkdir /tmp/foo && cd /tmp/foo +wget https://dl.google.com/dl/android/maven2/com/google/android/gms/play-services-basement/8.3.0/play-services-basement-8.3.0.aar +unzip play-services-basement-8.3.0.aar +mvn install:install-file \ + -Dfile=classes.jar \ + -DgroupId=com.google.android.google-play-services \ + -DartifactId=google-play-services \ + -Dversion=1 \ + -Dpackaging=jar + +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# Make java core library artifacts available for 'mvn validate' 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/.kokoro/nightly/java11-integration.cfg b/.kokoro/nightly/java11-integration.cfg new file mode 100644 index 000000000..58049cc38 --- /dev/null +++ b/.kokoro/nightly/java11-integration.cfg @@ -0,0 +1,37 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-public-resources/java11014" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "ENABLE_FLAKYBOT" + value: "true" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg new file mode 100644 index 000000000..a3f7fb9d4 --- /dev/null +++ b/.kokoro/presubmit/graalvm-native-17.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvm17" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} \ No newline at end of file diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 77dc4e8f0..1dba8de10 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -32,6 +32,7 @@ retry_with_backoff 3 10 \ mvn clean deploy -B \ --settings ${MAVEN_SETTINGS_FILE} \ -DskipTests=true \ + -Dclirr.skip=true \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ @@ -42,4 +43,4 @@ then mvn nexus-staging:release -B \ -DperformRelease=true \ --settings=settings.xml -fi \ No newline at end of file +fi diff --git a/.repo-metadata.json b/.repo-metadata.json index fe101bec7..6678fdf01 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,10 +1,11 @@ { - "name": "google-api-client", + "api_shortname": "google-api-client", "name_pretty": "Google API Java Client", "client_documentation": "https://googleapis.dev/java/google-api-client/latest/", - "release_level": "ga", + "release_level": "stable", "language": "java", "repo": "googleapis/google-api-java-client", "repo_short": "google-api-java-client", + "library_type": "CORE", "distribution_name": "com.google.api-client:google-api-client" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e2bc08fc..6dc73f0ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,116 @@ # Changelog +## [2.0.0](https://github.com/googleapis/google-api-java-client/compare/v1.35.2...v2.0.0) (2022-07-14) + + +### ⚠ BREAKING CHANGES + +* remove deprecated class (#1666) + +### Bug Fixes + +* **deps:** update dependency com.google.api-client:google-api-client to v1.35.2 ([#2101](https://github.com/googleapis/google-api-java-client/issues/2101)) ([c6aa5b7](https://github.com/googleapis/google-api-java-client/commit/c6aa5b76153de47ae29b4ce3fa21c275c76de615)) +* **deps:** update dependency com.google.cloud:libraries-bom to v26 ([#2103](https://github.com/googleapis/google-api-java-client/issues/2103)) ([a0323fb](https://github.com/googleapis/google-api-java-client/commit/a0323fbb2f3d9fd98164d4c2408376a61b3e94ef)) +* remove deprecated class ([#1666](https://github.com/googleapis/google-api-java-client/issues/1666)) ([88fd7f3](https://github.com/googleapis/google-api-java-client/commit/88fd7f3ff1530e107136ea7158b0b017ca072ce1)) + +## [1.35.2](https://github.com/googleapis/google-api-java-client/compare/v1.35.1...v1.35.2) (2022-06-30) + + +### Bug Fixes + +* **deps:** update dependency com.google.api-client:google-api-client to v1.35.1 ([#2091](https://github.com/googleapis/google-api-java-client/issues/2091)) ([a3b4780](https://github.com/googleapis/google-api-java-client/commit/a3b4780916b5acab86c43db8793a2d10c3e2c4fb)) + +## [1.35.1](https://github.com/googleapis/google-api-java-client/compare/v1.35.0...v1.35.1) (2022-06-10) + + +### Bug Fixes + +* **deps:** update dependency com.google.api-client:google-api-client to v1.35.0 ([#2083](https://github.com/googleapis/google-api-java-client/issues/2083)) ([fd53573](https://github.com/googleapis/google-api-java-client/commit/fd53573cf9a08f71dab8ec757f32bf0f6b615ce9)) +* **deps:** update dependency com.google.cloud:libraries-bom to v25.4.0 ([#2084](https://github.com/googleapis/google-api-java-client/issues/2084)) ([df02577](https://github.com/googleapis/google-api-java-client/commit/df025779104d9ed6bf1bd8e6b19c8442a83d31b5)) +* **deps:** update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.1 ([#2088](https://github.com/googleapis/google-api-java-client/issues/2088)) ([960e7be](https://github.com/googleapis/google-api-java-client/commit/960e7bef648c38863c6db101178d3bb7f317f145)) + +## [1.35.0](https://github.com/googleapis/google-api-java-client/compare/v1.34.0...v1.35.0) (2022-06-02) + + +### Features + +* add build scripts for native image testing in Java 17 ([#1440](https://github.com/googleapis/google-api-java-client/issues/1440)) ([#2075](https://github.com/googleapis/google-api-java-client/issues/2075)) ([2b1558d](https://github.com/googleapis/google-api-java-client/commit/2b1558d07d1f79939def761911d1fbdb6fb31257)) +* next release from main branch is 1.35.0 ([#2042](https://github.com/googleapis/google-api-java-client/issues/2042)) ([9005d5c](https://github.com/googleapis/google-api-java-client/commit/9005d5ca7df256342d0b6b94dfa92efc57ddeffa)) + + +### Bug Fixes + +* **deps:** update dependency com.google.api-client:google-api-client to v1.34.0 ([#2038](https://github.com/googleapis/google-api-java-client/issues/2038)) ([afea56f](https://github.com/googleapis/google-api-java-client/commit/afea56f5891e0e6e90369c04f99d64d2648edde6)) +* **deps:** update dependency com.google.api-client:google-api-client to v1.34.1 ([#2058](https://github.com/googleapis/google-api-java-client/issues/2058)) ([d1ddb69](https://github.com/googleapis/google-api-java-client/commit/d1ddb695b3ce4abc40f6af78845074f3d9e03e73)) +* **deps:** update dependency com.google.api-client:google-api-client-android to v1.34.1 ([#2059](https://github.com/googleapis/google-api-java-client/issues/2059)) ([54a9a0c](https://github.com/googleapis/google-api-java-client/commit/54a9a0c169a6a996f0ec6cfa338866e0ba3e5b57)) +* **deps:** update dependency com.google.api-client:google-api-client-appengine to v1.34.1 ([#2061](https://github.com/googleapis/google-api-java-client/issues/2061)) ([872ad59](https://github.com/googleapis/google-api-java-client/commit/872ad59ae77540bbcf27dc6966a722b68fd67a5c)) +* **deps:** update dependency com.google.api-client:google-api-client-assembly to v1.34.1 ([#2062](https://github.com/googleapis/google-api-java-client/issues/2062)) ([1a1d1b3](https://github.com/googleapis/google-api-java-client/commit/1a1d1b39f8f97bd1f9028c95a509e2205f9ecf53)) +* **deps:** update dependency com.google.api-client:google-api-client-gson to v1.34.1 ([#2064](https://github.com/googleapis/google-api-java-client/issues/2064)) ([3d1a03a](https://github.com/googleapis/google-api-java-client/commit/3d1a03a4702c09d1a880276900fcd02a9f933277)) +* **deps:** update dependency com.google.api-client:google-api-client-jackson2 to v1.34.1 ([#2065](https://github.com/googleapis/google-api-java-client/issues/2065)) ([3502186](https://github.com/googleapis/google-api-java-client/commit/350218698e07044c903e77ee2a326d21b48278ba)) +* **deps:** update dependency com.google.api-client:google-api-client-java6 to v1.34.1 ([#2066](https://github.com/googleapis/google-api-java-client/issues/2066)) ([705e865](https://github.com/googleapis/google-api-java-client/commit/705e865f05cae7e623eaba24c563512dc2cc05bc)) +* **deps:** update dependency com.google.api-client:google-api-client-protobuf to v1.34.1 ([#2068](https://github.com/googleapis/google-api-java-client/issues/2068)) ([ecedb5b](https://github.com/googleapis/google-api-java-client/commit/ecedb5b336d84a84b79d131848d438f9a31d36d0)) +* **deps:** update dependency com.google.api-client:google-api-client-servlet to v1.34.1 ([#2070](https://github.com/googleapis/google-api-java-client/issues/2070)) ([15540fe](https://github.com/googleapis/google-api-java-client/commit/15540fe7905fa19ab5e9ee104e97f7cad76e518a)) +* **deps:** update dependency com.google.api-client:google-api-client-xml to v1.34.1 ([#2071](https://github.com/googleapis/google-api-java-client/issues/2071)) ([050a269](https://github.com/googleapis/google-api-java-client/commit/050a2691a90dc5960c929661d3c31951d893e9ab)) +* **deps:** update dependency com.google.appengine:appengine-api-1.0-sdk to v2.0.5 ([#2072](https://github.com/googleapis/google-api-java-client/issues/2072)) ([526e103](https://github.com/googleapis/google-api-java-client/commit/526e1037fb370a9bae7fa9670ec62b72792b060d)) +* **deps:** update dependency com.google.cloud:libraries-bom to v25.2.0 ([#2050](https://github.com/googleapis/google-api-java-client/issues/2050)) ([6c48f89](https://github.com/googleapis/google-api-java-client/commit/6c48f8954ed6ac161512e01defa358e7c7ea0627)) +* **deps:** update dependency com.google.cloud:libraries-bom to v25.3.0 ([#2073](https://github.com/googleapis/google-api-java-client/issues/2073)) ([11dc2bb](https://github.com/googleapis/google-api-java-client/commit/11dc2bb17c8875989c80edb6b42a39b8fd87278d)) +* **deps:** update dependency com.google.oauth-client:google-oauth-client-bom to v1.33.3 ([#2041](https://github.com/googleapis/google-api-java-client/issues/2041)) ([be65181](https://github.com/googleapis/google-api-java-client/commit/be65181a67c87bdd1c7bcea3c99d25b4256fde4b)) +* **deps:** update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.0 ([#2081](https://github.com/googleapis/google-api-java-client/issues/2081)) ([8684064](https://github.com/googleapis/google-api-java-client/commit/86840649d97a4236740c5d3f07dfb8034324c03a)) +* use verifyPayload instead of verify to disable duplicate signature check ([#2080](https://github.com/googleapis/google-api-java-client/issues/2080)) ([003ca44](https://github.com/googleapis/google-api-java-client/commit/003ca44b4d41a73053eef2c46ba3ec2c8f135e95)) + +## [1.34.0](https://github.com/googleapis/google-api-java-client/compare/v1.33.4...v1.34.0) (2022-04-12) + + +### Features + +* deprecate OOB auth flow in GooglePromptReceiver ([#2034](https://github.com/googleapis/google-api-java-client/issues/2034)) ([334d8d6](https://github.com/googleapis/google-api-java-client/commit/334d8d68a455e41be137ed27dab50df7915b3992)) + + +### Bug Fixes + +* **deps:** update dependency com.google.api-client:google-api-client to v1.33.4 ([#2022](https://github.com/googleapis/google-api-java-client/issues/2022)) ([582bde1](https://github.com/googleapis/google-api-java-client/commit/582bde1f48c892b5856d0c51d8e051be6d20321e)) +* **deps:** update dependency com.google.cloud:libraries-bom to v25.1.0 ([#2025](https://github.com/googleapis/google-api-java-client/issues/2025)) ([ba36a44](https://github.com/googleapis/google-api-java-client/commit/ba36a44e27f97edc5a6aa6921b43b753f51af569)) +* **deps:** update dependency com.google.oauth-client:google-oauth-client-bom to v1.33.2 ([#2033](https://github.com/googleapis/google-api-java-client/issues/2033)) ([fed93e3](https://github.com/googleapis/google-api-java-client/commit/fed93e3a3db2396d7a4bf4c565864ce1e39dc3ba)) + + +### Dependencies + +* revert protobuf to 3.19 ([#2035](https://github.com/googleapis/google-api-java-client/issues/2035)) ([00eabeb](https://github.com/googleapis/google-api-java-client/commit/00eabeb293fc6978a7667fbdc695b81add7d700a)) + +### [1.33.4](https://github.com/googleapis/google-api-java-client/compare/v1.33.3...v1.33.4) (2022-03-28) + + +### Dependencies + +* update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.12 ([#2019](https://github.com/googleapis/google-api-java-client/issues/2019)) ([f1e0909](https://github.com/googleapis/google-api-java-client/commit/f1e09099f2954df68e8d476f142db7c4b7388917)) + +### [1.33.3](https://github.com/googleapis/google-api-java-client/compare/v1.33.2...v1.33.3) (2022-03-25) + + +### Bug Fixes + +* **deps:** update dependency com.google.api-client:google-api-client to v1.33.2 ([#1985](https://github.com/googleapis/google-api-java-client/issues/1985)) ([191850a](https://github.com/googleapis/google-api-java-client/commit/191850a33a562300325ee7809e68fca89feeb5f3)) +* **deps:** update dependency com.google.appengine:appengine-api-1.0-sdk to v2.0.4 ([#2010](https://github.com/googleapis/google-api-java-client/issues/2010)) ([b4c64a0](https://github.com/googleapis/google-api-java-client/commit/b4c64a0365ed8656bd116763318e975c036551b7)) +* **deps:** update dependency com.google.cloud:libraries-bom to v24.3.0 ([#1987](https://github.com/googleapis/google-api-java-client/issues/1987)) ([1620e8f](https://github.com/googleapis/google-api-java-client/commit/1620e8f6fe69d1af46afb9838ab16594c6c486b5)) +* **deps:** update dependency com.google.cloud:libraries-bom to v24.4.0 ([#2007](https://github.com/googleapis/google-api-java-client/issues/2007)) ([cba8dd2](https://github.com/googleapis/google-api-java-client/commit/cba8dd246c455c0f857d31f94f465b0d92b01829)) +* **deps:** update dependency com.google.cloud:libraries-bom to v25 ([#2014](https://github.com/googleapis/google-api-java-client/issues/2014)) ([43bd4a1](https://github.com/googleapis/google-api-java-client/commit/43bd4a13aa4d74e99b138491674e690ea4db8eb0)) +* **deps:** update dependency com.google.guava:guava to v31.1-jre ([#2004](https://github.com/googleapis/google-api-java-client/issues/2004)) ([eac0e77](https://github.com/googleapis/google-api-java-client/commit/eac0e77e8ac9ab1b784ff7c7c4c7f2f8c3095797)) +* **deps:** update dependency com.google.oauth-client:google-oauth-client-bom to v1.33.1 ([#1986](https://github.com/googleapis/google-api-java-client/issues/1986)) ([b8376f1](https://github.com/googleapis/google-api-java-client/commit/b8376f15284adab2684e3622af4f3d960bb32387)) + +### [1.33.2](https://github.com/googleapis/google-api-java-client/compare/v1.33.1...v1.33.2) (2022-02-08) + + +### Dependencies + +* **java:** update actions/github-script action to v5 ([#1339](https://github.com/googleapis/google-api-java-client/issues/1339)) ([#1972](https://github.com/googleapis/google-api-java-client/issues/1972)) ([b1d8c16](https://github.com/googleapis/google-api-java-client/commit/b1d8c167ea05735a08149681c61e30eb5b160368)) + +### [1.33.1](https://github.com/googleapis/google-api-java-client/compare/v1.33.0...v1.33.1) (2022-01-21) + + +### Bug Fixes + +* library should released as 1.33.1 ([#1966](https://github.com/googleapis/google-api-java-client/issues/1966)) ([44bb1c5](https://github.com/googleapis/google-api-java-client/commit/44bb1c52372bf8de03fe1c05b835f5f04c3a0c85)) + ## [1.33.0](https://www.github.com/googleapis/google-api-java-client/compare/v1.32.2...v1.33.0) (2022-01-06) diff --git a/clirr-ignored-differences.xml b/clirr-ignored-differences.xml index a4a93043c..3073121f5 100644 --- a/clirr-ignored-differences.xml +++ b/clirr-ignored-differences.xml @@ -6,4 +6,32 @@ 8001 com/google/api/client/googleapis/auth/clientlogin/** - + + 8001 + com/google/api/client/googleapis/apache/GoogleApacheHttpTransport + + + 7006 + com/google/api/client/googleapis/extensions/android/gms/auth/GooglePlayServicesAvailabilityIOException + com.google.android.gms.auth.GoogleAuthException getCause() + java.lang.Throwable + + + 7006 + com/google/api/client/googleapis/extensions/android/gms/auth/GooglePlayServicesAvailabilityIOException + java.lang.Throwable getCause() + com.google.android.gms.auth.GoogleAuthException + + + 7006 + com/google/api/client/googleapis/xml/atom/AtomPatchContent + com.google.api.client.http.xml.AbstractXmlHttpContent setMediaType(com.google.api.client.http.HttpMediaType) + com.google.api.client.http.AbstractHttpContent + + + 7006 + com/google/api/client/googleapis/xml/atom/AtomPatchContent + com.google.api.client.http.AbstractHttpContent setMediaType(com.google.api.client.http.HttpMediaType) + com.google.api.client.http.xml.AbstractXmlHttpContent + + \ No newline at end of file diff --git a/google-api-client-android/pom.xml b/google-api-client-android/pom.xml index fd35efeba..bf4fe062e 100644 --- a/google-api-client-android/pom.xml +++ b/google-api-client-android/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.33.0 + 2.0.0 ../pom.xml google-api-client-android diff --git a/google-api-client-appengine/pom.xml b/google-api-client-appengine/pom.xml index 719872b8e..b53fdf10f 100644 --- a/google-api-client-appengine/pom.xml +++ b/google-api-client-appengine/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.33.0 + 2.0.0 ../pom.xml google-api-client-appengine @@ -41,7 +41,7 @@ org.apache.felix maven-bundle-plugin - 2.5.4 + 5.1.6 bundle-manifest diff --git a/google-api-client-assembly/pom.xml b/google-api-client-assembly/pom.xml index ae9ae574c..ff21c3d73 100644 --- a/google-api-client-assembly/pom.xml +++ b/google-api-client-assembly/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.33.0 + 2.0.0 ../pom.xml com.google.api-client diff --git a/google-api-client-bom/pom.xml b/google-api-client-bom/pom.xml index 53c7b5166..625a3ceb1 100644 --- a/google-api-client-bom/pom.xml +++ b/google-api-client-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.api-client google-api-client-bom - 1.33.0 + 2.0.0 pom Google API Client Library for Java BOM @@ -63,53 +63,53 @@ com.google.api-client google-api-client - 1.33.0 + 2.0.0 com.google.api-client google-api-client-android - 1.33.0 + 2.0.0 com.google.api-client google-api-client-appengine - 1.33.0 + 2.0.0 com.google.api-client google-api-client-assembly - 1.33.0 + 2.0.0 pom com.google.api-client google-api-client-gson - 1.33.0 + 2.0.0 com.google.api-client google-api-client-jackson2 - 1.33.0 + 2.0.0 com.google.api-client google-api-client-java6 - 1.33.0 + 2.0.0 com.google.api-client google-api-client-protobuf - 1.33.0 + 2.0.0 com.google.api-client google-api-client-servlet - 1.33.0 + 2.0.0 com.google.api-client google-api-client-xml - 1.33.0 + 2.0.0 @@ -118,7 +118,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.13 true sonatype-nexus-staging @@ -129,7 +129,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.4.0 true @@ -137,7 +137,7 @@ org.apache.maven.plugins maven-site-plugin - 3.9.1 + 3.12.0 true diff --git a/google-api-client-gson/pom.xml b/google-api-client-gson/pom.xml index bb021664c..1cefb8703 100644 --- a/google-api-client-gson/pom.xml +++ b/google-api-client-gson/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.33.0 + 2.0.0 ../pom.xml google-api-client-gson @@ -39,7 +39,7 @@ org.apache.felix maven-bundle-plugin - 2.5.4 + 5.1.6 bundle-manifest diff --git a/google-api-client-jackson2/pom.xml b/google-api-client-jackson2/pom.xml index 772b55682..baca59c03 100644 --- a/google-api-client-jackson2/pom.xml +++ b/google-api-client-jackson2/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.33.0 + 2.0.0 ../pom.xml google-api-client-jackson2 @@ -39,7 +39,7 @@ org.apache.felix maven-bundle-plugin - 2.5.4 + 5.1.6 bundle-manifest diff --git a/google-api-client-java6/pom.xml b/google-api-client-java6/pom.xml index 83d4ce1f6..70af623ce 100644 --- a/google-api-client-java6/pom.xml +++ b/google-api-client-java6/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.33.0 + 2.0.0 ../pom.xml google-api-client-java6 @@ -39,7 +39,7 @@ org.apache.felix maven-bundle-plugin - 2.5.4 + 5.1.6 bundle-manifest diff --git a/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java b/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java index 1a97fb27a..4e8e580c9 100644 --- a/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java +++ b/google-api-client-java6/src/main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java @@ -27,6 +27,7 @@ * @since 1.11 * @author Yaniv Inbar */ +@Deprecated public class GooglePromptReceiver extends AbstractPromptReceiver { @Override diff --git a/google-api-client-protobuf/pom.xml b/google-api-client-protobuf/pom.xml index f814745a7..ca6909e3e 100644 --- a/google-api-client-protobuf/pom.xml +++ b/google-api-client-protobuf/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.33.0 + 2.0.0 ../pom.xml google-api-client-protobuf @@ -46,7 +46,7 @@ org.apache.felix maven-bundle-plugin - 2.5.4 + 5.1.6 bundle-manifest diff --git a/google-api-client-servlet/pom.xml b/google-api-client-servlet/pom.xml index a8011c43f..3e2258a87 100644 --- a/google-api-client-servlet/pom.xml +++ b/google-api-client-servlet/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.33.0 + 2.0.0 ../pom.xml google-api-client-servlet @@ -40,7 +40,7 @@ org.apache.felix maven-bundle-plugin - 2.5.4 + 5.1.6 bundle-manifest diff --git a/google-api-client-xml/pom.xml b/google-api-client-xml/pom.xml index d75c55bbe..96dbca04f 100644 --- a/google-api-client-xml/pom.xml +++ b/google-api-client-xml/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.33.0 + 2.0.0 ../pom.xml google-api-client-xml @@ -39,7 +39,7 @@ org.apache.felix maven-bundle-plugin - 2.5.4 + 5.1.6 bundle-manifest diff --git a/google-api-client/pom.xml b/google-api-client/pom.xml index 4533f039a..7f007bdfd 100644 --- a/google-api-client/pom.xml +++ b/google-api-client/pom.xml @@ -4,7 +4,7 @@ com.google.api-client google-api-client-parent - 1.33.0 + 2.0.0 ../pom.xml google-api-client @@ -60,7 +60,7 @@ org.apache.felix maven-bundle-plugin - 2.5.4 + 5.1.6 bundle-manifest diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/apache/GoogleApacheHttpTransport.java b/google-api-client/src/main/java/com/google/api/client/googleapis/apache/GoogleApacheHttpTransport.java deleted file mode 100644 index de2d95099..000000000 --- a/google-api-client/src/main/java/com/google/api/client/googleapis/apache/GoogleApacheHttpTransport.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2013 Google Inc. - * - * 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. - */ - -package com.google.api.client.googleapis.apache; - -import com.google.api.client.googleapis.GoogleUtils; -import com.google.api.client.http.apache.ApacheHttpTransport; -import com.google.api.client.util.SslUtils; -import java.io.IOException; -import java.net.ProxySelector; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.util.concurrent.TimeUnit; -import javax.net.ssl.SSLContext; -import org.apache.http.client.HttpClient; -import org.apache.http.config.SocketConfig; -import org.apache.http.conn.socket.LayeredConnectionSocketFactory; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; -import org.apache.http.impl.conn.SystemDefaultRoutePlanner; - -/** - * Utilities for Google APIs based on {@link ApacheHttpTransport}. - * - * @since 1.14 - * @author Yaniv Inbar - * @deprecated Use com.google.api.client.googleapis.apache.v2.GoogleApacheHttpTransport - */ -@Deprecated -public final class GoogleApacheHttpTransport { - - /** - * Returns a new instance of {@link ApacheHttpTransport} that uses {@link - * GoogleUtils#getCertificateTrustStore()} for the trusted certificates. - * - * @deprecated Use - * com.google.api.client.googleapis.apache.v2.GoogleApacheHttpTransport.newTrustedTransport() - */ - public static ApacheHttpTransport newTrustedTransport() - throws GeneralSecurityException, IOException { - // Set socket buffer sizes to 8192 - SocketConfig socketConfig = - SocketConfig.custom().setRcvBufSize(8192).setSndBufSize(8192).build(); - - PoolingHttpClientConnectionManager connectionManager = - new PoolingHttpClientConnectionManager(-1, TimeUnit.MILLISECONDS); - - // Disable the stale connection check (previously configured in the HttpConnectionParams - connectionManager.setValidateAfterInactivity(-1); - - // Use the included trust store - KeyStore trustStore = GoogleUtils.getCertificateTrustStore(); - SSLContext sslContext = SslUtils.getTlsSslContext(); - SslUtils.initSslContext(sslContext, trustStore, SslUtils.getPkixTrustManagerFactory()); - LayeredConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(sslContext); - - HttpClient client = - HttpClientBuilder.create() - .useSystemProperties() - .setSSLSocketFactory(socketFactory) - .setDefaultSocketConfig(socketConfig) - .setMaxConnTotal(200) - .setMaxConnPerRoute(20) - .setRoutePlanner(new SystemDefaultRoutePlanner(ProxySelector.getDefault())) - .setConnectionManager(connectionManager) - .disableRedirectHandling() - .disableAutomaticRetries() - .build(); - return new ApacheHttpTransport(client); - } - - private GoogleApacheHttpTransport() {} -} diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/apache/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/apache/package-info.java deleted file mode 100644 index 201e2c0f2..000000000 --- a/google-api-client/src/main/java/com/google/api/client/googleapis/apache/package-info.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2013 Google Inc. - * - * 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. - */ - -/** - * Google APIs support based on the Apache HTTP Client. - * - * @since 1.14 - * @author Yaniv Inbar - */ -package com.google.api.client.googleapis.apache; diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifier.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifier.java index 7592d075c..6425875d1 100644 --- a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifier.java +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifier.java @@ -161,10 +161,11 @@ public final long getExpirationTimeMilliseconds() { * @return {@code true} if verified successfully or {@code false} if failed */ public boolean verify(GoogleIdToken googleIdToken) throws GeneralSecurityException, IOException { - // check the payload - if (!super.verify(googleIdToken)) { + // check the payload only + if (!super.verifyPayload(googleIdToken)) { return false; } + // verify signature, try all public keys in turn. for (PublicKey publicKey : publicKeys.getPublicKeys()) { if (googleIdToken.verifySignature(publicKey)) { diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java b/google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java index 72ab6e937..3b8d3cc3d 100644 --- a/google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java @@ -37,6 +37,7 @@ import com.google.api.client.http.UriTemplate; import com.google.api.client.util.GenericData; import com.google.api.client.util.Preconditions; +import com.google.common.base.Joiner; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -164,6 +165,16 @@ static class ApiClientVersion { } public String toString() { + // When running the application as a native image, append `-graalvm` to the + // version. + String imageCode = System.getProperty("org.graalvm.nativeimage.imagecode"); + if (imageCode != null && imageCode.equals("runtime")) { + String[] tokens = versionString.split(" "); + if (tokens.length > 0 && tokens[0].startsWith("gl-java")) { + tokens[0] += "-graalvm"; + return Joiner.on(" ").join(tokens); + } + } return versionString; } diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequestTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequestTest.java index 734e3900b..1eefdb139 100644 --- a/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequestTest.java +++ b/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequestTest.java @@ -261,6 +261,14 @@ public void testSetsApiClientHeaderWithOsVersion() { assertTrue("Api version should contain the os version", version.matches(".* my-os/1.2.3")); } + public void testSetsApiClientHeader_NativeImage() throws IOException { + System.setProperty("org.graalvm.nativeimage.imagecode", "runtime"); + System.setProperty("java.version", "11.0.0"); + String version = new ApiClientVersion().toString(); + assertTrue( + "Api version should contain -graalvm suffix", version.matches("gl-java/11.0.0-graalvm.*")); + } + public void testSetsApiClientHeaderWithoutOsVersion() { System.setProperty("os.name", "My OS"); System.clearProperty("os.version"); diff --git a/pom.xml b/pom.xml index ffdc5959e..68bc147d8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.api-client google-api-client-parent - 1.33.0 + 2.0.0 pom Parent for the Google API Client Library for Java The Google APIs Client Library for Java is a Java client library @@ -227,7 +227,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.13 true ossrh @@ -237,11 +237,11 @@ maven-assembly-plugin - 3.3.0 + 3.4.1 maven-compiler-plugin - 3.8.1 + 3.10.1 1.7 1.7 @@ -264,7 +264,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.4.0 attach-javadocs @@ -277,7 +277,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.0 + 3.2.2 @@ -288,7 +288,7 @@ maven-surefire-plugin - 3.0.0-M5 + 3.0.0-M7 -Xmx1024m sponge_log @@ -312,17 +312,17 @@ org.codehaus.mojo animal-sniffer-maven-plugin - 1.20 + 1.21 org.apache.maven.plugins maven-project-info-reports-plugin - 3.1.2 + 3.3.0 org.apache.maven.plugins maven-site-plugin - 3.9.1 + 3.12.0 org.apache.maven.plugins @@ -340,7 +340,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0 + 3.1.0 enforce-maven @@ -493,17 +493,17 @@ UTF-8 - 1.41.0 + 1.42.1 4.4.15 4.5.13 - 1.32.1 + 1.34.1 3.0.2 2.8.6 - 3.19.2 - 31.0.1-jre - 2.0.1 + 3.21.2 + 31.1-jre + 2.0.5 1.1.4c - 2.3-eb + 2.3-20090302111651 3.2.2 3.2.1 4.0.3 @@ -574,7 +574,7 @@ com.puppycrawl.tools checkstyle - 9.2 + 9.3 @@ -605,7 +605,7 @@ - java-docfx-doclet-1.4.0 + java-docfx-doclet-1.5.0 ${project.build.directory}/docfx-yml ${project.artifactId} @@ -618,7 +618,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.4.0 com.microsoft.doclet.DocFxDoclet false diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 020fd4495..bedf375d9 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.api-client google-api-client - 1.32.2 + 1.35.2 @@ -53,7 +53,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add-snippets-source diff --git a/samples/pom.xml b/samples/pom.xml index 38f972f1c..fafa27bed 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.13 true diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index af9880335..a157d3d32 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.api-client google-api-client - 1.32.2 + 1.35.2 @@ -52,7 +52,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add-snippets-source diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 5fc8a1157..616c6377b 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 24.1.1 + 26.0.0 pom import diff --git a/versions.txt b/versions.txt index e9f1e9c7e..e95c229d1 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -google-api-client:1.33.0:1.33.0 +google-api-client:2.0.0:2.0.0