Skip to content

Commit

Permalink
ci(java): run dependency test on Java 8 and 11 (#269)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Source-Date: Fri Jun 19 16:52:15 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 4f2c9f752a94042472fc03c5bd9e06e89817d2bd
Source-Link: googleapis/synthtool@4f2c9f7

* fix ignoredUnusedDeclaredDependenceis

* fix ignoredUnusedDeclaredDependenceis

* fix ignoredUnusedDeclaredDependenceis

* fix ignoredUnusedDeclaredDependenceis

Co-authored-by: Jeff Ching <[email protected]>
  • Loading branch information
yoshi-automation and chingor13 authored Jul 9, 2020
1 parent 1bc171a commit f21e3f9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion .kokoro/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down
5 changes: 4 additions & 1 deletion google-cloud-pubsub/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<ignoredUnusedDeclaredDependencies>io.opencensus:opencensus-impl</ignoredUnusedDeclaredDependencies>
<ignoredUnusedDeclaredDependencies>
<ignoredUnusedDeclaredDependency>io.opencensus:opencensus-impl</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>javax.annotation:javax.annotation-api</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</plugin>
</plugins>
Expand Down
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<ignoredUnusedDeclaredDependencies>org.objenesis:objenesis</ignoredUnusedDeclaredDependencies>
<ignoredUnusedDeclaredDependencies>
<ignoredUnusedDeclaredDependency>org.objenesis:objenesis</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>javax.annotation:javax.annotation-api</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "c4f3059c27591eb24d6942a0e357ec94c80459f2"
"sha": "4f2c9f752a94042472fc03c5bd9e06e89817d2bd"
}
}
],
Expand Down

0 comments on commit f21e3f9

Please sign in to comment.