How to generate different obfuscation results every time
masterBy default, xmlClassGuard produces deterministic results: package names are derived via a hash algorithm, and class names start from 'A' and increment (A, B, C... Z, BA, BB...).
To ensure every obfuscation run produces different results, you must manually specify mappings in your mappingFile for:
- Package names: Define specific target packages in
dir mapping. - Class names: Define specific target classes in
class mapping. If you have too many classes to list individually, defining a single package indir mappingis sufficient to force the class names to start from a custom point (e.g., starting from 'Z' instead of 'A').
// Custom mapping to force different results
dir mapping:
com.ljx.example -> hh
com.ljx.example.activity -> jk
com.ljx.example.test -> et
class mapping:
com.ljx.example.AppHolder -> hh.Z