yWorks / yGuard

The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts

Home Page:https://yworks.github.io/yGuard/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve replaceContent for resource files

thomasbehr opened this issue · comments

When using <adjust replaceContent="true">, yGuard can replace either path names or class names (if replaceContentSeparator="." is used as well), but not both in one file.

As a result, content like e.g.

<example>
  <class name="com.yworks.yguard.StringReplacer"/>
  <file name="com/yworks/yguard/StringReplacer.properties"/>
</example>

can be adjusted to

<example>
  <class name="A.A.A.SR"/>
  <file name="com/yworks/yguard/StringReplacer.properties"/>
</example>

or

<example>
  <class name="com.yworks.yguard.StringReplacer"/>
  <file name="A/A/A/SR.properties"/>
</example>

but not to

<example>
  <class name="A.A.A.SR"/>
  <file name="A/A/A/SR.properties"/>
</example>

which is what you need in this case.

Having replaceContentSeparator accept more than one character could solve this "./\;,"