Skip to content

Commit

Permalink
Use minus for filtering instead of filter with a predicate.
Browse files Browse the repository at this point in the history
  • Loading branch information
berksean committed May 24, 2023
1 parent 3fa9661 commit 8a2d430
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,7 @@ private fun Task.allProtoDirs(): List<Path> =
(project.srcProtoDirs() + extractProtoDirs()).filter { project.anyProtos(it) }

internal fun Project.srcProtoDirs() =
(the<SourceSetContainer>().flatMap { it.protoDirs(this) } + androidSrcProtoDirs()).filter {
!extractProtoDirs().contains(
it
)
}
(the<SourceSetContainer>().flatMap { it.protoDirs(this) } + androidSrcProtoDirs()).minus(extractProtoDirs())

private fun Project.androidSrcProtoDirs() =
extensions.findByName("android")
Expand Down

0 comments on commit 8a2d430

Please sign in to comment.