From f21e3f94eee3bfda4c0ffd18e6e44b86bb4235e0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 9 Jul 2020 11:11:12 -0700 Subject: [PATCH] ci(java): run dependency test on Java 8 and 11 (#269) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * ci(java): run dependency test on Java 8 and 11 Redo fix in #633 with proper jinja templating format Source-Author: Jeff Ching Source-Date: Fri Jun 19 16:52:15 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 4f2c9f752a94042472fc03c5bd9e06e89817d2bd Source-Link: https://github.com/googleapis/synthtool/commit/4f2c9f752a94042472fc03c5bd9e06e89817d2bd * fix ignoredUnusedDeclaredDependenceis * fix ignoredUnusedDeclaredDependenceis * fix ignoredUnusedDeclaredDependenceis * fix ignoredUnusedDeclaredDependenceis Co-authored-by: Jeff Ching --- .github/workflows/ci.yaml | 5 ++++- .kokoro/dependencies.sh | 4 +++- google-cloud-pubsub/pom.xml | 5 ++++- pom.xml | 5 ++++- synth.metadata | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 445b4bf82..683022075 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,11 +36,14 @@ jobs: 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: 8 + java-version: ${{matrix.java}} - run: java -version - run: .kokoro/dependencies.sh linkage-monitor: diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index cf3bb4347..cee4f11e7 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -41,8 +41,10 @@ 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] .*:.*:.*:.*:.*' | grep -v ':test$' >.org-list.txt + 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..." diff --git a/google-cloud-pubsub/pom.xml b/google-cloud-pubsub/pom.xml index 63dffeb02..54fddaba8 100644 --- a/google-cloud-pubsub/pom.xml +++ b/google-cloud-pubsub/pom.xml @@ -144,7 +144,10 @@ maven-dependency-plugin 3.1.2 - io.opencensus:opencensus-impl + + io.opencensus:opencensus-impl + javax.annotation:javax.annotation-api + diff --git a/pom.xml b/pom.xml index 0916725f1..7c98c4e0e 100644 --- a/pom.xml +++ b/pom.xml @@ -126,7 +126,10 @@ org.apache.maven.plugins maven-dependency-plugin - org.objenesis:objenesis + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + diff --git a/synth.metadata b/synth.metadata index 0293f3902..b3cc16161 100644 --- a/synth.metadata +++ b/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "c4f3059c27591eb24d6942a0e357ec94c80459f2" + "sha": "4f2c9f752a94042472fc03c5bd9e06e89817d2bd" } } ],