Skip to content
This repository was archived by the owner on Oct 14, 2023. It is now read-only.

Commit 44df12e

Browse files
ci(java): run dependency test on Java 8 and 11 (#236)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/351f1c1a-f71f-4cfc-968c-ac334fd05a73/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: googleapis/synthtool@4f2c9f7
1 parent d053185 commit 44df12e

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,14 @@ jobs:
3636
JOB_TYPE: test
3737
dependencies:
3838
runs-on: ubuntu-latest
39+
strategy:
40+
matrix:
41+
java: [8, 11]
3942
steps:
4043
- uses: actions/checkout@v2
4144
- uses: actions/setup-java@v1
4245
with:
43-
java-version: 8
46+
java-version: ${{matrix.java}}
4447
- run: java -version
4548
- run: .kokoro/dependencies.sh
4649
linkage-monitor:

.kokoro/dependencies.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************"
4141
## Run dependency list completeness check
4242
function completenessCheck() {
4343
# Output dep list with compile scope generated using the original pom
44+
# Running mvn dependency:list on Java versions that support modules will also include the module of the dependency.
45+
# This is stripped from the output as it is not present in the flattened pom.
4446
msg "Generating dependency list using original pom..."
45-
mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | grep -v ':test$' >.org-list.txt
47+
mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// | grep -v ':test$' >.org-list.txt
4648

4749
# Output dep list generated using the flattened pom (test scope deps are ommitted)
4850
msg "Generating dependency list using flattened pom..."

pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@
128128
<groupId>org.apache.maven.plugins</groupId>
129129
<artifactId>maven-dependency-plugin</artifactId>
130130
<configuration>
131-
<ignoredUnusedDeclaredDependencies>org.objenesis:objenesis</ignoredUnusedDeclaredDependencies>
131+
<ignoredUnusedDeclaredDependencies>
132+
<ignoredUnusedDeclaredDependency>org.objenesis:objenesis</ignoredUnusedDeclaredDependency>
133+
<ignoredUnusedDeclaredDependency>javax.annotation:javax.annotation-api</ignoredUnusedDeclaredDependency>
134+
</ignoredUnusedDeclaredDependencies>
132135
</configuration>
133136
</plugin>
134137
</plugins>

synth.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"git": {
55
"name": ".",
66
"remote": "https://github.com/googleapis/java-translate.git",
7-
"sha": "a669b04ae0b8eda8711b7903aefe4c9a906d34f9"
7+
"sha": "94b3b0976eefbda8e9a699510c301c7aeb5357fa"
88
}
99
},
1010
{
@@ -27,7 +27,7 @@
2727
"git": {
2828
"name": "synthtool",
2929
"remote": "https://github.com/googleapis/synthtool.git",
30-
"sha": "c4f3059c27591eb24d6942a0e357ec94c80459f2"
30+
"sha": "4f2c9f752a94042472fc03c5bd9e06e89817d2bd"
3131
}
3232
}
3333
],

0 commit comments

Comments
 (0)