Skip to content

Support basic include/exclude filtering #8

@hakanai

Description

@hakanai

While supporting complicated include/exclude CopySpec stuff would probably be hard, it would be nice if basic include/exclude of simple file globs worked.

tasks.register<SymUnzip>("unzipIt") {
    from("source.zip")
    into(file("$buildDir/myfiles"))
    exclude("readme.txt")
    exclude("*.so")
}

While reading the code, though, I was unable to figure out why it doesn't work already. It seems like this task is doing everything more or less the same way as the Copy or Sync task, so I couldn't see why the excluded items wouldn't be excluded.

It seems like exclude(String) would get set on the root CopySpec, and the the copy framework would use that to filter the stream it's passing in, so I wasn't able to see why it wopuld be passing excluded files through.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions