Conversation
|
Awesome! Thanks for this contribution! |
There was a problem hiding this comment.
Could we move this into package sbtassembly? If Pants is using that name, I don't want to collide with it.
There was a problem hiding this comment.
I'm afraid we can't, since process method in JarProcessor is package private.
I'm not sure why they use such a method signature.
|
Do you mind adding some documentation on README? |
There was a problem hiding this comment.
I feel like ShadeRule should a sealed trait, and Rename, Remove, KeepOnly should each be a case class under object ShadeRule. I can do that refactoring.
There was a problem hiding this comment.
Will add more doc after all these refactoring :)
|
hi @eed3si9n, could you please help review the refactored code when you're convenient. thanks :) |
|
Refactoring looks good! |
|
hi @eed3si9n , scripted tests added. |
|
Thanks again. |
Add shading support, #156.
In this PR, a new assembly setting key is introduced, namely
assemblyShadingRulese.g.
assemblyShadingRulesconsists of a sequence of shading rules. And there're three types of shading rules in total, they're:Shader.rename,Shader.remove,Shader.keepOnly. For each shading rule, it can be applied to a list of targets:applyToCompilingmeans applying it to current module, andapplyTomeans applying it to some dependency artifact.These three types of shading rules originated from jarjar rules, for details please go to this link.