Files located in the tutorial/step1/files directory:
mousegestures-1.2.jar | Mouse Gestures library jar |
test.jar | Jar with mouse gestures demo frame |
RunAllatori.bat | Runs Allatori Obfuscator |
MouseGesturesOriginal.bat | Runs original version of the Mouse Gestures |
MouseGesturesObfuscated.bat | Runs obfuscated version of the Mouse Gestures |
config.xml | Allatori configuration file |
Clean.bat | Deletes generated files |
<config> <jars> <jar in="test.jar" out="obf-test.jar"/> <jar in="mousegestures-1.2.jar" out="obf-mousegestures-1.2.jar"/> </jars> <keep-names> <class access="protected+"/> <field access="protected+"/> <method access="protected+"/> </keep-names> <property name="log-file" value="log.xml"/> </config>
The jars section defines input and output jar files.
If you use the same file name for in and out attributes than the jar will be overwritten with its obfuscated version.
The keep-names section defines class, method and field names that should not be renamed.
As we obfuscate a library we expose all externally visible classes, fields and methods by setting access attribute to protected+.
It means that everything with visibility 'protected' and higher ('public') will have their names unchanged.
log-file property defines the name of the log file.
It can be removed from the configuration if you don't need a log of the obfuscation process.
An example when log file is needed can be found in the Step 8.
Clean.bat removes obf-mousegestures-1.2.jar, obf-test.jar and log.xml files.