Skip to content

Commit

Permalink
Merge pull request #40 from jmatsu/ignore_local_files
Browse files Browse the repository at this point in the history
Ignore local files as well
  • Loading branch information
jmatsu authored Jun 15, 2020
2 parents 27e0bde + 7c5594b commit 1bed17d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,16 @@ class ArtifactManagement(
val scopedLocalFiles = localFileMap.values.flatten().distinct().groupBy { file ->
localFileMap.asIterable().first { (_, files) -> file in files }.key
}.flatMap { (key, files) ->
files.map { file ->
files.mapNotNull { file ->
val id = ResolvedModuleIdentifier(
group = localGroup,
name = file.name
)

if (exclusionPredicate?.invoke(id.group, id.name) == true) {
return@mapNotNull null
}

val licenseCandidates = ZipFile(file).use { zip ->
zip.entries().asSequence()
.filter { !it.isDirectory && it.name.startsWith("META-INF/") && it.name.contains("LICENSE") }
Expand Down

0 comments on commit 1bed17d

Please sign in to comment.