Skip to content

Commit

Permalink
checkJunitDependencies only checks Java source (#885)
Browse files Browse the repository at this point in the history
checkJunitDependencies only checks Java source
  • Loading branch information
ferozco authored and bulldozer-bot[bot] committed Sep 24, 2019
1 parent a55ac59 commit e87576d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changelog/@unreleased/pr-885.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: fix
fix:
description: checkJunitDependencies only checks Java source
links:
- https://github.com/palantir/gradle-baseline/pull/885
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private boolean hasDep(String configurationName, Predicate<ModuleVersionIdentifi
}

private boolean sourceSetMentionsJUnit4(SourceSet ss) {
return !ss.getAllSource()
return !ss.getAllJava()
.filter(file -> fileContainsSubstring(file, l ->
l.contains("org.junit.Test")
|| l.contains("org.junit.runner")
Expand All @@ -143,7 +143,7 @@ private boolean sourceSetMentionsJUnit4(SourceSet ss) {
}

private boolean sourceSetMentionsJUnit5Api(SourceSet ss) {
return !ss.getAllSource()
return !ss.getAllJava()
.filter(file -> fileContainsSubstring(file, l -> l.contains("org.junit.jupiter.api.")))
.isEmpty();
}
Expand Down

0 comments on commit e87576d

Please sign in to comment.