paperweight icon indicating copy to clipboard operation
paperweight copied to clipboard

Switch from in- to excludes for resource inclusion

Open lynxplay opened this issue 2 years ago • 5 comments

As nearly all resources found in the vanilla jar are desired to be included in paper, an include list is not ideal. Instead, this commit changes the copy resource tasks to an exclude-based filter.

lynxplay avatar Mar 09 '22 17:03 lynxplay

Removed the extension as per jmp's suggestions. Consumers of paperweight hence may only edit this by directly editing the task. I hope the map call is fine, as we don't need a flatMap to depend on anything.

lynxplay avatar Mar 09 '22 20:03 lynxplay

as a sanity check, can you try to generate a before and after list of files that we include?

MiniDigger avatar Mar 10 '22 08:03 MiniDigger

I'll generate a diff :+1:

lynxplay avatar Mar 10 '22 14:03 lynxplay

After building the re-obfuscated server using reobfJar for both paperweight 1.3.5 and this specific paperweight snapshot, extracting the output jar into old and new and running diff -r old/ new/ this is the output:

Only in new: flightrecorder-config.jfc
diff --color -r old/META-INF/MANIFEST.MF new/META-INF/MANIFEST.MF
4,5c4,5
< Implementation-Version: git-Paper-"e0b3f3f"
< Implementation-Vendor: 2022-03-07 14:39:52 -0800
---
> Implementation-Version: git-Paper-"952a43c"
> Implementation-Vendor: 2022-03-10 15:25:31 +0100
9,10c9,10
< Git-Branch: master
< Git-Commit: e0b3f3f
---
> Git-Branch: tmp/paperweight
> Git-Commit: 952a43c

The manifest changed as I stored my changes to paper to use paperweight in its own branch :+1: As expected the flight recorder is included.

lynxplay avatar Mar 10 '22 14:03 lynxplay

nice, so no other files, perfect

MiniDigger avatar Mar 10 '22 15:03 MiniDigger