This patch introduces a optional copy/filter step in the <module>-copy targets. Since there are only two affected modules at this time I didn't bother unifying this into one implementation. Instead the short logic is duplicated between the two.
When bundling legal files, we need to filter them according to what 3rd party components are actually included in the build. Several components, such as zlib, libjpeg and freetype can be linked with system libraries instead, and if so, we should also exclude the legal files for that component.
- RFR: JDK-8199539: Provide a standard way for the build ... Erik Joelsson
- Re: RFR: JDK-8199539: Provide a standard way for t... Magnus Ihse Bursie