Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: googleapis/google-api-java-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.30.9
Choose a base ref
...
head repository: googleapis/google-api-java-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.30.10
Choose a head ref

Commits on Mar 5, 2020

  1. chore: release 1.30.10-SNAPSHOT (#1498)

    * updated versions.txt [ci skip]
    
    * updated google-api-client-android/pom.xml [ci skip]
    
    * updated google-api-client-appengine/pom.xml [ci skip]
    
    * updated google-api-client-assembly/pom.xml [ci skip]
    
    * updated google-api-client-bom/pom.xml [ci skip]
    
    * updated google-api-client-gson/pom.xml [ci skip]
    
    * updated google-api-client-jackson2/pom.xml [ci skip]
    
    * updated google-api-client-java6/pom.xml [ci skip]
    
    * updated google-api-client-protobuf/pom.xml [ci skip]
    
    * updated google-api-client-servlet/pom.xml [ci skip]
    
    * updated google-api-client-xml/pom.xml [ci skip]
    
    * updated google-api-client/pom.xml [ci skip]
    
    * updated pom.xml [ci skip]
    chingor13 authored Mar 5, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e3f4698 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b9c222c View commit details

Commits on Mar 9, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5b1968d View commit details

Commits on Mar 10, 2020

  1. deps: remove excess dependencies (#1502)

    * remove unused dependencies
    
    * remove unused dependencies
    elharo authored Mar 10, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    dbe6287 View commit details
  2. 1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6c8dbb3 View commit details

Commits on Mar 13, 2020

  1. fix: cleanup checkstyle import rules (#1503)

    * fix: format warnings at head
    * fix: update checkstyle rule for static import
    suraj-qlogic authored Mar 13, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ce22c0e View commit details

Commits on Mar 16, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5ece22c View commit details

Commits on Mar 19, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0f660ff View commit details

Commits on Apr 7, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6312f8b View commit details

Commits on Apr 14, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fda223d View commit details

Commits on Apr 22, 2020

  1. chore: fix synth.metadata (#1519)

    * chore: fix synth.metadata
    
    * chore: sha doesn't exist in synthtool
    
    Just skip the entry and let autosynth figure it out.
    chingor13 authored Apr 22, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9d11712 View commit details

Commits on Jun 3, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b257207 View commit details

Commits on Jun 29, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a4cdec7 View commit details
  2. chore(deps): update dependency org.apache.maven.plugins:maven-project…

    …-info-reports-plugin to v3.1.0 (#1531)
    renovate-bot authored Jun 29, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    aa067ac View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e39e665 View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1f1a9de View commit details
  5. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ebab80d View commit details
  6. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9298194 View commit details

Commits on Jul 8, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1961398 View commit details
  2. chore(deps): update project.http.version to v1.35.0 (#1522)

    * chore(deps): update project.http.version to v1.35.0
    
    * test: stop asserting on full error message
    
    Co-authored-by: Jeff Ching <chingor@google.com>
    renovate-bot and chingor13 authored Jul 8, 2020

    Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    47d0018 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    01c635a View commit details
  4. chore: release 1.30.10 (#1501)

    🤖 I have created a release \*beep\* \*boop\* 
    ---
    ### [1.30.10](https://www.github.com/googleapis/google-api-java-client/compare/v1.30.9...v1.30.10) (2020-07-08)
    
    
    ### Bug Fixes
    
    * cleanup checkstyle import rules ([#1503](https://www.github.com/googleapis/google-api-java-client/issues/1503)) ([ce22c0e](https://www.github.com/googleapis/google-api-java-client/commit/ce22c0ea7d02bd1807eae0076bfe55db1a3b754c))
    * cleanup commented code of version control ([#1504](https://www.github.com/googleapis/google-api-java-client/issues/1504)) ([5b1968d](https://www.github.com/googleapis/google-api-java-client/commit/5b1968d7bb05affd211b3403a6acc18c3d0c23d9))
    
    
    ### Dependencies
    
    * remove excess dependencies ([#1502](https://www.github.com/googleapis/google-api-java-client/issues/1502)) ([dbe6287](https://www.github.com/googleapis/google-api-java-client/commit/dbe6287dac5b7340827a03c0977ad8f350b58eae))
    * update dependency com.google.oauth-client:google-oauth-client-bom to v1.31.0 ([#1544](https://www.github.com/googleapis/google-api-java-client/issues/1544)) ([ebab80d](https://www.github.com/googleapis/google-api-java-client/commit/ebab80d1fec30bde241a5cb7a3146c89aca5359c))
    * update dependency com.google.protobuf:protobuf-java to v3.12.2 ([#1527](https://www.github.com/googleapis/google-api-java-client/issues/1527)) ([a4cdec7](https://www.github.com/googleapis/google-api-java-client/commit/a4cdec7afd3c5fb1b6cb4de05021e156dd9d0a14))
    * update google-http-client to v1.36.0 ([#1551](https://www.github.com/googleapis/google-api-java-client/issues/1551)) ([01c635a](https://www.github.com/googleapis/google-api-java-client/commit/01c635a21fc3d7b549b6a19cbf3359cacf04ef47))
    * update oauth client ([#1499](https://www.github.com/googleapis/google-api-java-client/issues/1499)) ([b9c222c](https://www.github.com/googleapis/google-api-java-client/commit/b9c222cfdc4578dabca48cfbe64068f4f70d3b18))
    * update to Guava 29.0 ([#1516](https://www.github.com/googleapis/google-api-java-client/issues/1516)) ([fda223d](https://www.github.com/googleapis/google-api-java-client/commit/fda223d5da5076396bc896db3227facde17e89e5))
    
    
    ### Documentation
    
    * removes reference to deprecated service (Google+) ([#1530](https://www.github.com/googleapis/google-api-java-client/issues/1530)) ([b257207](https://www.github.com/googleapis/google-api-java-client/commit/b2572075418dbbb86b9da8901184c72966464520))
    ---
    
    
    This PR was generated with [Release Please](https://github.com/googleapis/release-please).
    release-please[bot] authored Jul 8, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    60d83de View commit details
Showing with 834 additions and 253 deletions.
  1. +11 −1 .github/CODEOWNERS
  2. +7 −1 .github/PULL_REQUEST_TEMPLATE.md
  3. +2 −0 .github/trusted-contribution.yml
  4. +79 −0 .github/workflows/ci.yaml
  5. +1 −1 .kokoro/build.bat
  6. +54 −22 .kokoro/build.sh
  7. +59 −0 .kokoro/common.sh
  8. +5 −0 .kokoro/continuous/java8.cfg
  9. +61 −4 .kokoro/dependencies.sh
  10. +15 −7 .kokoro/linkage-monitor.sh
  11. +30 −0 .kokoro/nightly/integration.cfg
  12. +5 −0 .kokoro/nightly/java8.cfg
  13. +22 −15 .kokoro/nightly/samples.cfg
  14. +43 −0 .kokoro/populate-secrets.sh
  15. +13 −11 .kokoro/presubmit/integration.cfg
  16. +5 −0 .kokoro/presubmit/java8.cfg
  17. +13 −11 .kokoro/presubmit/samples.cfg
  18. +2 −0 .kokoro/trampoline.sh
  19. +1 −0 .repo-metadata.json
  20. +23 −0 CHANGELOG.md
  21. +2 −2 CODE_OF_CONDUCT.md
  22. +10 −1 CONTRIBUTING.md
  23. +2 −2 README.md
  24. +2 −3 checkstyle.xml
  25. +19 −9 docs/android.md
  26. +2 −5 docs/errors.md
  27. +1 −1 google-api-client-android/pom.xml
  28. +0 −1 ...main/java/com/google/api/client/googleapis/extensions/android/gms/auth/GoogleAuthIOException.java
  29. +1 −16 google-api-client-appengine/pom.xml
  30. +0 −1 ...java/com/google/api/client/googleapis/extensions/appengine/auth/oauth2/AppIdentityCredential.java
  31. +0 −2 ...google/api/client/googleapis/extensions/appengine/notifications/AppEngineNotificationServlet.java
  32. +3 −2 ...google/api/client/googleapis/extensions/appengine/testing/auth/oauth2/MockAppIdentityService.java
  33. +1 −1 google-api-client-assembly/pom.xml
  34. +13 −13 google-api-client-bom/pom.xml
  35. +1 −1 google-api-client-gson/pom.xml
  36. +1 −1 google-api-client-jackson2/pom.xml
  37. +1 −1 google-api-client-java6/pom.xml
  38. +0 −1 ...main/java/com/google/api/client/googleapis/extensions/java6/auth/oauth2/GooglePromptReceiver.java
  39. +1 −1 google-api-client-protobuf/pom.xml
  40. +0 −1 ...ain/java/com/google/api/client/googleapis/services/protobuf/AbstractGoogleProtoClientRequest.java
  41. +0 −1 ...com/google/api/client/googleapis/services/protobuf/CommonGoogleProtoClientRequestInitializer.java
  42. +1 −1 google-api-client-servlet/pom.xml
  43. +0 −2 ...n/java/com/google/api/client/googleapis/extensions/servlet/notifications/NotificationServlet.java
  44. +0 −2 ...src/main/java/com/google/api/client/googleapis/extensions/servlet/notifications/WebhookUtils.java
  45. +1 −1 google-api-client-xml/pom.xml
  46. +0 −1 google-api-client-xml/src/main/java/com/google/api/client/googleapis/xml/atom/GoogleAtom.java
  47. +1 −1 google-api-client/pom.xml
  48. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/MethodOverride.java
  49. +0 −1 ...e-api-client/src/main/java/com/google/api/client/googleapis/apache/GoogleApacheHttpTransport.java
  50. +0 −1 ...-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/DefaultCredentialProvider.java
  51. +0 −1 ...lient/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeFlow.java
  52. +0 −1 ...src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeRequestUrl.java
  53. +0 −1 ...c/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleAuthorizationCodeTokenRequest.java
  54. +0 −1 ...ent/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleBrowserClientRequestUrl.java
  55. +0 −1 ...le-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleClientSecrets.java
  56. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleCredential.java
  57. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdToken.java
  58. +0 −1 ...-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleIdTokenVerifier.java
  59. +0 −1 ...-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleRefreshTokenRequest.java
  60. +0 −1 ...le-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/GoogleTokenResponse.java
  61. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/auth/oauth2/OAuth2Utils.java
  62. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchCallback.java
  63. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchRequest.java
  64. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/batch/BatchUnparsedResponse.java
  65. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/batch/json/JsonBatchCallback.java
  66. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/compute/ComputeCredential.java
  67. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/javanet/GoogleNetHttpTransport.java
  68. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonError.java
  69. +0 −1 ...e-api-client/src/main/java/com/google/api/client/googleapis/json/GoogleJsonResponseException.java
  70. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpUploader.java
  71. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaUploadErrorHandler.java
  72. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/notifications/StoredChannel.java
  73. +0 −1 ...lient/src/main/java/com/google/api/client/googleapis/notifications/TypedNotificationCallback.java
  74. +0 −1 ...api-client/src/main/java/com/google/api/client/googleapis/notifications/UnparsedNotification.java
  75. +0 −1 ...nt/src/main/java/com/google/api/client/googleapis/notifications/UnparsedNotificationCallback.java
  76. +0 −1 ...t/src/main/java/com/google/api/client/googleapis/notifications/json/JsonNotificationCallback.java
  77. +0 −1 ...i-client/src/main/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequest.java
  78. +0 −1 ...client/src/main/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClient.java
  79. +0 −1 ...src/main/java/com/google/api/client/googleapis/services/json/AbstractGoogleJsonClientRequest.java
  80. +0 −1 ...java/com/google/api/client/googleapis/services/json/CommonGoogleJsonClientRequestInitializer.java
  81. +0 −1 google-api-client/src/main/java/com/google/api/client/googleapis/testing/TestUtils.java
  82. +0 −1 ...ient/src/main/java/com/google/api/client/googleapis/testing/auth/oauth2/MockGoogleCredential.java
  83. +1 −2 .../src/main/java/com/google/api/client/googleapis/testing/auth/oauth2/MockTokenServerTransport.java
  84. +0 −1 ...t/src/main/java/com/google/api/client/googleapis/testing/compute/MockMetadataServerTransport.java
  85. +0 −1 ...java/com/google/api/client/googleapis/testing/json/GoogleJsonResponseExceptionFactoryTesting.java
  86. +0 −1 ...java/com/google/api/client/googleapis/testing/notifications/MockUnparsedNotificationCallback.java
  87. +9 −10 ...i-client/src/test/java/com/google/api/client/googleapis/json/GoogleJsonResponseExceptionTest.java
  88. +1 −3 ...ient/src/test/java/com/google/api/client/googleapis/services/AbstractGoogleClientRequestTest.java
  89. +11 −39 pom.xml
  90. +84 −0 samples/install-without-bom/pom.xml
  91. +56 −0 samples/pom.xml
  92. +83 −0 samples/snapshot/pom.xml
  93. +60 −0 samples/snippets/pom.xml
  94. +11 −5 synth.metadata
  95. +3 −8 synth.py
  96. +1 −1 versions.txt
12 changes: 11 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
* @googleapis/yoshi-java
# Code owners file.
# This file controls who is tagged for review for any given pull request.

# For syntax help see:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax

# The @googleapis/yoshi-java is the default owner for changes in this repo
**/*.java @googleapis/yoshi-java

# The java-samples-reviewers team is the default owner for samples changes
samples/**/*.java @googleapis/java-samples-reviewers
8 changes: 7 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Fixes #<issue_number_goes_here> (it's a good idea to open an issue first for context and/or discussion)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/google-api-java-client/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️
2 changes: 2 additions & 0 deletions .github/trusted-contribution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
trustedContributors:
- renovate-bot
79 changes: 79 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
on:
push:
branches:
- master
pull_request:
name: ci
jobs:
units:
runs-on: ubuntu-latest
strategy:
matrix:
java: [7, 8, 11]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: test
- name: coverage
uses: codecov/codecov-action@v1
with:
name: actions ${{matrix.java}}
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- run: .kokoro/build.bat
env:
JOB_TYPE: test
dependencies:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{matrix.java}}
- run: java -version
- run: .kokoro/dependencies.sh
linkage-monitor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- run: .kokoro/linkage-monitor.sh
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: lint
clirr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: clirr
2 changes: 1 addition & 1 deletion .kokoro/build.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
:: See documentation in type-shell-output.bat

"C:\Program Files\Git\bin\bash.exe" github/google-api-java-client/.kokoro/build.sh
"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh
76 changes: 54 additions & 22 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
@@ -20,36 +20,43 @@ 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}

mvn install -B -V \
-DskipTests=true \
-Dclirr.skip=true \
-Denforcer.skip=true \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true \
-T 1C
# 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 \
-T 1C

# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it
if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS})
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS})
fi

RETURN_CODE=0
set +e

case ${JOB_TYPE} in
test)
mvn test -B -Dclirr.skip=true -Denforcer.skip=true
bash ${KOKORO_GFILE_DIR}/codecov.sh
bash .kokoro/coerce_logs.sh
RETURN_CODE=$?
;;
lint)
mvn \
-Penable-samples \
com.coveo:fmt-maven-plugin:check
mvn com.coveo:fmt-maven-plugin:check
RETURN_CODE=$?
;;
javadoc)
mvn javadoc:javadoc javadoc:test-javadoc
RETURN_CODE=$?
;;
integration)
mvn -B ${INTEGRATION_TEST_ARGS} \
@@ -59,21 +66,46 @@ integration)
-Denforcer.skip=true \
-fae \
verify
bash .kokoro/coerce_logs.sh
RETURN_CODE=$?
;;
samples)
mvn -B \
-Penable-samples \
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
-fae \
verify
bash .kokoro/coerce_logs.sh
if [[ -f samples/pom.xml ]]
then
pushd samples
mvn -B \
-Penable-samples \
-DtrimStackTrace=false \
-Dclirr.skip=true \
-Denforcer.skip=true \
-fae \
verify
RETURN_CODE=$?
popd
else
echo "no sample pom.xml found - skipping sample tests"
fi
;;
clirr)
mvn -B -Denforcer.skip=true clirr:check
RETURN_CODE=$?
;;
*)
;;
esac

if [ "${REPORT_COVERAGE}" == "true" ]
then
bash ${KOKORO_GFILE_DIR}/codecov.sh
fi

# fix output location of logs
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
fi

echo "exiting with ${RETURN_CODE}"
exit ${RETURN_CODE}
59 changes: 59 additions & 0 deletions .kokoro/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash
# Copyright 2020 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.

function retry_with_backoff {
attempts_left=$1
sleep_seconds=$2
shift 2
command=$@


# store current flag state
flags=$-

# allow a failures to continue
set +e
echo "${command}"
${command}
exit_code=$?

# restore "e" flag
if [[ ${flags} =~ e ]]
then set -e
else set +e
fi

if [[ $exit_code == 0 ]]
then
return 0
fi

# failure
if [[ ${attempts_left} > 0 ]]
then
echo "failure (${exit_code}), sleeping ${sleep_seconds}..."
sleep ${sleep_seconds}
new_attempts=$((${attempts_left} - 1))
new_sleep=$((${sleep_seconds} * 2))
retry_with_backoff ${new_attempts} ${new_sleep} ${command}
fi

return $exit_code
}

## Helper functionss
function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; }
function msg() { println "$*" >&2; }
function println() { printf '%s\n' "$(now) $*"; }
5 changes: 5 additions & 0 deletions .kokoro/continuous/java8.cfg
Original file line number Diff line number Diff line change
@@ -5,3 +5,8 @@ env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
}

env_vars: {
key: "REPORT_COVERAGE"
value: "true"
}
65 changes: 61 additions & 4 deletions .kokoro/dependencies.sh
Original file line number Diff line number Diff line change
@@ -15,7 +15,13 @@

set -eo pipefail

cd github/google-api-java-client/
## 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
java -version
@@ -24,8 +30,59 @@ echo $JOB_TYPE
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"

# this should run maven enforcer
mvn install -B -V \
-DskipTests=true \
-Dclirr.skip=true
retry_with_backoff 3 10 \
mvn install -B -V \
-DskipTests=true \
-Dclirr.skip=true

mvn -B dependency:analyze -DfailOnWarning=true

echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************"
## Run dependency list completeness check
function completenessCheck() {
# Output dep list with compile scope generated using the original pom
# Running mvn dependency:list on Java versions that support modules will also include the module of the dependency.
# This is stripped from the output as it is not present in the flattened pom.
msg "Generating dependency list using original pom..."
mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// | grep -v ':test$' >.org-list.txt

# Output dep list generated using the flattened pom (test scope deps are ommitted)
msg "Generating dependency list using flattened pom..."
mvn dependency:list -f .flattened-pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt

# Compare two dependency lists
msg "Comparing dependency lists..."
diff .org-list.txt .new-list.txt >.diff.txt
if [[ $? == 0 ]]
then
msg "Success. No diff!"
else
msg "Diff found. See below: "
msg "You can also check .diff.txt file located in $1."
cat .diff.txt
return 1
fi
}

# Allow failures to continue running the script
set +e

error_count=0
for path in $(find -name ".flattened-pom.xml")
do
# Check flattened pom in each dir that contains it for completeness
dir=$(dirname "$path")
pushd "$dir"
completenessCheck "$dir"
error_count=$(($error_count + $?))
popd
done

if [[ $error_count == 0 ]]
then
msg "All checks passed."
exit 0
else
msg "Errors found. See log statements above."
exit 1
fi
Loading