diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9fb406b3..dc53bbb5 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: - image: gcr.io/repo-automation-bots/owlbot-java:latest - digest: sha256:52b5557b7155a80e6f1684c2376d5eef0df6d8d5c785551e1ff8cc000603b62a + image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest + digest: sha256:d4b2141d65566523dfd523f63c6e6899ab1281463bce182a9f600e74b0511875 diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index a7796ae5..9a8fabd6 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -13,7 +13,7 @@ # limitations under the License. docker: - image: "gcr.io/repo-automation-bots/owlbot-java:latest" + image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest" deep-remove-regex: - "/grpc-google-.*/src" diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml index 1a23ea42..2176b054 100644 --- a/.github/blunderbuss.yml +++ b/.github/blunderbuss.yml @@ -1,5 +1,5 @@ # Configuration for the Blunderbuss GitHub app. For more info see -# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss +# https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss assign_prs_by: - labels: - samples diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 462eb75f..8c84835d 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -2,7 +2,7 @@ rebaseMergeAllowed: false squashMergeAllowed: true mergeCommitAllowed: false branchProtectionRules: - - pattern: master + - pattern: main isAdminEnforced: true requiredApprovingReviewCount: 1 requiresCodeOwnerReviews: true diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3becb5c0..2425d723 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,7 +1,7 @@ on: push: branches: - - master + - main pull_request: name: ci jobs: @@ -9,14 +9,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11] + java: [8, 11, 17] steps: - uses: actions/checkout@v2 - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: ${{matrix.java}} - run: java -version - run: .kokoro/build.sh @@ -29,8 +30,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.bat @@ -40,14 +42,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [8, 11] + java: [8, 11, 17] steps: - uses: actions/checkout@v2 - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: ${{matrix.java}} - run: java -version - run: .kokoro/dependencies.sh @@ -58,8 +61,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.sh @@ -72,8 +76,9 @@ jobs: - uses: stCarolas/setup-maven@v4 with: maven-version: 3.8.1 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v2 with: + distribution: zulu java-version: 8 - run: java -version - run: .kokoro/build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh index c9598877..9ed38958 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -69,6 +69,11 @@ integration) verify RETURN_CODE=$? ;; +graalvm) + # Run Unit and Integration Tests with Native Image + mvn test -Pnative -Penable-integration-tests + RETURN_CODE=$? + ;; samples) SAMPLES_DIR=samples # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9030ba8f..9a5105d7 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -28,7 +28,28 @@ source ${scriptDir}/common.sh java -version echo $JOB_TYPE -export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" +function determineMavenOpts() { + local javaVersion=$( + # filter down to the version line, then pull out the version between quotes, + # then trim the version number down to its minimal number (removing any + # update or suffix number). + java -version 2>&1 | grep "version" \ + | sed -E 's/^.*"(.*?)".*$/\1/g' \ + | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' + ) + + case $javaVersion in + "17") + # MaxPermSize is no longer supported as of jdk 17 + echo -n "-Xmx1024m" + ;; + *) + echo -n "-Xmx1024m -XX:MaxPermSize=128m" + ;; + esac +} + +export MAVEN_OPTS=$(determineMavenOpts) # this should run maven enforcer retry_with_backoff 3 10 \ diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg new file mode 100644 index 00000000..4c7225ec --- /dev/null +++ b/.kokoro/presubmit/graalvm-native.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvm" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 0902df8a..ec56fbdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.6.2](https://www.github.com/googleapis/java-analytics-admin/compare/v0.6.1...v0.6.2) (2021-10-19) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.4.0 ([#301](https://www.github.com/googleapis/java-analytics-admin/issues/301)) ([f974058](https://www.github.com/googleapis/java-analytics-admin/commit/f974058cac256ea2e217758b2791b26487f8b054)) + ### [0.6.1](https://www.github.com/googleapis/java-analytics-admin/compare/v0.6.0...v0.6.1) (2021-09-24) diff --git a/README.md b/README.md index 8475b3b2..f58d0211 100644 --- a/README.md +++ b/README.md @@ -22,20 +22,20 @@ If you are using Maven, add this to your pom.xml file: com.google.analytics google-analytics-admin - 0.6.0 + 0.6.1 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.analytics:google-analytics-admin:0.6.0' +implementation 'com.google.analytics:google-analytics-admin:0.6.1' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.analytics" % "google-analytics-admin" % "0.6.0" +libraryDependencies += "com.google.analytics" % "google-analytics-admin" % "0.6.1" ``` ## Authentication @@ -75,11 +75,11 @@ use this Analytics Admin Client Library. ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/java-analytics-admin/tree/master/samples) directory. +Samples are in the [`samples/`](https://github.com/googleapis/java-analytics-admin/tree/main/samples) directory. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart Sample | [source code](https://github.com/googleapis/java-analytics-admin/blob/master/samples/snippets/src/main/java/com/example/analyticsadmin/QuickstartSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-admin&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analyticsadmin/QuickstartSample.java) | +| Quickstart Sample | [source code](https://github.com/googleapis/java-analytics-admin/blob/main/samples/snippets/src/main/java/com/example/analyticsadmin/QuickstartSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-analytics-admin&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/analyticsadmin/QuickstartSample.java) | @@ -195,10 +195,10 @@ Java is a registered trademark of Oracle and/or its affiliates. [developer-console]: https://console.developers.google.com/ [create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects [cloud-sdk]: https://cloud.google.com/sdk/ -[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting -[contributing]: https://github.com/googleapis/java-analytics-admin/blob/master/CONTRIBUTING.md -[code-of-conduct]: https://github.com/googleapis/java-analytics-admin/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct -[license]: https://github.com/googleapis/java-analytics-admin/blob/master/LICENSE +[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting +[contributing]: https://github.com/googleapis/java-analytics-admin/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-analytics-admin/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-analytics-admin/blob/main/LICENSE [enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing [enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=analyticsadmin.googleapis.com [libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM diff --git a/google-analytics-admin-bom/pom.xml b/google-analytics-admin-bom/pom.xml index 832f8f3c..887b0c5e 100644 --- a/google-analytics-admin-bom/pom.xml +++ b/google-analytics-admin-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.analytics google-analytics-admin-bom - 0.6.1 + 0.6.2 pom com.google.cloud google-cloud-shared-config - 1.0.3 + 1.1.0 Google Analytics Admin BOM @@ -56,17 +56,17 @@ com.google.analytics google-analytics-admin - 0.6.1 + 0.6.2 com.google.api.grpc grpc-google-analytics-admin-v1alpha - 0.6.1 + 0.6.2 com.google.api.grpc proto-google-analytics-admin-v1alpha - 0.6.1 + 0.6.2 diff --git a/google-analytics-admin/pom.xml b/google-analytics-admin/pom.xml index e7185de2..cac3968f 100644 --- a/google-analytics-admin/pom.xml +++ b/google-analytics-admin/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.analytics google-analytics-admin - 0.6.1 + 0.6.2 jar Google Analytics Admin https://github.com/googleapis/java-analytics-admin @@ -11,7 +11,7 @@ com.google.analytics google-analytics-admin-parent - 0.6.1 + 0.6.2 google-analytics-admin diff --git a/grpc-google-analytics-admin-v1alpha/pom.xml b/grpc-google-analytics-admin-v1alpha/pom.xml index e92a92ca..b72cf583 100644 --- a/grpc-google-analytics-admin-v1alpha/pom.xml +++ b/grpc-google-analytics-admin-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-analytics-admin-v1alpha - 0.6.1 + 0.6.2 grpc-google-analytics-admin-v1alpha GRPC library for grpc-google-analytics-admin-v1alpha com.google.analytics google-analytics-admin-parent - 0.6.1 + 0.6.2 diff --git a/pom.xml b/pom.xml index af669733..35644ccd 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.analytics google-analytics-admin-parent pom - 0.6.1 + 0.6.2 Google Analytics Admin Parent https://github.com/googleapis/java-analytics-admin @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.0.3 + 1.1.0 @@ -61,23 +61,23 @@ com.google.analytics google-analytics-admin - 0.6.1 + 0.6.2 com.google.api.grpc proto-google-analytics-admin-v1alpha - 0.6.1 + 0.6.2 com.google.api.grpc grpc-google-analytics-admin-v1alpha - 0.6.1 + 0.6.2 com.google.cloud google-cloud-shared-dependencies - 2.3.0 + 2.4.0 pom import diff --git a/proto-google-analytics-admin-v1alpha/pom.xml b/proto-google-analytics-admin-v1alpha/pom.xml index abd44a7c..fe63c95e 100644 --- a/proto-google-analytics-admin-v1alpha/pom.xml +++ b/proto-google-analytics-admin-v1alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-analytics-admin-v1alpha - 0.6.1 + 0.6.2 proto-google-analytics-admin-v1alpha PROTO library for proto-google-analytics-admin-v1alpha com.google.analytics google-analytics-admin-parent - 0.6.1 + 0.6.2 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 4bbb7b23..856e1877 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.analytics google-analytics-admin - 0.5.0 + 0.6.1 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index df643911..0e69b0cd 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.analytics google-analytics-admin - 0.6.1 + 0.6.2 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 332516fc..b7265cc1 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -27,7 +27,7 @@ com.google.analytics google-analytics-admin - 0.6.1 + 0.6.2 diff --git a/versions.txt b/versions.txt index febb0663..8f66b95a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-analytics-admin:0.6.1:0.6.1 -grpc-google-analytics-admin-v1alpha:0.6.1:0.6.1 -proto-google-analytics-admin-v1alpha:0.6.1:0.6.1 +google-analytics-admin:0.6.2:0.6.2 +grpc-google-analytics-admin-v1alpha:0.6.2:0.6.2 +proto-google-analytics-admin-v1alpha:0.6.2:0.6.2