After keep for public api, I can't include classes belonging to a sub package, see com.example.protocol.* below
<keep>
<class classes="protected"
methods="protected"
fields="protected">
</class>
<!------------------- this part doesn't work ----------------------------->
<class>
<patternset>
<include name="com.example.protocol.*"/>
</patternset>
</class>
</keep>
Tried above pom.xml but resulting class is still obfuscated
From the yGuard documentation:
This means the classes that match the patternset from the second
classelement also match the firstclasselement. And that means your configuration contains contradictory directives. In such a case, there is no defined behavior for yGuard'skeepelement.You need to exclude the classes you want to match in the second
classelement from the set that is matched in the firstclasselement: