shevek / jarjar

Jar Jar Links is a utility that makes it easy to repackage Java libraries and embed them into your own distribution.
Apache License 2.0
735 stars 93 forks source link

can support to keep some packages not be renamed? #26

Closed YiScond closed 2 years ago

YiScond commented 2 years ago

how to use the keep rule? for example: keep com.** it does not work

YiScond commented 2 years ago

Finally, I tried to use the "rules" rule and it succeeded.

for example:

A jar file contains

  1. com.x.A.class
  2. com.x.B.class
  3. com.y.C.class

i want to keep A.class not be renamed,and rename B.class and C.class. edit the rule.txt,like:

rule com.x.A @0
rule com.** rename.@0

execute command line, and check the output.jar, rename successful.

output jar file contains

  1. com.x.A.class
  2. rename.com.x.B.class
  3. rename.com.y.C.class

The point is writing the keep name rule at first