Skip to content

Commit

Permalink
ci(java): run dependency test on Java 8 and 11 (#391)
Browse files Browse the repository at this point in the history
* ci(java): run dependency test on Java 8 and 11

Redo fix in #633 with proper jinja templating format

Source-Author: Jeff Ching <chingor@google.com>
Source-Date: Fri Jun 19 16:52:15 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 4f2c9f752a94042472fc03c5bd9e06e89817d2bd
Source-Link: googleapis/synthtool@4f2c9f7

* remove unused profile

* remove unused profiles

* build: add javax.annotation-api maven-dependency-plugin ignore for java9+ profile activation

Co-authored-by: stephwang <stephwang@google.com>
  • Loading branch information
yoshi-automation and stephaniewang526 committed Jul 7, 2020
1 parent 3e9d4c8 commit dab15da
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 63 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yaml
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
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
15 changes: 0 additions & 15 deletions google-cloud-bigquerystorage/pom.xml
Expand Up @@ -186,19 +186,4 @@
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>java9</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
15 changes: 0 additions & 15 deletions grpc-google-cloud-bigquerystorage-v1/pom.xml
Expand Up @@ -47,19 +47,4 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>java9</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
15 changes: 0 additions & 15 deletions grpc-google-cloud-bigquerystorage-v1alpha2/pom.xml
Expand Up @@ -47,19 +47,4 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>java9</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
15 changes: 0 additions & 15 deletions grpc-google-cloud-bigquerystorage-v1beta2/pom.xml
Expand Up @@ -47,19 +47,4 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>java9</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
1 change: 1 addition & 0 deletions pom.xml
Expand Up @@ -174,6 +174,7 @@
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<ignoredUnusedDeclaredDependencies>org.objenesis:objenesis</ignoredUnusedDeclaredDependencies>
<ignoredUnusedDeclaredDependencies>javax.annotation:javax.annotation-api</ignoredUnusedDeclaredDependencies>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion synth.metadata
Expand Up @@ -50,7 +50,7 @@
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "c4f3059c27591eb24d6942a0e357ec94c80459f2"
"sha": "4f2c9f752a94042472fc03c5bd9e06e89817d2bd"
}
}
],
Expand Down

0 comments on commit dab15da

Please sign in to comment.