diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index af5dd3bd5..5f013f14b 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -28,11 +28,19 @@ branchProtectionRules: requiresStrictStatusChecks: false # List of required status check contexts that must pass for commits to be accepted to matching branches. requiredStatusCheckContexts: + - "units (7)" + - "units (8)" + - "units (11)" + - "windows" + - "dependencies (8)" + - "dependencies (11)" + - "linkage-monitor" + - "lint" + - "clirr" - "Kokoro - Test: Binary Compatibility" - "Kokoro - Test: Java 11" - "Kokoro - Test: Java 7" - "Kokoro - Test: Java 8" - - "Kokoro - Test: Linkage Monitor" - "cla/google" # List of explicit permissions to add (additive only) diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 2b6cdbc97..7c8816a7d 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -4,7 +4,7 @@ name: auto-release jobs: approve: runs-on: ubuntu-latest - if: contains(github.head_ref, 'release-v') + if: contains(github.head_ref, 'release-please') steps: - uses: actions/github-script@v3 with: @@ -16,8 +16,8 @@ jobs: return; } - // only approve PRs like "chore: release " - if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + // only approve PRs like "chore(master): release " + if ( !context.payload.pull_request.title.startsWith("chore(master): release") ) { return; } diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 683022075..16e5abaa7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,6 +16,7 @@ jobs: with: java-version: ${{matrix.java}} - run: java -version + - run: .kokoro/install_dependencies.sh - run: .kokoro/build.sh env: JOB_TYPE: test @@ -26,12 +27,30 @@ jobs: windows: runs-on: windows-latest steps: + - name: git configuration to avoid automatic CRLF conversion + run: | + git config --global core.autocrlf false + git config --global core.eol lf - uses: actions/checkout@v2 - uses: actions/setup-java@v1 with: java-version: 8 - run: java -version - - run: .kokoro/build.bat + - name: Install google-play-services artifact + shell: bash + run: | + mkdir play-services + cd play-services + curl --output play-services-basement-8.3.0.aar 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 + - run: .kokoro/build.sh + shell: bash env: JOB_TYPE: test dependencies: @@ -45,6 +64,7 @@ jobs: with: java-version: ${{matrix.java}} - run: java -version + - run: .kokoro/install_dependencies.sh - run: .kokoro/dependencies.sh linkage-monitor: runs-on: ubuntu-latest @@ -54,15 +74,21 @@ jobs: with: java-version: 8 - run: java -version - - run: .kokoro/linkage-monitor.sh + - 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: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 with: - java-version: 8 + java-version: 11 - run: java -version + - run: .kokoro/install_dependencies.sh - run: .kokoro/build.sh env: JOB_TYPE: lint @@ -74,6 +100,7 @@ jobs: with: java-version: 8 - run: java -version + - run: .kokoro/install_dependencies.sh - run: .kokoro/build.sh env: JOB_TYPE: clirr \ No newline at end of file diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml deleted file mode 100644 index c46230a78..000000000 --- a/.github/workflows/samples.yaml +++ /dev/null @@ -1,14 +0,0 @@ -on: - pull_request: -name: samples -jobs: - checkstyle: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 8 - - name: Run checkstyle - run: mvn -P lint --quiet --batch-mode checkstyle:check - working-directory: samples/snippets diff --git a/.kokoro/build.sh b/.kokoro/build.sh index ec4082dc8..144780874 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -29,7 +29,7 @@ echo ${JOB_TYPE} # attempt to install 3 times with exponential backoff (starting with 10 seconds) retry_with_backoff 3 10 \ - mvn install -B -V \ + mvn install -B -V -ntp \ -DskipTests=true \ -Dclirr.skip=true \ -Denforcer.skip=true \ @@ -60,6 +60,7 @@ javadoc) ;; integration) mvn -B ${INTEGRATION_TEST_ARGS} \ + -ntp \ -Penable-integration-tests \ -DtrimStackTrace=false \ -Dclirr.skip=true \ @@ -81,6 +82,7 @@ samples) pushd ${SAMPLES_DIR} mvn -B \ -Penable-samples \ + -ntp \ -DtrimStackTrace=false \ -Dclirr.skip=true \ -Denforcer.skip=true \ @@ -110,8 +112,8 @@ bash .kokoro/coerce_logs.sh if [[ "${ENABLE_BUILD_COP}" == "true" ]] then - chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop - ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/google-api-java-client + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot + ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/google-api-java-client fi echo "exiting with ${RETURN_CODE}" diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index c91e5a569..0fb8c8436 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -31,7 +31,7 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" # this should run maven enforcer retry_with_backoff 3 10 \ - mvn install -B -V \ + mvn install -B -V -ntp \ -DskipTests=true \ -Dclirr.skip=true @@ -86,4 +86,4 @@ then else msg "Errors found. See log statements above." exit 1 -fi \ No newline at end of file +fi diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh deleted file mode 100755 index 759ab4e2c..000000000 --- a/.kokoro/linkage-monitor.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# Copyright 2019 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 - -## Get the directory of the build script -scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) -## cd to the parent directory, i.e. the root of the git repo -cd ${scriptDir}/.. - -# include common functions -source ${scriptDir}/common.sh - -# Print out Java version -java -version -echo ${JOB_TYPE} - -# attempt to install 3 times with exponential backoff (starting with 10 seconds) -retry_with_backoff 3 10 \ - mvn install -B -V \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true - -# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR -JAR=linkage-monitor-latest-all-deps.jar -curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" - -# Fails if there's new linkage errors compared with baseline -java -jar ${JAR} com.google.cloud:libraries-bom diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg index e116bedf0..b9d08f976 100644 --- a/.kokoro/release/publish_javadoc.cfg +++ b/.kokoro/release/publish_javadoc.cfg @@ -7,10 +7,10 @@ env_vars: { value: "docs-staging" } +# cloud-rad staging env_vars: { key: "STAGING_BUCKET_V2" - value: "docs-staging-v2" - # Production will be at: docs-staging-v2 + value: "docs-staging-v2-staging" } env_vars: { @@ -26,4 +26,4 @@ before_action { keyname: "docuploader_service_account" } } -} +} \ No newline at end of file diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 2e8da5c70..187fa02f9 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -71,7 +71,7 @@ python3 -m docuploader create-metadata \ --version ${VERSION} \ --language java -# upload docs +# upload docs to staging bucket python3 -m docuploader upload . \ --credentials ${CREDENTIALS} \ --staging-bucket ${STAGING_BUCKET_V2} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg new file mode 100644 index 000000000..9d466b639 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.cfg @@ -0,0 +1,30 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# cloud-rad production +env_vars: { + key: "STAGING_BUCKET_V2" + value: "docs-staging-v2" +} + +# Configure the docker image for kokoro-trampoline +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-api-java-client/.kokoro/release/publish_javadoc11.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh new file mode 100755 index 000000000..06f80e9f2 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2021 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. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET_V2}" ]]; then + echo "Need to set STAGING_BUCKET_V2 environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-api-client +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# V3 generates docfx yml from javadoc +# generate yml +mvn clean site -B -q -P docFX + +pushd target/docfx-yml + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload yml to production bucket +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} \ + --destination-prefix docfx- diff --git a/CHANGELOG.md b/CHANGELOG.md index b75eb499c..52c99ce44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.31.3](https://www.github.com/googleapis/google-api-java-client/compare/v1.31.2...v1.31.3) (2021-03-01) + + +### Dependencies + +* update google-http-client to v1.39.0 ([#1731](https://www.github.com/googleapis/google-api-java-client/issues/1731)) ([918fc3b](https://www.github.com/googleapis/google-api-java-client/commit/918fc3bc2eb45d704edad6c02ca811348c6df922)) + ### [1.31.2](https://www.github.com/googleapis/google-api-java-client/compare/v1.31.1...v1.31.2) (2021-01-14) diff --git a/LICENSE b/LICENSE index d64569567..261eeb9e9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/README.md b/README.md index 07099f33f..51bfa4dee 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.2 + 1.31.3 @@ -48,7 +48,7 @@ repositories { google() } dependencies { - compile 'com.google.api-client:google-api-client:1.31.2' + compile 'com.google.api-client:google-api-client:1.31.3' } ``` [//]: # ({x-version-update-end}) diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml index 350c453fe..143a6d04e 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle-suppressions.xml @@ -4,13 +4,8 @@ "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd"> - - - - - - - + + diff --git a/checkstyle.xml b/checkstyle.xml index fc5ea564d..2fcb7a388 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -72,12 +72,8 @@ page at http://checkstyle.sourceforge.net/config.html --> - - - - @@ -183,22 +179,6 @@ page at http://checkstyle.sourceforge.net/config.html --> --> - - - - - - - - - - @@ -316,7 +296,23 @@ page at http://checkstyle.sourceforge.net/config.html --> --> + + + + + + + + + + diff --git a/docs/oauth-2.0.md b/docs/oauth-2.0.md index 6156d629d..56a72b165 100644 --- a/docs/oauth-2.0.md +++ b/docs/oauth-2.0.md @@ -38,23 +38,31 @@ that runs in browser. For instructions on setting up your credentials properly, see the [API Console Help][console-help]. -## Credential +## Credentials -### GoogleCredential +### GoogleCredentials -[`GoogleCredential`][google-credential] is a thread-safe helper class for OAuth +[`GoogleCredentials`][google-credentials] is a thread-safe helper class for OAuth 2.0 for accessing protected resources using an access token. For example, if you already have an access token, you can make a request in the following way: ```java -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") +import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; +import com.google.api.client.json.gson.GsonFactory; +import com.google.api.services.books.Books; +import com.google.auth.http.HttpCredentialsAdapter; +import com.google.auth.oauth2.AccessToken; +import com.google.auth.oauth2.GoogleCredentials; + +GoogleCredentials credentials = + GoogleCredentials.newBuilder().setAccessToken(new AccessToken("token", null)).build(); + +Books books = + new Books.Builder( + GoogleNetHttpTransport.newTrustedTransport(), + GsonFactory.getDefaultInstance(), + new HttpCredentialsAdapter(credentials)) + .setApplicationName("BooksExample/1.0") .build(); ``` @@ -70,24 +78,38 @@ Use [`AppIdentityCredential`][app-identity-credential] (from App Engine takes care of all of the details. You only specify the OAuth 2.0 scope you need. -Example code taken from [urlshortener-robots-appengine-sample][urlshortener-sample]: - ```java -static Urlshortener newUrlshortener() { - AppIdentityCredential credential = - new AppIdentityCredential( - Collections.singletonList(UrlshortenerScopes.URLSHORTENER)); - return new Urlshortener.Builder(new UrlFetchTransport(), - JacksonFactory.getDefaultInstance(), - credential) - .build(); -} +import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; +import com.google.api.client.json.gson.GsonFactory; +import com.google.api.services.books.Books; +import com.google.appengine.api.appidentity.AppIdentityService; +import com.google.appengine.api.appidentity.AppIdentityServiceFactory; +import com.google.auth.appengine.AppEngineCredentials; +import com.google.auth.http.HttpCredentialsAdapter; +import com.google.auth.oauth2.GoogleCredentials; +import java.util.Arrays; + +AppIdentityService appIdentityService = AppIdentityServiceFactory.getAppIdentityService(); + +GoogleCredentials credentials = + AppEngineCredentials.newBuilder() + .setScopes(Arrays.asList("scope1", "scope2", "scope3")) + .setAppIdentityService(appIdentityService) + .build(); + +Books books = + new Books.Builder( + GoogleNetHttpTransport.newTrustedTransport(), + GsonFactory.getDefaultInstance(), + new HttpCredentialsAdapter(credentials)) + .setApplicationName("BooksExample/1.0") + .build(); ``` ## Data store An access token typically has an expiration date of 1 hour, after which you will -get an error if you try to use it. [GoogleCredential][google-credential] takes +get an error if you try to use it. [GoogleCredentials][google-credentials] takes care of automatically "refreshing" the token, which simply means getting a new access token. This is done by means of a long-lived refresh token, which is typically received along with the access token if you use the @@ -201,7 +223,7 @@ public class CalendarServletSample extends AbstractAuthorizationCodeServlet { @Override protected AuthorizationCodeFlow initializeFlow() throws IOException { return new GoogleAuthorizationCodeFlow.Builder( - new NetHttpTransport(), JacksonFactory.getDefaultInstance(), + new NetHttpTransport(), GsonFactory.getDefaultInstance(), "[[ENTER YOUR CLIENT ID]]", "[[ENTER YOUR CLIENT SECRET]]", Collections.singleton(CalendarScopes.CALENDAR)).setDataStoreFactory( DATA_STORE_FACTORY).setAccessType("offline").build(); @@ -238,7 +260,7 @@ public class CalendarServletCallbackSample extends AbstractAuthorizationCodeCall @Override protected AuthorizationCodeFlow initializeFlow() throws IOException { return new GoogleAuthorizationCodeFlow.Builder( - new NetHttpTransport(), JacksonFactory.getDefaultInstance() + new NetHttpTransport(), GsonFactory.getDefaultInstance() "[[ENTER YOUR CLIENT ID]]", "[[ENTER YOUR CLIENT SECRET]]", Collections.singleton(CalendarScopes.CALENDAR)).setDataStoreFactory( DATA_STORE_FACTORY).setAccessType("offline").build(); @@ -342,7 +364,7 @@ For an additional sample, see ### Service accounts -[GoogleCredential][google-credential] also supports [service accounts][service-accounts]. +[GoogleCredentials][google-credentials] also supports [service accounts][service-accounts]. Unlike the credential in which a client application requests access to an 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 @@ -352,7 +374,7 @@ For example, you can make a request in the following way: ```java HttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport(); -JsonFactory jsonFactory = JacksonFactory.getDefaultInstance(); +JsonFactory jsonFactory = GsonFactory.getDefaultInstance(); //Build service account credential GoogleCredentials googleCredentials = GoogleCredentials. @@ -530,7 +552,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { } ``` -[google-credential]: https://googleapis.dev/java/google-auth-library/latest/com/google/auth/oauth2/GoogleCredentials.html +[google-credentials]: https://googleapis.dev/java/google-auth-library/latest/index.html?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 @@ -539,7 +561,6 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) { [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 [auth-code-flow-set-access-type]: https://googleapis.dev/java/google-api-client/latest/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeFlow.Builder.html#setAccessType-java.lang.String- [data-store-factory]: https://googleapis.dev/java/google-http-client/latest/com/google/api/client/util/store/DataStoreFactory.html [stored-credential]: https://googleapis.dev/java/google-oauth-client/latest/com/google/api/client/auth/oauth2/StoredCredential.html diff --git a/google-api-client-android/pom.xml b/google-api-client-android/pom.xml index e44f94913..b3ec4bf4a 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 + 1.31.3 ../pom.xml google-api-client-android @@ -43,13 +43,9 @@ 4.1.1.4 provided - - com.google.api-client - google-api-client - com.google.http-client - google-http-client-android + google-http-client com.google.android.google-play-services diff --git a/google-api-client-appengine/pom.xml b/google-api-client-appengine/pom.xml index afa509049..6cd208dee 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 + 1.31.3 ../pom.xml google-api-client-appengine @@ -91,9 +91,22 @@ appengine-api-1.0-sdk provided + + javax.servlet + servlet-api + provided + + + com.google.http-client + google-http-client + + + com.google.http-client + google-http-client-gson + com.google.oauth-client - google-oauth-client-appengine + google-oauth-client com.google.api-client @@ -113,15 +126,5 @@ junit test - - com.google.http-client - google-http-client-jackson2 - test - - - com.google.guava - guava - test - diff --git a/google-api-client-assembly/pom.xml b/google-api-client-assembly/pom.xml index 2571591c7..99d34a56f 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 + 1.31.3 ../pom.xml com.google.api-client diff --git a/google-api-client-bom/pom.xml b/google-api-client-bom/pom.xml index c08b3d8b7..a5a33eb24 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 + 1.31.3 pom Google API Client Library for Java BOM @@ -63,52 +63,53 @@ com.google.api-client google-api-client - 1.31.2 + 1.31.3 com.google.api-client google-api-client-android - 1.31.2 + 1.31.3 com.google.api-client google-api-client-appengine - 1.31.2 + 1.31.3 com.google.api-client google-api-client-assembly - 1.31.2 + 1.31.3 + pom com.google.api-client google-api-client-gson - 1.31.2 + 1.31.3 com.google.api-client google-api-client-jackson2 - 1.31.2 + 1.31.3 com.google.api-client google-api-client-java6 - 1.31.2 + 1.31.3 com.google.api-client google-api-client-protobuf - 1.31.2 + 1.31.3 com.google.api-client google-api-client-servlet - 1.31.2 + 1.31.3 com.google.api-client google-api-client-xml - 1.31.2 + 1.31.3 diff --git a/google-api-client-gson/pom.xml b/google-api-client-gson/pom.xml index 76de1fbc1..0203dcd74 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 + 1.31.3 ../pom.xml google-api-client-gson @@ -76,6 +76,10 @@ com.google.api-client google-api-client + + com.google.http-client + google-http-client + com.google.http-client google-http-client-gson diff --git a/google-api-client-jackson2/pom.xml b/google-api-client-jackson2/pom.xml index 33564e73d..b56e9c80b 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 + 1.31.3 ../pom.xml google-api-client-jackson2 @@ -78,7 +78,11 @@ com.google.http-client - google-http-client-jackson2 + google-http-client-gson + + + com.google.http-client + google-http-client diff --git a/google-api-client-java6/pom.xml b/google-api-client-java6/pom.xml index 027654c64..ef4bfe924 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 + 1.31.3 ../pom.xml google-api-client-java6 @@ -92,10 +92,5 @@ com.google.oauth-client google-oauth-client-java6 - - junit - junit - test - diff --git a/google-api-client-protobuf/pom.xml b/google-api-client-protobuf/pom.xml index ae778fe10..c933af29e 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 + 1.31.3 ../pom.xml google-api-client-protobuf @@ -98,6 +98,10 @@ com.google.http-client google-http-client-protobuf + + com.google.http-client + google-http-client + com.google.api-client google-api-client diff --git a/google-api-client-servlet/pom.xml b/google-api-client-servlet/pom.xml index 45c0c8b0a..b4f920751 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 + 1.31.3 ../pom.xml google-api-client-servlet @@ -73,26 +73,17 @@ - - com.google.oauth-client - google-oauth-client-servlet - com.google.api-client google-api-client - junit - junit - test + com.google.http-client + google-http-client javax.servlet servlet-api - - javax.jdo - jdo2-api - diff --git a/google-api-client-xml/pom.xml b/google-api-client-xml/pom.xml index 62699c3f9..5d326dcdb 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 + 1.31.3 ../pom.xml google-api-client-xml @@ -73,8 +73,12 @@ - com.google.api-client - google-api-client + xpp3 + xpp3 + + + com.google.http-client + google-http-client com.google.http-client diff --git a/google-api-client/pom.xml b/google-api-client/pom.xml index ea94a8f6c..1beafce52 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 + 1.31.3 ../pom.xml google-api-client @@ -125,29 +125,41 @@ com.google.http-client google-http-client-gson + + com.google.guava + guava + com.google.http-client - google-http-client-protobuf - test + google-http-client-apache-v2 - junit - junit - test + org.apache.httpcomponents + httpcore - commons-codec - commons-codec - provided - 1.15 - + org.apache.httpcomponents + httpclient + - com.google.guava - guava + com.google.http-client + google-http-client + + + com.google.protobuf + protobuf-java + test com.google.http-client - google-http-client-apache-v2 + google-http-client-protobuf + test + + junit + junit + test + + 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 cd8d6cb76..22dac16fe 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 @@ -51,8 +51,7 @@ private static Payload newPayload(String clientId) { public void testBuilder() throws Exception { GoogleIdTokenVerifier.Builder builder = new GoogleIdTokenVerifier.Builder( - new GooglePublicKeysManagerTest.PublicCertsMockHttpTransport(), - new GsonFactory()) + new GooglePublicKeysManagerTest.PublicCertsMockHttpTransport(), new GsonFactory()) .setIssuer(ISSUER) .setAudience(TRUSTED_CLIENT_IDS); assertEquals(Clock.SYSTEM, builder.getClock()); @@ -70,8 +69,7 @@ public void testBuilder() throws Exception { public void testVerify() throws Exception { GoogleIdTokenVerifier verifier = new GoogleIdTokenVerifier.Builder( - new GooglePublicKeysManagerTest.PublicCertsMockHttpTransport(), - new GsonFactory()) + new GooglePublicKeysManagerTest.PublicCertsMockHttpTransport(), new GsonFactory()) .build(); Header header = new Header(); header.setAlgorithm("RS25"); 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 af586708b..59ee7794d 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 @@ -101,8 +101,7 @@ public LowLevelHttpResponse execute() { public void testRefresh() throws Exception { GooglePublicKeysManager certs = - new GooglePublicKeysManager.Builder( - new PublicCertsMockHttpTransport(), new GsonFactory()) + new GooglePublicKeysManager.Builder(new PublicCertsMockHttpTransport(), new GsonFactory()) .build(); certs.refresh(); assertEquals(2, certs.getPublicKeys().size()); 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 c10125e16..1032d448d 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 @@ -11,7 +11,6 @@ import com.google.api.client.googleapis.testing.services.MockGoogleClient; import com.google.api.client.googleapis.testing.services.MockGoogleClientRequest; import com.google.api.client.http.ByteArrayContent; -import com.google.api.client.http.ExponentialBackOffPolicy; import com.google.api.client.http.GenericUrl; import com.google.api.client.http.HttpContent; import com.google.api.client.http.HttpExecuteInterceptor; diff --git a/pom.xml b/pom.xml index 64243c20f..2c80fa596 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.google.api-client google-api-client-parent - 1.31.2 + 1.31.3 pom Parent for the Google API Client Library for Java @@ -89,7 +89,7 @@ junit junit - 4.13.1 + 4.13.2 com.google.appengine @@ -121,6 +121,16 @@ servlet-api ${project.servlet-api.version} + + org.apache.httpcomponents + httpcore + ${project.httpcore.version} + + + org.apache.httpcomponents + httpclient + ${project.httpclient.version} + com.google.http-client google-http-client-bom @@ -274,7 +284,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.1.1 + 3.1.2 org.codehaus.mojo @@ -306,6 +316,11 @@ maven-resources-plugin 3.2.0 + + org.apache.maven.plugins + maven-dependency-plugin + 3.1.2 + @@ -465,11 +480,13 @@ UTF-8 - 1.38.1 + 1.39.0 + 4.4.14 + 4.5.13 1.31.4 3.0.2 2.8.6 - 3.14.0 + 3.15.1 30.1-android 1.9.84 1.1.4c @@ -544,7 +561,7 @@ com.puppycrawl.tools checkstyle - 8.23 + 8.39 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 3b6d8dd9d..c2c0d9844 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,20 +29,20 @@ com.google.api-client google-api-client - 1.31.1 + 1.31.2 junit junit - 4.13.1 + 4.13.2 test com.google.truth truth - 1.0.1 + 1.1.2 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index a7355a678..8ef2602dc 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,20 +28,20 @@ com.google.api-client google-api-client - 1.31.1 + 1.31.2 junit junit - 4.13.1 + 4.13.2 test com.google.truth truth - 1.0.1 + 1.1.2 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index d2e1c569c..d7ef7a853 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.2.1 + 18.0.0 pom import @@ -47,13 +47,13 @@ junit junit - 4.13.1 + 4.13.2 test com.google.truth truth - 1.0.1 + 1.1.2 test diff --git a/synth.metadata b/synth.metadata index 4605311af..413d8bdaf 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-java-client.git", - "sha": "aabf57e534c852b1bb54545079e1eacfec38eb6c" + "sha": "9c1b449d369b4e09230ff459be42a9145901dcea" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6133907dbb3ddab204a17a15d5c53ec0aae9b033" + "sha": "6946fd71ae9215b0e7ae188f5057df765ee6d7d2" } } ], @@ -29,8 +29,6 @@ ".github/trusted-contribution.yml", ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", - ".github/workflows/ci.yaml", - ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/build.sh", ".kokoro/coerce_logs.sh", @@ -40,7 +38,6 @@ ".kokoro/continuous/java8.cfg", ".kokoro/continuous/readme.cfg", ".kokoro/dependencies.sh", - ".kokoro/linkage-monitor.sh", ".kokoro/nightly/common.cfg", ".kokoro/nightly/integration.cfg", ".kokoro/nightly/java11.cfg", @@ -72,6 +69,8 @@ ".kokoro/release/promote.sh", ".kokoro/release/publish_javadoc.cfg", ".kokoro/release/publish_javadoc.sh", + ".kokoro/release/publish_javadoc11.cfg", + ".kokoro/release/publish_javadoc11.sh", ".kokoro/release/snapshot.cfg", ".kokoro/release/snapshot.sh", ".kokoro/release/stage.cfg", diff --git a/synth.py b/synth.py index 24ab1bcac..26c4d5bf3 100644 --- a/synth.py +++ b/synth.py @@ -22,4 +22,6 @@ "checkstyle.xml", "renovate.json", "license-checks.xml", + ".github/workflows/ci.yaml", + ".github/workflows/samples.yaml", ]) diff --git a/versions.txt b/versions.txt index 1a2f9545c..8b61cc75f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -google-api-client:1.31.2:1.31.2 +google-api-client:1.31.3:1.31.3