79563169

Date: 2025-04-08 22:47:12
Score: 2
Natty:
Report link

As @Slaw stated in comments, I can use AbstractCopyTask#exclude. I don't know how I broke that before, but it works now with the following code:

jar.exclude((fileTreeElem) -> {
    File theFile = fileTreeElem.getFile();

    if (theFile.getPath().startsWith(customDir.getPath()))
        return false;

    // ... rest of the code
}
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Slaw
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: a a