From 0ea65c48eed84d7191b9b41c791c3e6468d976b4 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 18 Nov 2020 14:42:25 -0800 Subject: [PATCH 01/24] build(java): use actions/github-script v3 tag rather than full semver (#1643) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/ae7b09a4-b636-4a61-997a-6394f4c00dbd/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58 --- .github/workflows/approve-readme.yaml | 2 +- .github/workflows/auto-release.yaml | 2 +- synth.metadata | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index e2d841d6c..7513acaeb 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v3.0.0 + - uses: actions/github-script@v3 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index bc1554aec..2b6cdbc97 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-v') steps: - - uses: actions/github-script@v3.0.0 + - uses: actions/github-script@v3 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true diff --git a/synth.metadata b/synth.metadata index e35ebbadc..3f3f5f576 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-java-client.git", - "sha": "266b309983473ddc066ba957af5bece31aadf7b7" + "sha": "51f36dcf08aaba585f38b2bfb78ec74d71623738" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7d652819519dfa24da9e14548232e4aaba71a11c" + "sha": "7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58" } } ], From bc062f0e798b0f84fb3bc7f413f08ac43a5be43d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Nov 2020 15:25:46 +0100 Subject: [PATCH 02/24] chore(deps): update dependency com.google.cloud:libraries-bom to v16 (#1644) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 74f27fc94..336d95222 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 15.0.0 + 16.1.0 pom import From 7b68127532b62d263634b0634ec270413c135594 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Nov 2020 15:26:28 +0100 Subject: [PATCH 03/24] chore(deps): update dependency com.google.api-client:google-api-client to v1.31.1 (#1640) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index c9798f806..3b6d8dd9d 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.31.0 + 1.31.1 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 6b2527149..a7355a678 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.api-client google-api-client - 1.31.0 + 1.31.1 From 33031309159faae990f6ac0cf3d194310bf9d4ac Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Nov 2020 15:26:54 +0100 Subject: [PATCH 04/24] chore(deps): update dependency com.google.protobuf:protobuf-java to v3.14.0 (#1638) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a2239a6e2..0b7daf8ec 100644 --- a/pom.xml +++ b/pom.xml @@ -469,7 +469,7 @@ 1.31.2 3.0.2 2.8.6 - 3.13.0 + 3.14.0 29.0-android 1.9.83 1.1.4c From 8d6588e037eaf476787b05c6876315908b5e11c1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 20 Nov 2020 08:08:13 -0800 Subject: [PATCH 05/24] chore(java): retry staging portion of the release with backoff (#1646) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5dd1c41b-c3e8-424e-9ebc-c89c7604838a/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/68742c6016bf0d16948a572633d17955a8737414 --- .kokoro/common.sh | 1 - .kokoro/release/stage.sh | 17 ++++++++++------- synth.metadata | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.kokoro/common.sh b/.kokoro/common.sh index a8d0ea04d..ace89f45a 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -25,7 +25,6 @@ function retry_with_backoff { # allow a failures to continue set +e - echo "${command}" ${command} exit_code=$? diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 3c482cbc5..16126d2eb 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -20,19 +20,22 @@ python3 -m pip install gcp-releasetool python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script source $(dirname "$0")/common.sh +source $(dirname "$0")/../common.sh MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml pushd $(dirname "$0")/../../ setup_environment_secrets create_settings_xml_file "settings.xml" -mvn clean install deploy -B \ - --settings ${MAVEN_SETTINGS_FILE} \ - -DskipTests=true \ - -DperformRelease=true \ - -Dgpg.executable=gpg \ - -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.homedir=${GPG_HOMEDIR} +# attempt to stage 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn clean install deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DskipTests=true \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} if [[ -n "${AUTORELEASE_PR}" ]] then diff --git a/synth.metadata b/synth.metadata index 3f3f5f576..3f63f80a2 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-java-client.git", - "sha": "51f36dcf08aaba585f38b2bfb78ec74d71623738" + "sha": "33031309159faae990f6ac0cf3d194310bf9d4ac" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7fcc405a579d5d53a726ff3da1b7c8c08f0f2d58" + "sha": "68742c6016bf0d16948a572633d17955a8737414" } } ], From ab3016701f2626937c4fb4fd5d96955f3fba9c81 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 24 Nov 2020 13:14:12 -0800 Subject: [PATCH 06/24] build(java): enable blunderbuss for samples (#1647) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1e5e82df-ed89-451b-8e30-d888c5a55bcb/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/943bb78606d035001123030067dffcc34f4645f2 --- .github/blunderbuss.yml | 7 +++++++ synth.metadata | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .github/blunderbuss.yml diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml new file mode 100644 index 000000000..1a23ea42b --- /dev/null +++ b/.github/blunderbuss.yml @@ -0,0 +1,7 @@ +# Configuration for the Blunderbuss GitHub app. For more info see +# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss +assign_prs_by: +- labels: + - samples + to: + - googleapis/java-samples-reviewers \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index 3f63f80a2..3f5ab0051 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-java-client.git", - "sha": "33031309159faae990f6ac0cf3d194310bf9d4ac" + "sha": "8d6588e037eaf476787b05c6876315908b5e11c1" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "68742c6016bf0d16948a572633d17955a8737414" + "sha": "943bb78606d035001123030067dffcc34f4645f2" } } ], @@ -21,6 +21,7 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", + ".github/blunderbuss.yml", ".github/generated-files-bot.yml", ".github/readme/synth.py", ".github/release-please.yml", From 06d144ace0989860730fcc4a80da8526c7f72bc4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 1 Dec 2020 18:08:02 +0000 Subject: [PATCH 07/24] chore: release 1.31.2-SNAPSHOT (#1641) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- google-api-client-android/pom.xml | 2 +- google-api-client-appengine/pom.xml | 2 +- google-api-client-assembly/pom.xml | 2 +- google-api-client-bom/pom.xml | 22 +++++++++++----------- google-api-client-gson/pom.xml | 2 +- google-api-client-jackson2/pom.xml | 2 +- google-api-client-java6/pom.xml | 2 +- google-api-client-protobuf/pom.xml | 2 +- google-api-client-servlet/pom.xml | 2 +- google-api-client-xml/pom.xml | 2 +- google-api-client/pom.xml | 2 +- pom.xml | 2 +- versions.txt | 2 +- 13 files changed, 23 insertions(+), 23 deletions(-) diff --git a/google-api-client-android/pom.xml b/google-api-client-android/pom.xml index 7569dc0c5..526413ea4 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.31.1 + 1.31.2-SNAPSHOT ../pom.xml google-api-client-android diff --git a/google-api-client-appengine/pom.xml b/google-api-client-appengine/pom.xml index 6989b9379..66f3b889e 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.31.1 + 1.31.2-SNAPSHOT ../pom.xml google-api-client-appengine diff --git a/google-api-client-assembly/pom.xml b/google-api-client-assembly/pom.xml index 7743928fb..4f406f3b2 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.31.1 + 1.31.2-SNAPSHOT ../pom.xml com.google.api-client diff --git a/google-api-client-bom/pom.xml b/google-api-client-bom/pom.xml index c01300ef4..69fe9cbde 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.31.1 + 1.31.2-SNAPSHOT pom Google API Client Library for Java BOM @@ -63,52 +63,52 @@ com.google.api-client google-api-client - 1.31.1 + 1.31.2-SNAPSHOT com.google.api-client google-api-client-android - 1.31.1 + 1.31.2-SNAPSHOT com.google.api-client google-api-client-appengine - 1.31.1 + 1.31.2-SNAPSHOT com.google.api-client google-api-client-assembly - 1.31.1 + 1.31.2-SNAPSHOT com.google.api-client google-api-client-gson - 1.31.1 + 1.31.2-SNAPSHOT com.google.api-client google-api-client-jackson2 - 1.31.1 + 1.31.2-SNAPSHOT com.google.api-client google-api-client-java6 - 1.31.1 + 1.31.2-SNAPSHOT com.google.api-client google-api-client-protobuf - 1.31.1 + 1.31.2-SNAPSHOT com.google.api-client google-api-client-servlet - 1.31.1 + 1.31.2-SNAPSHOT com.google.api-client google-api-client-xml - 1.31.1 + 1.31.2-SNAPSHOT diff --git a/google-api-client-gson/pom.xml b/google-api-client-gson/pom.xml index 2e4e2da58..7dfb9bf1a 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.31.1 + 1.31.2-SNAPSHOT ../pom.xml google-api-client-gson diff --git a/google-api-client-jackson2/pom.xml b/google-api-client-jackson2/pom.xml index 4246ff2a0..2609b690d 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.31.1 + 1.31.2-SNAPSHOT ../pom.xml google-api-client-jackson2 diff --git a/google-api-client-java6/pom.xml b/google-api-client-java6/pom.xml index 825d4943d..8c4d7d95d 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.31.1 + 1.31.2-SNAPSHOT ../pom.xml google-api-client-java6 diff --git a/google-api-client-protobuf/pom.xml b/google-api-client-protobuf/pom.xml index 6f39ae232..a8cbc1573 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.31.1 + 1.31.2-SNAPSHOT ../pom.xml google-api-client-protobuf diff --git a/google-api-client-servlet/pom.xml b/google-api-client-servlet/pom.xml index 02c01c584..e6a244974 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.31.1 + 1.31.2-SNAPSHOT ../pom.xml google-api-client-servlet diff --git a/google-api-client-xml/pom.xml b/google-api-client-xml/pom.xml index 26a513acc..afda4cd6b 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.31.1 + 1.31.2-SNAPSHOT ../pom.xml google-api-client-xml diff --git a/google-api-client/pom.xml b/google-api-client/pom.xml index 2d8bfc097..a8b852704 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.31.1 + 1.31.2-SNAPSHOT ../pom.xml google-api-client diff --git a/pom.xml b/pom.xml index 0b7daf8ec..e8dc0012d 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.api-client google-api-client-parent - 1.31.1 + 1.31.2-SNAPSHOT pom Parent for the Google API Client Library for Java diff --git a/versions.txt b/versions.txt index f7e88e380..23230b82e 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -google-api-client:1.31.1:1.31.1 +google-api-client:1.31.1:1.31.2-SNAPSHOT From 9e34f37e2ef667507e03cb2d495b2c945851eb30 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Tue, 1 Dec 2020 18:43:43 +0000 Subject: [PATCH 08/24] deps: update Guava to 30.0 (#1645) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e8dc0012d..50edca8e9 100644 --- a/pom.xml +++ b/pom.xml @@ -470,7 +470,7 @@ 3.0.2 2.8.6 3.14.0 - 29.0-android + 30.0-android 1.9.83 1.1.4c 2.3-eb From 98db6ca0113396e715894a083227f062269ca93d Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Wed, 9 Dec 2020 16:18:53 -0500 Subject: [PATCH 09/24] docs: Update the documentation link for GoogleCredential from deprecated version to newer version (#1652) * Updated the link to GoogleCredential * Changed the documentation to GoogleCredential to newer version * Removed typos from oauth-2.0.md --- docs/oauth-2.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/oauth-2.0.md b/docs/oauth-2.0.md index df8a044ee..2b7e71e7b 100644 --- a/docs/oauth-2.0.md +++ b/docs/oauth-2.0.md @@ -517,7 +517,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { credential.setSelectedAccountName(accountName); SharedPreferences settings = getPreferences(Context.MODE_PRIVATE); SharedPreferences.Editor editor = settings.edit(); - editor.putString(PREF_ACCOUNT_NAME, accountName); + editor.putString(PREF_ACCOUNT_NAME, accountName); editor.commit(); AsyncLoadTasks.run(this); } @@ -527,13 +527,13 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { } ``` -[google-credential]: https://googleapis.dev/java/google-api-client/latest/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.html +[google-credential]: https://googleapis.dev/java/google-auth-library/latest/com/google/auth/oauth2/GoogleCredentials.html [google-oauth-client-instructions]: https://developers.google.com/api-client-library/java/google-oauth-java-client/oauth2 [oauth2]: https://developers.google.com/accounts/docs/OAuth2 [javadoc-oauth2]: https://googleapis.dev/java/google-api-client/latest/com/google/api/client/googleapis/auth/oauth2/package-frame.html [javadoc-appengine-oauth2]: https://googleapis.dev/java/google-api-client/latest/com/google/api/client/googleapis/extensions/appengine/auth/oauth2/package-frame.html [console]: https://console.developers.google.com/ -[console-help]: https://developer.google.com/console/help/console/ +[console-help]: https://developer.google.com/console/help/console/ [identity-api]: https://cloud.google.com/appengine/docs/java/appidentity/?csw=1#Asserting_Identity_to_Google_APIs [app-identity-credential]: https://googleapis.dev/java/google-api-client/latest/com/google/api/client/googleapis/extensions/appengine/auth/oauth2/AppIdentityCredential.html [urlshortener-sample]: https://github.com/google/google-api-java-client-samples/tree/master/urlshortener-robots-appengine-sample From 185476a8175d23bb0790295598d2f5859a5da73c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 11 Dec 2020 14:08:57 -0800 Subject: [PATCH 10/24] chore: Update publish_javadoc.sh (#1651) * (chore) Update publish_javadoc.sh * add `export` to the envVar's to make sure maven knows about them. * report the Java version * chore: update script * remove `java -version` Co-authored-by: Jeffrey Rennie Source-Author: Les Vogel Source-Date: Mon Dec 7 09:37:58 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: 5d11bd2888c38ce1fb6fa6bf25494a4219a73928 Source-Link: https://github.com/googleapis/synthtool/commit/5d11bd2888c38ce1fb6fa6bf25494a4219a73928 --- .kokoro/release/publish_javadoc.sh | 7 ++++--- synth.metadata | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 65ced1e0c..2e8da5c70 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -38,8 +38,8 @@ python3 -m pip install gcp-docuploader # compile all packages mvn clean install -B -q -DskipTests=true -NAME=google-api-client -VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) +export NAME=google-api-client +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) # build the docs mvn site -B -q @@ -59,7 +59,8 @@ python3 -m docuploader upload . \ popd -# V2 +# V2 due to problems w/ the released javadoc plugin doclava, Java 8 is required. Beware of accidental updates. + mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" pushd target/devsite/reference diff --git a/synth.metadata b/synth.metadata index 3f5ab0051..899daff88 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-java-client.git", - "sha": "8d6588e037eaf476787b05c6876315908b5e11c1" + "sha": "9e34f37e2ef667507e03cb2d495b2c945851eb30" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "943bb78606d035001123030067dffcc34f4645f2" + "sha": "5d11bd2888c38ce1fb6fa6bf25494a4219a73928" } } ], From 1cd2a356af4d8b776ac907f88e3df1c951479fd6 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Mon, 14 Dec 2020 17:04:07 -0500 Subject: [PATCH 11/24] chore(docs): Update code snippets to use newer version of GoogleCredentials (#1655) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #1366 ☕️ --- docs/oauth-2.0.md | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/docs/oauth-2.0.md b/docs/oauth-2.0.md index 2b7e71e7b..6156d629d 100644 --- a/docs/oauth-2.0.md +++ b/docs/oauth-2.0.md @@ -47,12 +47,15 @@ For instructions on setting up your credentials properly, see the already have an access token, you can make a request in the following way: ```java -GoogleCredential credential = new GoogleCredential().setAccessToken(accessToken); -Plus plus = new Plus.builder(new NetHttpTransport(), - JacksonFactory.getDefaultInstance(), - credential) - .setApplicationName("Google-PlusSample/1.0") - .build(); +HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport(); +JsonFactory jsonFactory = JacksonFactory.getDefaultInstance(); + +GoogleCredentials googleCredentials = GoogleCredentials.create(access_token); +HttpRequestInitializer requestInitializer = new HttpCredentialsAdapter(googleCredentials); + +Storage storage = new Storage.Builder(httpTransport, jsonFactory, requestInitializer) + .setApplicationName("MyProject-1234") + .build(); ``` ### Google App Engine identity @@ -345,20 +348,20 @@ end-user's data, Service Accounts provide access to the client application's own data. Your client application signs the request for an access token using a private key downloaded from the [Google API Console][console]. -Example code taken from [plus-serviceaccount-cmdline-sample][plus-sample]: +For example, you can make a request in the following way: ```java HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport(); JsonFactory jsonFactory = JacksonFactory.getDefaultInstance(); -... -// Build service account credential. - -GoogleCredential credential = GoogleCredential.fromStream(new FileInputStream("MyProject-1234.json")) - .createScoped(Collections.singleton(PlusScopes.PLUS_ME)); -// Set up global Plus instance. -plus = new Plus.Builder(httpTransport, jsonFactory, credential) - .setApplicationName(APPLICATION_NAME).build(); -... + +//Build service account credential +GoogleCredentials googleCredentials = GoogleCredentials. + fromStream(new FileInputStream("/path/to/file")); +HttpRequestInitializer requestInitializer = new HttpCredentialsAdapter(googleCredentials); + +Storage storage = new Storage.Builder(httpTransport, jsonFactory, requestInitializer) + .setApplicationName("MyProject-1234") + .build(); ``` For an additional sample, see [storage-serviceaccount-cmdline-sample][storage-sample]. From e5b45a5a7078f1abdb968916e18a2b5643534746 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Dec 2020 23:30:24 +0100 Subject: [PATCH 12/24] chore(deps): update dependency com.google.cloud:libraries-bom to v16.2.0 (#1656) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | minor | `16.1.0` -> `16.2.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-api-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 336d95222..e48d01a3b 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.1.0 + 16.2.0 pom import From aabf57e534c852b1bb54545079e1eacfec38eb6c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 16 Dec 2020 08:42:14 -0800 Subject: [PATCH 13/24] ci(java): ignore bot users for generate-files-bot (#1657) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5204afce-766b-4a81-9152-05f5c11b5df8/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/3f67ceece7e797a5736a25488aae35405649b90b --- .github/generated-files-bot.yml | 4 ++++ synth.metadata | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml index 20f3acc28..47c2ba132 100644 --- a/.github/generated-files-bot.yml +++ b/.github/generated-files-bot.yml @@ -5,3 +5,7 @@ externalManifests: - type: json file: '.github/readme/synth.metadata/synth.metadata' jsonpath: '$.generatedFiles[*]' +ignoreAuthors: +- 'renovate-bot' +- 'yoshi-automation' +- 'release-please[bot]' diff --git a/synth.metadata b/synth.metadata index 899daff88..ceb4b8383 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-java-client.git", - "sha": "9e34f37e2ef667507e03cb2d495b2c945851eb30" + "sha": "e5b45a5a7078f1abdb968916e18a2b5643534746" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5d11bd2888c38ce1fb6fa6bf25494a4219a73928" + "sha": "3f67ceece7e797a5736a25488aae35405649b90b" } } ], From 4412b6ef21b668ef2dbfd2a1f1e489f988fad5fc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 29 Dec 2020 11:53:48 -0800 Subject: [PATCH 14/24] chore(java): remove formatter action Source-Author: Jeff Ching Source-Date: Tue Dec 29 10:50:17 2020 -0800 Source-Repo: googleapis/synthtool Source-Sha: 6133907dbb3ddab204a17a15d5c53ec0aae9b033 Source-Link: https://github.com/googleapis/synthtool/commit/6133907dbb3ddab204a17a15d5c53ec0aae9b033 --- .github/workflows/formatting.yaml | 25 ------------------------- synth.metadata | 5 ++--- 2 files changed, 2 insertions(+), 28 deletions(-) delete mode 100644 .github/workflows/formatting.yaml diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml deleted file mode 100644 index 6844407b4..000000000 --- a/.github/workflows/formatting.yaml +++ /dev/null @@ -1,25 +0,0 @@ -on: - pull_request_target: - types: [opened, synchronize] - branches: - - master -name: format -jobs: - format-code: - runs-on: ubuntu-latest - env: - ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} - steps: - - uses: actions/checkout@v2 - with: - ref: ${{github.event.pull_request.head.ref}} - repository: ${{github.event.pull_request.head.repo.full_name}} - - uses: actions/setup-java@v1 - with: - java-version: 11 - - run: "mvn com.coveo:fmt-maven-plugin:format" - - uses: googleapis/code-suggester@v1 - with: - command: review - pull_number: ${{ github.event.pull_request.number }} - git_dir: '.' diff --git a/synth.metadata b/synth.metadata index ceb4b8383..4605311af 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-java-client.git", - "sha": "e5b45a5a7078f1abdb968916e18a2b5643534746" + "sha": "aabf57e534c852b1bb54545079e1eacfec38eb6c" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "3f67ceece7e797a5736a25488aae35405649b90b" + "sha": "6133907dbb3ddab204a17a15d5c53ec0aae9b033" } } ], @@ -30,7 +30,6 @@ ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", - ".github/workflows/formatting.yaml", ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/build.sh", From ac80f59c8cef56bb54fa9a04a46846a7975b3ab1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Jan 2021 22:28:13 +0100 Subject: [PATCH 15/24] chore(deps): update dependency com.google.cloud:libraries-bom to v16.2.1 (#1662) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | patch | `16.2.0` -> `16.2.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/google-api-java-client). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index e48d01a3b..d2e1c569c 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.2.0 + 16.2.1 pom import From 500e5691132c906eee7e8e54b261fac36e49d113 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 11 Jan 2021 14:57:18 +0100 Subject: [PATCH 16/24] chore(deps): update dependency com.google.oauth-client:google-oauth-client-bom to v1.31.4 (#1663) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 50edca8e9..ba8a95154 100644 --- a/pom.xml +++ b/pom.xml @@ -466,7 +466,7 @@ UTF-8 1.38.0 - 1.31.2 + 1.31.4 3.0.2 2.8.6 3.14.0 From 3736626620fddffff58d3ccdcbe87d1673c3fa7b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 12 Jan 2021 12:41:01 +0100 Subject: [PATCH 17/24] chore(deps): update dependency com.coveo:fmt-maven-plugin to v2.10 (#1630) --- google-api-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-api-client-bom/pom.xml b/google-api-client-bom/pom.xml index 69fe9cbde..79fbfbd94 100644 --- a/google-api-client-bom/pom.xml +++ b/google-api-client-bom/pom.xml @@ -144,7 +144,7 @@ com.coveo fmt-maven-plugin - 2.9 + 2.10 true diff --git a/pom.xml b/pom.xml index ba8a95154..a7a5a2964 100644 --- a/pom.xml +++ b/pom.xml @@ -448,7 +448,7 @@ com.coveo fmt-maven-plugin - 2.9 + 2.10 true From c0323937b3892aa716699ad7ab1bb1e851f1c498 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 12 Jan 2021 12:41:24 +0100 Subject: [PATCH 18/24] chore(deps): update dependency com.google.googlejavaformat:google-java-format to v1.9 (#1631) --- google-api-client-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-api-client-bom/pom.xml b/google-api-client-bom/pom.xml index 79fbfbd94..194059082 100644 --- a/google-api-client-bom/pom.xml +++ b/google-api-client-bom/pom.xml @@ -153,7 +153,7 @@ com.google.googlejavaformat google-java-format - 1.7 + 1.9 diff --git a/pom.xml b/pom.xml index a7a5a2964..04b5ccb1c 100644 --- a/pom.xml +++ b/pom.xml @@ -457,7 +457,7 @@ com.google.googlejavaformat google-java-format - 1.7 + 1.9 From 99b3154342dba62f30b1c89d18e00f7bf2ce8239 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 14 Jan 2021 13:38:39 +0100 Subject: [PATCH 19/24] chore(deps): update project.http.version to v1.38.1 (#1667) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 04b5ccb1c..40f704f6d 100644 --- a/pom.xml +++ b/pom.xml @@ -465,7 +465,7 @@ UTF-8 - 1.38.0 + 1.38.1 1.31.4 3.0.2 2.8.6 From 8dc6c9277901ae4490a16ca0fc8a70d53aede7dc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 14 Jan 2021 15:04:52 +0100 Subject: [PATCH 20/24] chore(deps): update dependency com.google.appengine:appengine-api-1.0-sdk to v1.9.84 (#1653) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 40f704f6d..73d93ed2a 100644 --- a/pom.xml +++ b/pom.xml @@ -471,7 +471,7 @@ 2.8.6 3.14.0 30.0-android - 1.9.83 + 1.9.84 1.1.4c 2.3-eb 3.2.2 From 63ed2caecc200a407ef40b249bed158f18e2c5ae Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 14 Jan 2021 22:51:12 +0000 Subject: [PATCH 21/24] fix: use Gson instead of Jackson (#1661) * use GSon instead of Jackson * remove jackson2 * fix callback --- .../auth/oauth2/AppIdentityCredentialTest.java | 8 ++++---- .../json/jackson2/JacksonNotificationCallback.java | 8 ++++---- google-api-client/pom.xml | 5 ----- .../oauth2/GoogleAuthorizationCodeTokenRequest.java | 2 +- .../auth/oauth2/GoogleRefreshTokenRequest.java | 2 +- .../api/client/googleapis/json/package-info.java | 2 +- .../notifications/TypedNotificationCallback.java | 2 +- .../notifications/json/JsonNotificationCallback.java | 2 +- .../testing/auth/oauth2/MockGoogleCredential.java | 4 ++-- .../testing/auth/oauth2/MockTokenServerTransport.java | 4 ++-- .../testing/compute/MockMetadataServerTransport.java | 4 ++-- .../com/google/api/client/googleapis/util/Utils.java | 4 ++-- .../auth/oauth2/DefaultCredentialProviderTest.java | 4 ++-- .../auth/oauth2/GoogleAuthorizationCodeFlowTest.java | 4 ++-- .../GoogleAuthorizationCodeTokenRequestTest.java | 4 ++-- .../googleapis/auth/oauth2/GoogleCredentialTest.java | 4 ++-- .../auth/oauth2/GoogleIdTokenVerifierTest.java | 8 ++++---- .../auth/oauth2/GooglePublicKeysManagerTest.java | 10 +++++----- .../api/client/googleapis/batch/BatchRequestTest.java | 6 +++--- .../googleapis/compute/ComputeCredentialTest.java | 4 ++-- .../googleapis/json/GoogleJsonErrorContainerTest.java | 4 ++-- .../client/googleapis/json/GoogleJsonErrorTest.java | 4 ++-- .../services/AbstractGoogleClientRequestTest.java | 4 ++-- .../googleapis/services/AbstractGoogleClientTest.java | 4 ++-- .../services/json/AbstractGoogleJsonClientTest.java | 4 ++-- .../CommonGoogleJsonClientRequestInitializerTest.java | 4 ++-- .../GoogleJsonResponseExceptionFactoryTestingTest.java | 4 ++-- .../google/api/client/googleapis/util/UtilsTest.java | 2 -- 28 files changed, 57 insertions(+), 64 deletions(-) diff --git a/google-api-client-appengine/src/test/java/com/google/api/client/googleapis/extensions/appengine/auth/oauth2/AppIdentityCredentialTest.java b/google-api-client-appengine/src/test/java/com/google/api/client/googleapis/extensions/appengine/auth/oauth2/AppIdentityCredentialTest.java index 98cf6f043..961a8ffe7 100644 --- a/google-api-client-appengine/src/test/java/com/google/api/client/googleapis/extensions/appengine/auth/oauth2/AppIdentityCredentialTest.java +++ b/google-api-client-appengine/src/test/java/com/google/api/client/googleapis/extensions/appengine/auth/oauth2/AppIdentityCredentialTest.java @@ -20,7 +20,7 @@ import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpTransport; import com.google.api.client.json.JsonFactory; -import com.google.api.client.json.jackson2.JacksonFactory; +import com.google.api.client.json.gson.GsonFactory; import com.google.api.client.testing.http.MockHttpTransport; import java.io.IOException; import java.util.Arrays; @@ -72,7 +72,7 @@ public void testAppEngineCredentialWrapper() throws IOException { final Collection emptyScopes = Collections.emptyList(); HttpTransport transport = new MockHttpTransport(); - JsonFactory jsonFactory = new JacksonFactory(); + JsonFactory jsonFactory = new GsonFactory(); MockAppIdentityService appIdentity = new MockAppIdentityService(); appIdentity.setAccessTokenText(expectedAccessToken); @@ -108,7 +108,7 @@ public void testAppEngineCredentialWrapperGetAccessToken() throws IOException { final String expectedAccessToken = "ExpectedAccessToken"; HttpTransport transport = new MockHttpTransport(); - JsonFactory jsonFactory = new JacksonFactory(); + JsonFactory jsonFactory = new GsonFactory(); MockAppIdentityService appIdentity = new MockAppIdentityService(); appIdentity.setAccessTokenText(expectedAccessToken); @@ -124,7 +124,7 @@ public void testAppEngineCredentialWrapperGetAccessToken() throws IOException { } public void testAppEngineCredentialWrapperNullTransportThrows() throws IOException { - JsonFactory jsonFactory = new JacksonFactory(); + JsonFactory jsonFactory = new GsonFactory(); try { new AppIdentityCredential.AppEngineCredentialWrapper(null, jsonFactory); fail(); diff --git a/google-api-client-jackson2/src/main/java/com/google/api/client/googleapis/notifications/json/jackson2/JacksonNotificationCallback.java b/google-api-client-jackson2/src/main/java/com/google/api/client/googleapis/notifications/json/jackson2/JacksonNotificationCallback.java index 3d795ff6a..52267bc49 100644 --- a/google-api-client-jackson2/src/main/java/com/google/api/client/googleapis/notifications/json/jackson2/JacksonNotificationCallback.java +++ b/google-api-client-jackson2/src/main/java/com/google/api/client/googleapis/notifications/json/jackson2/JacksonNotificationCallback.java @@ -17,13 +17,13 @@ import com.google.api.client.googleapis.notifications.TypedNotificationCallback; import com.google.api.client.googleapis.notifications.json.JsonNotificationCallback; import com.google.api.client.json.JsonFactory; -import com.google.api.client.json.jackson2.JacksonFactory; +import com.google.api.client.json.gson.GsonFactory; import com.google.api.client.util.Beta; /** * {@link Beta}
* A {@link TypedNotificationCallback} which uses an JSON content encoding with {@link - * JacksonFactory#getDefaultInstance()}. + * GsonFactory#getDefaultInstance()}. * *

Must NOT be implemented in form of an anonymous class as this will break serialization. * @@ -31,7 +31,7 @@ * *

  * static class MyNotificationCallback
- * extends GsonNotificationCallback{@literal <}ListResponse{@literal >} {
+ * extends JacksonNotificationCallback{@literal <}ListResponse{@literal >} {
  *
  * private static final long serialVersionUID = 1L;
  *
@@ -67,6 +67,6 @@ public abstract class JacksonNotificationCallback extends JsonNotificationCal
 
   @Override
   protected JsonFactory getJsonFactory() {
-    return JacksonFactory.getDefaultInstance();
+    return GsonFactory.getDefaultInstance();
   }
 }
diff --git a/google-api-client/pom.xml b/google-api-client/pom.xml
index a8b852704..5cb54fbd9 100644
--- a/google-api-client/pom.xml
+++ b/google-api-client/pom.xml
@@ -121,14 +121,9 @@
       com.google.oauth-client
       google-oauth-client
     
-    
-      com.google.http-client
-      google-http-client-jackson2
-    
     
       com.google.http-client
       google-http-client-gson
-      test
     
     
       com.google.http-client
diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequest.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequest.java
index 4fa858179..ff05084a9 100644
--- a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequest.java
+++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequest.java
@@ -43,7 +43,7 @@
  * static void requestAccessToken() throws IOException {
  * try {
  * GoogleTokenResponse response =
- * new GoogleAuthorizationCodeTokenRequest(new NetHttpTransport(), new JacksonFactory(),
+ * new GoogleAuthorizationCodeTokenRequest(new NetHttpTransport(), new GsonFactory(),
  * "812741506391.apps.googleusercontent.com", "{client_secret}",
  * "4/P7q7W91a-oMsCeLvIaQm6bTrgtp7", "https://oauth2-login-demo.appspot.com/code")
  * .execute();
diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleRefreshTokenRequest.java b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleRefreshTokenRequest.java
index 6fdcd9de9..55ba20fc0 100644
--- a/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleRefreshTokenRequest.java
+++ b/google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleRefreshTokenRequest.java
@@ -41,7 +41,7 @@
  * static void refreshAccessToken() throws IOException {
  * try {
  * TokenResponse response =
- * new GoogleRefreshTokenRequest(new NetHttpTransport(), new JacksonFactory(),
+ * new GoogleRefreshTokenRequest(new NetHttpTransport(), new GsonFactory(),
  * "tGzv3JOkF0XG5Qx2TlKWIA", "s6BhdRkqt3", "7Fjfp0ZBr1KtDRbnfVdmIw").execute();
  * System.out.println("Access token: " + response.getAccessToken());
  * } catch (TokenResponseException e) {
diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/json/package-info.java b/google-api-client/src/main/java/com/google/api/client/googleapis/json/package-info.java
index 781b5f9a5..d3c81065c 100644
--- a/google-api-client/src/main/java/com/google/api/client/googleapis/json/package-info.java
+++ b/google-api-client/src/main/java/com/google/api/client/googleapis/json/package-info.java
@@ -113,7 +113,7 @@
  * headers.setApplicationName("Google-YouTubeSample/1.0");
  * headers.gdataVersion = "2";
  * JsonCParser parser = new JsonCParser();
- * parser.jsonFactory = new JacksonFactory();
+ * parser.jsonFactory = new GsonFactory();
  * transport.addParser(parser);
  * // insert authentication code...
  * return transport;
diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/TypedNotificationCallback.java b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/TypedNotificationCallback.java
index 51c27c296..be7f5fe52 100644
--- a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/TypedNotificationCallback.java
+++ b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/TypedNotificationCallback.java
@@ -51,7 +51,7 @@
  *
  * {@literal @}Override
  * protected ObjectParser getObjectParser(Notification notification) throws IOException {
- * return new JsonObjectParser(new JacksonFactory());
+ * return new JsonObjectParser(new GsonFactory());
  * }
  *
  * {@literal @}Override
diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/json/JsonNotificationCallback.java b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/json/JsonNotificationCallback.java
index 8d774bce5..70658bce7 100644
--- a/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/json/JsonNotificationCallback.java
+++ b/google-api-client/src/main/java/com/google/api/client/googleapis/notifications/json/JsonNotificationCallback.java
@@ -50,7 +50,7 @@
  *
  * {@literal @}Override
  * protected JsonFactory getJsonFactory() throws IOException {
- * return new JacksonFactory();
+ * return new GsonFactory();
  * }
  *
  * {@literal @}Override
diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/auth/oauth2/MockGoogleCredential.java b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/auth/oauth2/MockGoogleCredential.java
index d90bf281a..0058a2840 100644
--- a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/auth/oauth2/MockGoogleCredential.java
+++ b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/auth/oauth2/MockGoogleCredential.java
@@ -6,7 +6,7 @@
 import com.google.api.client.http.HttpTransport;
 import com.google.api.client.json.Json;
 import com.google.api.client.json.JsonFactory;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.testing.http.MockHttpTransport;
 import com.google.api.client.testing.http.MockLowLevelHttpRequest;
 import com.google.api.client.testing.http.MockLowLevelHttpResponse;
@@ -84,7 +84,7 @@ public MockGoogleCredential build() {
         setClientAuthentication(new MockClientAuthentication());
       }
       if (getJsonFactory() == null) {
-        setJsonFactory(new JacksonFactory());
+        setJsonFactory(new GsonFactory());
       }
       return new MockGoogleCredential(this);
     }
diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/auth/oauth2/MockTokenServerTransport.java b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/auth/oauth2/MockTokenServerTransport.java
index be992a905..1ad0d7de0 100644
--- a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/auth/oauth2/MockTokenServerTransport.java
+++ b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/auth/oauth2/MockTokenServerTransport.java
@@ -21,7 +21,7 @@
 import com.google.api.client.json.GenericJson;
 import com.google.api.client.json.Json;
 import com.google.api.client.json.JsonFactory;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.json.webtoken.JsonWebSignature;
 import com.google.api.client.testing.http.MockHttpTransport;
 import com.google.api.client.testing.http.MockLowLevelHttpRequest;
@@ -47,7 +47,7 @@ public class MockTokenServerTransport extends MockHttpTransport {
   private static final Logger LOGGER = Logger.getLogger(MockTokenServerTransport.class.getName());
 
   static final String EXPECTED_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:jwt-bearer";
-  static final JsonFactory JSON_FACTORY = new JacksonFactory();
+  static final JsonFactory JSON_FACTORY = new GsonFactory();
   final String tokenServerUrl;
   Map serviceAccounts = new HashMap();
   Map clients = new HashMap();
diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/compute/MockMetadataServerTransport.java b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/compute/MockMetadataServerTransport.java
index 82f2297ad..1814d067e 100644
--- a/google-api-client/src/main/java/com/google/api/client/googleapis/testing/compute/MockMetadataServerTransport.java
+++ b/google-api-client/src/main/java/com/google/api/client/googleapis/testing/compute/MockMetadataServerTransport.java
@@ -20,7 +20,7 @@
 import com.google.api.client.json.GenericJson;
 import com.google.api.client.json.Json;
 import com.google.api.client.json.JsonFactory;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.testing.http.MockHttpTransport;
 import com.google.api.client.testing.http.MockLowLevelHttpRequest;
 import com.google.api.client.testing.http.MockLowLevelHttpResponse;
@@ -41,7 +41,7 @@ public class MockMetadataServerTransport extends MockHttpTransport {
   private static final String METADATA_TOKEN_SERVER_URL =
       METADATA_SERVER_URL + "/computeMetadata/v1/instance/service-accounts/default/token";
 
-  static final JsonFactory JSON_FACTORY = new JacksonFactory();
+  static final JsonFactory JSON_FACTORY = new GsonFactory();
 
   String accessToken;
 
diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/util/Utils.java b/google-api-client/src/main/java/com/google/api/client/googleapis/util/Utils.java
index 5f0459244..d1e9ca8c0 100644
--- a/google-api-client/src/main/java/com/google/api/client/googleapis/util/Utils.java
+++ b/google-api-client/src/main/java/com/google/api/client/googleapis/util/Utils.java
@@ -17,7 +17,7 @@
 import com.google.api.client.http.HttpTransport;
 import com.google.api.client.http.javanet.NetHttpTransport;
 import com.google.api.client.json.JsonFactory;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.util.Beta;
 
 /**
@@ -39,7 +39,7 @@ private static class JsonFactoryInstanceHolder {
     // other APIs to not require one of these for input. This was the most commonly used
     // implementation in public samples. This is a compile-time dependency to help detect the
     // dependency as early as possible.
-    static final JsonFactory INSTANCE = new JacksonFactory();
+    static final JsonFactory INSTANCE = new GsonFactory();
   }
 
   /** Returns a cached default implementation of the HttpTransport interface. */
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/DefaultCredentialProviderTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/DefaultCredentialProviderTest.java
index baa4a5d05..d3ea60ccc 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/DefaultCredentialProviderTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/DefaultCredentialProviderTest.java
@@ -23,7 +23,7 @@
 import com.google.api.client.http.LowLevelHttpResponse;
 import com.google.api.client.json.GenericJson;
 import com.google.api.client.json.JsonFactory;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.testing.http.MockHttpTransport;
 import com.google.api.client.testing.http.MockLowLevelHttpRequest;
 import java.io.File;
@@ -45,7 +45,7 @@
 /** Tests {@link DefaultCredentialProvider}. */
 public class DefaultCredentialProviderTest extends TestCase {
 
-  private static final JsonFactory JSON_FACTORY = new JacksonFactory();
+  private static final JsonFactory JSON_FACTORY = new GsonFactory();
 
   private static final Collection SCOPES =
       Collections.unmodifiableCollection(Arrays.asList("scope1", "scope2"));
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeFlowTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeFlowTest.java
index 96100426c..ad3722982 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeFlowTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeFlowTest.java
@@ -14,7 +14,7 @@
 
 package com.google.api.client.googleapis.auth.oauth2;
 
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.testing.http.MockHttpTransport;
 import com.google.common.collect.ImmutableList;
 import junit.framework.TestCase;
@@ -33,7 +33,7 @@ public void testBuilder() {
     GoogleAuthorizationCodeFlow.Builder builder =
         new GoogleAuthorizationCodeFlow.Builder(
             new MockHttpTransport(),
-            new JacksonFactory(),
+            new GsonFactory(),
             CLIENT_ID,
             CLIENT_SECRET,
             ImmutableList.of("https://www.googleapis.com/auth/userinfo.email"));
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequestTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequestTest.java
index 44c647b12..17d4e9d62 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequestTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequestTest.java
@@ -15,7 +15,7 @@
 package com.google.api.client.googleapis.auth.oauth2;
 
 import com.google.api.client.auth.oauth2.ClientParametersAuthentication;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.testing.http.MockHttpTransport;
 import junit.framework.TestCase;
 
@@ -35,7 +35,7 @@ public void test() {
     GoogleAuthorizationCodeTokenRequest request =
         new GoogleAuthorizationCodeTokenRequest(
             new MockHttpTransport(),
-            new JacksonFactory(),
+            new GsonFactory(),
             CLIENT_ID,
             CLIENT_SECRET,
             CODE,
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredentialTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredentialTest.java
index 31932502d..9c3fb2555 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredentialTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredentialTest.java
@@ -18,7 +18,7 @@
 import com.google.api.client.http.HttpTransport;
 import com.google.api.client.json.GenericJson;
 import com.google.api.client.json.JsonFactory;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.testing.http.MockHttpTransport;
 import com.google.api.client.testing.util.SecurityTestUtils;
 import java.io.ByteArrayInputStream;
@@ -36,7 +36,7 @@
  */
 public class GoogleCredentialTest extends TestCase {
 
-  private static final JsonFactory JSON_FACTORY = new JacksonFactory();
+  private static final JsonFactory JSON_FACTORY = new GsonFactory();
 
   private static final Collection SCOPES =
       Collections.unmodifiableCollection(Arrays.asList("scope1", "scope2"));
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifierTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifierTest.java
index b7a362218..cd8d6cb76 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifierTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifierTest.java
@@ -16,7 +16,7 @@
 
 import com.google.api.client.auth.openidconnect.IdTokenVerifier;
 import com.google.api.client.googleapis.auth.oauth2.GoogleIdToken.Payload;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.json.webtoken.JsonWebSignature.Header;
 import com.google.api.client.testing.http.FixedClock;
 import com.google.api.client.util.Clock;
@@ -52,7 +52,7 @@ public void testBuilder() throws Exception {
     GoogleIdTokenVerifier.Builder builder =
         new GoogleIdTokenVerifier.Builder(
                 new GooglePublicKeysManagerTest.PublicCertsMockHttpTransport(),
-                new JacksonFactory())
+                new GsonFactory())
             .setIssuer(ISSUER)
             .setAudience(TRUSTED_CLIENT_IDS);
     assertEquals(Clock.SYSTEM, builder.getClock());
@@ -71,7 +71,7 @@ public void testVerify() throws Exception {
     GoogleIdTokenVerifier verifier =
         new GoogleIdTokenVerifier.Builder(
                 new GooglePublicKeysManagerTest.PublicCertsMockHttpTransport(),
-                new JacksonFactory())
+                new GsonFactory())
             .build();
     Header header = new Header();
     header.setAlgorithm("RS25");
@@ -83,7 +83,7 @@ public void testVerify() throws Exception {
     assertFalse(verifier.verify(idToken2));
     verifier =
         new GoogleIdTokenVerifier(
-            new GooglePublicKeysManagerTest.PublicCertsMockHttpTransport(), new JacksonFactory());
+            new GooglePublicKeysManagerTest.PublicCertsMockHttpTransport(), new GsonFactory());
     assertFalse(verifier.verify(idToken));
     assertFalse(verifier.verify(idToken2));
     // TODO(yanivi): add a unit test that returns true
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GooglePublicKeysManagerTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GooglePublicKeysManagerTest.java
index 5a2380713..af586708b 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GooglePublicKeysManagerTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/auth/oauth2/GooglePublicKeysManagerTest.java
@@ -20,7 +20,7 @@
 import com.google.api.client.http.LowLevelHttpResponse;
 import com.google.api.client.json.Json;
 import com.google.api.client.json.JsonFactory;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.testing.http.FixedClock;
 import com.google.api.client.testing.http.MockHttpTransport;
 import com.google.api.client.testing.http.MockLowLevelHttpRequest;
@@ -68,7 +68,7 @@ public class GooglePublicKeysManagerTest extends TestCase {
 
   public void testBuilder() throws Exception {
     HttpTransport transport = new MockHttpTransport();
-    JsonFactory jsonFactory = new JacksonFactory();
+    JsonFactory jsonFactory = new GsonFactory();
     GooglePublicKeysManager.Builder builder =
         new GooglePublicKeysManager.Builder(transport, jsonFactory);
 
@@ -102,7 +102,7 @@ public LowLevelHttpResponse execute() {
   public void testRefresh() throws Exception {
     GooglePublicKeysManager certs =
         new GooglePublicKeysManager.Builder(
-                new PublicCertsMockHttpTransport(), new JacksonFactory())
+                new PublicCertsMockHttpTransport(), new GsonFactory())
             .build();
     certs.refresh();
     assertEquals(2, certs.getPublicKeys().size());
@@ -112,7 +112,7 @@ public void testLoadCerts_cache() throws Exception {
     PublicCertsMockHttpTransport transport = new PublicCertsMockHttpTransport();
     transport.useAgeHeader = true;
     GooglePublicKeysManager certs =
-        new GooglePublicKeysManager.Builder(transport, new JacksonFactory())
+        new GooglePublicKeysManager.Builder(transport, new GsonFactory())
             .setClock(new FixedClock(100))
             .build();
 
@@ -123,7 +123,7 @@ public void testLoadCerts_cache() throws Exception {
 
   public void testGetCacheTimeInSec() throws Exception {
     GooglePublicKeysManager certs =
-        new GooglePublicKeysManager.Builder(new MockHttpTransport(), new JacksonFactory()).build();
+        new GooglePublicKeysManager.Builder(new MockHttpTransport(), new GsonFactory()).build();
     assertEquals(
         12000,
         certs.getCacheTimeInSec(
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java
index 4e74f9ac4..5ddb9e931 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java
@@ -25,7 +25,7 @@
 import com.google.api.client.http.LowLevelHttpResponse;
 import com.google.api.client.json.GenericJson;
 import com.google.api.client.json.JsonObjectParser;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.protobuf.ProtoObjectParser;
 import com.google.api.client.testing.http.HttpTesting;
 import com.google.api.client.testing.http.MockHttpTransport;
@@ -527,7 +527,7 @@ private BatchRequest getBatchPopulatedWithRequests(
     credential = new MockCredential();
 
     ObjectParser parser =
-        testBinary ? new ProtoObjectParser() : new JsonObjectParser(new JacksonFactory());
+        testBinary ? new ProtoObjectParser() : new JsonObjectParser(new GsonFactory());
     BatchRequest batchRequest =
         new BatchRequest(transport, credential).setBatchUrl(new GenericUrl(TEST_BATCH_URL));
     HttpRequest request1 = jsonHttpRequest1.buildHttpRequest();
@@ -629,7 +629,7 @@ public void subTestExecuteWithVoidCallback(boolean testServerError) throws IOExc
         new MockGoogleClientRequest(client, METHOD1, URI_TEMPLATE1, null, String.class);
     MockGoogleClientRequest jsonHttpRequest2 =
         new MockGoogleClientRequest(client, METHOD2, URI_TEMPLATE2, null, String.class);
-    ObjectParser parser = new JsonObjectParser(new JacksonFactory());
+    ObjectParser parser = new JsonObjectParser(new GsonFactory());
     BatchRequest batchRequest =
         new BatchRequest(transport, null).setBatchUrl(new GenericUrl(TEST_BATCH_URL));
     HttpRequest request1 = jsonHttpRequest1.buildHttpRequest();
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/compute/ComputeCredentialTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/compute/ComputeCredentialTest.java
index c89118132..88fddd12b 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/compute/ComputeCredentialTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/compute/ComputeCredentialTest.java
@@ -16,7 +16,7 @@
 
 import com.google.api.client.googleapis.testing.compute.MockMetadataServerTransport;
 import com.google.api.client.http.HttpTransport;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import junit.framework.TestCase;
 
 /**
@@ -32,7 +32,7 @@ public void testExecuteRefreshToken() throws Exception {
 
     HttpTransport transport = new MockMetadataServerTransport(ACCESS_TOKEN);
 
-    ComputeCredential credential = new ComputeCredential(transport, new JacksonFactory());
+    ComputeCredential credential = new ComputeCredential(transport, new GsonFactory());
 
     assertTrue(credential.refreshToken());
     assertEquals(ACCESS_TOKEN, credential.getAccessToken());
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorContainerTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorContainerTest.java
index 87613ec61..9db097428 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorContainerTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorContainerTest.java
@@ -16,7 +16,7 @@
 
 import com.google.api.client.json.JsonFactory;
 import com.google.api.client.json.JsonParser;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import junit.framework.TestCase;
 
 /**
@@ -26,7 +26,7 @@
  */
 public class GoogleJsonErrorContainerTest extends TestCase {
 
-  static final JsonFactory FACTORY = new JacksonFactory();
+  static final JsonFactory FACTORY = new GsonFactory();
   static final String ERROR =
       "{"
           + "\"error\":{"
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorTest.java
index f5d106170..83960bc81 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonErrorTest.java
@@ -22,7 +22,7 @@
 import com.google.api.client.json.Json;
 import com.google.api.client.json.JsonFactory;
 import com.google.api.client.json.JsonParser;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.testing.http.HttpTesting;
 import com.google.api.client.testing.http.MockHttpTransport;
 import com.google.api.client.testing.http.MockLowLevelHttpRequest;
@@ -36,7 +36,7 @@
  */
 public class GoogleJsonErrorTest extends TestCase {
 
-  static final JsonFactory FACTORY = new JacksonFactory();
+  static final JsonFactory FACTORY = new GsonFactory();
   static final String ERROR =
       "{"
           + "\"code\":403,"
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 5a44807a8..734e3900b 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
@@ -27,7 +27,7 @@
 import com.google.api.client.json.Json;
 import com.google.api.client.json.JsonFactory;
 import com.google.api.client.json.JsonObjectParser;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.testing.http.MockHttpTransport;
 import com.google.api.client.testing.http.MockLowLevelHttpRequest;
 import com.google.api.client.testing.http.MockLowLevelHttpResponse;
@@ -48,7 +48,7 @@ public class AbstractGoogleClientRequestTest extends TestCase {
   private static final String ROOT_URL = "https://www.googleapis.com/test/";
   private static final String SERVICE_PATH = "path/v1/";
   private static final String URI_TEMPLATE = "tests/{testId}";
-  private static final JsonFactory JSON_FACTORY = new JacksonFactory();
+  private static final JsonFactory JSON_FACTORY = new GsonFactory();
   private static final JsonObjectParser JSON_OBJECT_PARSER = new JsonObjectParser(JSON_FACTORY);
   private static final String ERROR_CONTENT =
       "{\"error\":{\"code\":401,\"errors\":[{\"domain\":\"global\","
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientTest.java
index d2715b04d..2164af792 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientTest.java
@@ -26,7 +26,7 @@
 import com.google.api.client.json.Json;
 import com.google.api.client.json.JsonFactory;
 import com.google.api.client.json.JsonObjectParser;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.testing.http.MockHttpTransport;
 import com.google.api.client.testing.http.MockLowLevelHttpRequest;
 import com.google.api.client.testing.http.MockLowLevelHttpResponse;
@@ -42,7 +42,7 @@
  */
 public class AbstractGoogleClientTest extends TestCase {
 
-  private static final JsonFactory JSON_FACTORY = new JacksonFactory();
+  private static final JsonFactory JSON_FACTORY = new GsonFactory();
   private static final JsonObjectParser JSON_OBJECT_PARSER = new JsonObjectParser(JSON_FACTORY);
   private static final HttpTransport TRANSPORT = new MockHttpTransport();
 
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClientTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClientTest.java
index 9305aa94b..1efc2c1e9 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClientTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClientTest.java
@@ -22,7 +22,7 @@
 import com.google.api.client.http.LowLevelHttpResponse;
 import com.google.api.client.json.Json;
 import com.google.api.client.json.JsonFactory;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.testing.http.HttpTesting;
 import com.google.api.client.testing.http.MockHttpTransport;
 import com.google.api.client.testing.http.MockLowLevelHttpRequest;
@@ -56,7 +56,7 @@ public LowLevelHttpResponse execute() {
             };
           }
         };
-    JsonFactory jsonFactory = new JacksonFactory();
+    JsonFactory jsonFactory = new GsonFactory();
     MockGoogleJsonClient client =
         new MockGoogleJsonClient.Builder(
                 transport, jsonFactory, HttpTesting.SIMPLE_URL, "", null, false)
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/CommonGoogleJsonClientRequestInitializerTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/CommonGoogleJsonClientRequestInitializerTest.java
index 3067f336a..efa8a58ee 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/CommonGoogleJsonClientRequestInitializerTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/services/json/CommonGoogleJsonClientRequestInitializerTest.java
@@ -14,7 +14,7 @@
 
 import com.google.api.client.googleapis.testing.services.json.MockGoogleJsonClient;
 import com.google.api.client.http.HttpContent;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import com.google.api.client.testing.http.HttpTesting;
 import com.google.api.client.testing.http.MockHttpTransport;
 import com.google.api.client.util.Key;
@@ -46,7 +46,7 @@ public void testInitialize() throws Exception {
     MockGoogleJsonClient client =
         new MockGoogleJsonClient.Builder(
                 new MockHttpTransport(),
-                new JacksonFactory(),
+                new GsonFactory(),
                 HttpTesting.SIMPLE_URL,
                 "test/",
                 null,
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/testing/json/GoogleJsonResponseExceptionFactoryTestingTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/testing/json/GoogleJsonResponseExceptionFactoryTestingTest.java
index 36cbb7cdb..c4f41a1d3 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/testing/json/GoogleJsonResponseExceptionFactoryTestingTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/testing/json/GoogleJsonResponseExceptionFactoryTestingTest.java
@@ -16,7 +16,7 @@
 
 import com.google.api.client.googleapis.json.GoogleJsonResponseException;
 import com.google.api.client.json.JsonFactory;
-import com.google.api.client.json.jackson2.JacksonFactory;
+import com.google.api.client.json.gson.GsonFactory;
 import java.io.IOException;
 import junit.framework.TestCase;
 
@@ -27,7 +27,7 @@
  */
 public class GoogleJsonResponseExceptionFactoryTestingTest extends TestCase {
 
-  private static final JsonFactory JSON_FACTORY = new JacksonFactory();
+  private static final JsonFactory JSON_FACTORY = new GsonFactory();
   private static final int HTTP_CODE_NOT_FOUND = 404;
   private static final String REASON_PHRASE_NOT_FOUND = "NOT FOUND";
 
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/util/UtilsTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/util/UtilsTest.java
index c4326747e..f2b47e21d 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/util/UtilsTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/util/UtilsTest.java
@@ -17,7 +17,6 @@
 import com.google.api.client.http.HttpTransport;
 import com.google.api.client.http.javanet.NetHttpTransport;
 import com.google.api.client.json.JsonFactory;
-import com.google.api.client.json.jackson2.JacksonFactory;
 import java.io.IOException;
 import java.net.URLDecoder;
 import java.util.HashMap;
@@ -34,7 +33,6 @@ public class UtilsTest extends TestCase {
   public void testGetDefaultJsonFactory() {
     JsonFactory jsonFactory = Utils.getDefaultJsonFactory();
     assertNotNull(jsonFactory);
-    assertTrue(jsonFactory instanceof JacksonFactory);
     JsonFactory secondCall = Utils.getDefaultJsonFactory();
     assertSame(jsonFactory, secondCall);
   }

From 677011ea4ec40e85d6e219de4e0d8d095b40acd8 Mon Sep 17 00:00:00 2001
From: Elliotte Rusty Harold 
Date: Thu, 14 Jan 2021 22:56:03 +0000
Subject: [PATCH 22/24] deps: update Guava to 30.1 (#1658)

---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 73d93ed2a..1822fa68f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -470,7 +470,7 @@
     3.0.2
     2.8.6
     3.14.0
-    30.0-android
+    30.1-android
     1.9.84
     1.1.4c
     2.3-eb

From 3e9169f1af87dd947d24440f82fd4e0d7d4e4e5a Mon Sep 17 00:00:00 2001
From: Elliotte Rusty Harold 
Date: Thu, 14 Jan 2021 22:58:03 +0000
Subject: [PATCH 23/24] fix: remove unused code (#1664)

---
 .../googleapis/batch/BatchRequestTest.java    | 10 ----------
 .../api/client/googleapis/util/UtilsTest.java | 19 -------------------
 2 files changed, 29 deletions(-)

diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java
index 5ddb9e931..c10125e16 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/batch/BatchRequestTest.java
@@ -273,16 +273,6 @@ public boolean handleResponse(
     }
   }
 
-  @Deprecated
-  private static class MockExponentialBackOffPolicy extends ExponentialBackOffPolicy {
-    public MockExponentialBackOffPolicy() {}
-
-    @Override
-    public long getNextBackOffMillis() {
-      return 0;
-    }
-  }
-
   private static class MockTransport extends MockHttpTransport {
 
     final boolean testServerError;
diff --git a/google-api-client/src/test/java/com/google/api/client/googleapis/util/UtilsTest.java b/google-api-client/src/test/java/com/google/api/client/googleapis/util/UtilsTest.java
index f2b47e21d..49bd02a74 100644
--- a/google-api-client/src/test/java/com/google/api/client/googleapis/util/UtilsTest.java
+++ b/google-api-client/src/test/java/com/google/api/client/googleapis/util/UtilsTest.java
@@ -17,10 +17,6 @@
 import com.google.api.client.http.HttpTransport;
 import com.google.api.client.http.javanet.NetHttpTransport;
 import com.google.api.client.json.JsonFactory;
-import java.io.IOException;
-import java.net.URLDecoder;
-import java.util.HashMap;
-import java.util.Map;
 import junit.framework.TestCase;
 
 /**
@@ -44,19 +40,4 @@ public void testGetDefaultTransport() {
     HttpTransport secondCall = Utils.getDefaultTransport();
     assertSame(transport, secondCall);
   }
-
-  public static Map parseQuery(String query) throws IOException {
-    Map map = new HashMap();
-    String[] entries = query.split("&");
-    for (String entry : entries) {
-      String[] sides = entry.split("=");
-      if (sides.length != 2) {
-        throw new IOException("Invalid Query String");
-      }
-      String key = URLDecoder.decode(sides[0], "UTF-8");
-      String value = URLDecoder.decode(sides[1], "UTF-8");
-      map.put(key, value);
-    }
-    return map;
-  }
 }

From aeb6d00043341d8da0afc2d6c7deeb5f6c76d2ae Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
 <55107282+release-please[bot]@users.noreply.github.com>
Date: Thu, 14 Jan 2021 23:10:02 +0000
Subject: [PATCH 24/24] chore: release 1.31.2 (#1649)

:robot: I have created a release \*beep\* \*boop\*
---
### [1.31.2](https://www.github.com/googleapis/google-api-java-client/compare/v1.31.1...v1.31.2) (2021-01-14)


### Bug Fixes

* remove unused code ([#1664](https://www.github.com/googleapis/google-api-java-client/issues/1664)) ([3e9169f](https://www.github.com/googleapis/google-api-java-client/commit/3e9169f1af87dd947d24440f82fd4e0d7d4e4e5a))
* use Gson instead of Jackson ([#1661](https://www.github.com/googleapis/google-api-java-client/issues/1661)) ([63ed2ca](https://www.github.com/googleapis/google-api-java-client/commit/63ed2caecc200a407ef40b249bed158f18e2c5ae))


### Documentation

* Update the documentation link for GoogleCredential from deprecated version to newer version ([#1652](https://www.github.com/googleapis/google-api-java-client/issues/1652)) ([98db6ca](https://www.github.com/googleapis/google-api-java-client/commit/98db6ca0113396e715894a083227f062269ca93d))


### Dependencies

* update Guava to 30.0 ([#1645](https://www.github.com/googleapis/google-api-java-client/issues/1645)) ([9e34f37](https://www.github.com/googleapis/google-api-java-client/commit/9e34f37e2ef667507e03cb2d495b2c945851eb30))
* update Guava to 30.1 ([#1658](https://www.github.com/googleapis/google-api-java-client/issues/1658)) ([677011e](https://www.github.com/googleapis/google-api-java-client/commit/677011ea4ec40e85d6e219de4e0d8d095b40acd8))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
---
 CHANGELOG.md                        | 19 +++++++++++++++++++
 README.md                           |  4 ++--
 google-api-client-android/pom.xml   |  2 +-
 google-api-client-appengine/pom.xml |  2 +-
 google-api-client-assembly/pom.xml  |  2 +-
 google-api-client-bom/pom.xml       | 22 +++++++++++-----------
 google-api-client-gson/pom.xml      |  2 +-
 google-api-client-jackson2/pom.xml  |  2 +-
 google-api-client-java6/pom.xml     |  2 +-
 google-api-client-protobuf/pom.xml  |  2 +-
 google-api-client-servlet/pom.xml   |  2 +-
 google-api-client-xml/pom.xml       |  2 +-
 google-api-client/pom.xml           |  2 +-
 pom.xml                             |  2 +-
 versions.txt                        |  2 +-
 15 files changed, 44 insertions(+), 25 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index b555aa6ad..b75eb499c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,24 @@
 # Changelog
 
+### [1.31.2](https://www.github.com/googleapis/google-api-java-client/compare/v1.31.1...v1.31.2) (2021-01-14)
+
+
+### Bug Fixes
+
+* remove unused code ([#1664](https://www.github.com/googleapis/google-api-java-client/issues/1664)) ([3e9169f](https://www.github.com/googleapis/google-api-java-client/commit/3e9169f1af87dd947d24440f82fd4e0d7d4e4e5a))
+* use Gson instead of Jackson ([#1661](https://www.github.com/googleapis/google-api-java-client/issues/1661)) ([63ed2ca](https://www.github.com/googleapis/google-api-java-client/commit/63ed2caecc200a407ef40b249bed158f18e2c5ae))
+
+
+### Documentation
+
+* Update the documentation link for GoogleCredential from deprecated version to newer version ([#1652](https://www.github.com/googleapis/google-api-java-client/issues/1652)) ([98db6ca](https://www.github.com/googleapis/google-api-java-client/commit/98db6ca0113396e715894a083227f062269ca93d))
+
+
+### Dependencies
+
+* update Guava to 30.0 ([#1645](https://www.github.com/googleapis/google-api-java-client/issues/1645)) ([9e34f37](https://www.github.com/googleapis/google-api-java-client/commit/9e34f37e2ef667507e03cb2d495b2c945851eb30))
+* update Guava to 30.1 ([#1658](https://www.github.com/googleapis/google-api-java-client/issues/1658)) ([677011e](https://www.github.com/googleapis/google-api-java-client/commit/677011ea4ec40e85d6e219de4e0d8d095b40acd8))
+
 ### [1.31.1](https://www.github.com/googleapis/google-api-java-client/compare/v1.31.0...v1.31.1) (2020-11-16)
 
 
diff --git a/README.md b/README.md
index 750e4c398..07099f33f 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@ To use Maven, add the following lines to your pom.xml file:
       
         com.google.api-client
         google-api-client
-        1.31.1
+        1.31.2
       
     
   
@@ -48,7 +48,7 @@ repositories {
     google()
 }
 dependencies {
-    compile 'com.google.api-client:google-api-client:1.31.1'
+    compile 'com.google.api-client:google-api-client:1.31.2'
 }
 ```
 [//]: # ({x-version-update-end})
diff --git a/google-api-client-android/pom.xml b/google-api-client-android/pom.xml
index 526413ea4..e44f94913 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.31.2-SNAPSHOT
+    1.31.2
     ../pom.xml
   
   google-api-client-android
diff --git a/google-api-client-appengine/pom.xml b/google-api-client-appengine/pom.xml
index 66f3b889e..afa509049 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.31.2-SNAPSHOT
+    1.31.2
     ../pom.xml
   
   google-api-client-appengine
diff --git a/google-api-client-assembly/pom.xml b/google-api-client-assembly/pom.xml
index 4f406f3b2..2571591c7 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.31.2-SNAPSHOT
+    1.31.2
     ../pom.xml
   
   com.google.api-client
diff --git a/google-api-client-bom/pom.xml b/google-api-client-bom/pom.xml
index 194059082..c08b3d8b7 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.31.2-SNAPSHOT
+  1.31.2
   pom
 
   Google API Client Library for Java BOM
@@ -63,52 +63,52 @@
       
         com.google.api-client
         google-api-client
-        1.31.2-SNAPSHOT
+        1.31.2
       
       
         com.google.api-client
         google-api-client-android
-        1.31.2-SNAPSHOT
+        1.31.2
       
       
         com.google.api-client
         google-api-client-appengine
-        1.31.2-SNAPSHOT
+        1.31.2
       
       
         com.google.api-client
         google-api-client-assembly
-        1.31.2-SNAPSHOT
+        1.31.2
       
       
         com.google.api-client
         google-api-client-gson
-        1.31.2-SNAPSHOT
+        1.31.2
       
       
         com.google.api-client
         google-api-client-jackson2
-        1.31.2-SNAPSHOT
+        1.31.2
       
       
         com.google.api-client
         google-api-client-java6
-        1.31.2-SNAPSHOT
+        1.31.2
       
       
         com.google.api-client
         google-api-client-protobuf
-        1.31.2-SNAPSHOT
+        1.31.2
       
       
         com.google.api-client
         google-api-client-servlet
-        1.31.2-SNAPSHOT
+        1.31.2
       
       
         com.google.api-client
         google-api-client-xml
-        1.31.2-SNAPSHOT
+        1.31.2
       
     
   
diff --git a/google-api-client-gson/pom.xml b/google-api-client-gson/pom.xml
index 7dfb9bf1a..76de1fbc1 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.31.2-SNAPSHOT
+    1.31.2
     ../pom.xml
   
   google-api-client-gson
diff --git a/google-api-client-jackson2/pom.xml b/google-api-client-jackson2/pom.xml
index 2609b690d..33564e73d 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.31.2-SNAPSHOT
+    1.31.2
     ../pom.xml
   
   google-api-client-jackson2
diff --git a/google-api-client-java6/pom.xml b/google-api-client-java6/pom.xml
index 8c4d7d95d..027654c64 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.31.2-SNAPSHOT
+    1.31.2
     ../pom.xml
   
   google-api-client-java6
diff --git a/google-api-client-protobuf/pom.xml b/google-api-client-protobuf/pom.xml
index a8cbc1573..ae778fe10 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.31.2-SNAPSHOT
+    1.31.2
     ../pom.xml
   
   google-api-client-protobuf
diff --git a/google-api-client-servlet/pom.xml b/google-api-client-servlet/pom.xml
index e6a244974..45c0c8b0a 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.31.2-SNAPSHOT
+    1.31.2
     ../pom.xml
   
   google-api-client-servlet
diff --git a/google-api-client-xml/pom.xml b/google-api-client-xml/pom.xml
index afda4cd6b..62699c3f9 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.31.2-SNAPSHOT
+    1.31.2
     ../pom.xml
   
   google-api-client-xml
diff --git a/google-api-client/pom.xml b/google-api-client/pom.xml
index 5cb54fbd9..ea94a8f6c 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.31.2-SNAPSHOT
+    1.31.2
     ../pom.xml
   
   google-api-client
diff --git a/pom.xml b/pom.xml
index 1822fa68f..64243c20f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
   
   com.google.api-client
   google-api-client-parent
-  1.31.2-SNAPSHOT
+  1.31.2
   pom
   Parent for the Google API Client Library for Java
 
diff --git a/versions.txt b/versions.txt
index 23230b82e..1a2f9545c 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,4 +1,4 @@
 # Format:
 # module:released-version:current-version
 
-google-api-client:1.31.1:1.31.2-SNAPSHOT
+google-api-client:1.31.2:1.31.2