Step 4 - Single Jar Packaging

Files located in the tutorial/step4/files directory:
mousegestures-1.2.jarMouse Gestures library jar
test.jarJar with mouse gestures demo frame
RunAllatori.batRuns Allatori Obfuscator
MouseGesturesOriginal.batRuns original version of the Mouse Gestures
MouseGesturesObfuscated.batRuns obfuscated version of the Mouse Gestures
MouseGesturesSingle.batRuns obfuscated version of the Mouse Gestures in single.jar
config.xmlAllatori configuration file
Clean.batDeletes generated files


This step is based on the Step 2. It shows an interesting feature - how to package all your application's classes into a single one.

Let's look what have changed in the configuration file, changes are in bold:

<config>
    <jars single-jar="single.jar">
        <jar in="test.jar" out="obf-test.jar"/>
        <jar in="mousegestures-1.2.jar" out="obf-mousegestures-1.2.jar"/>
    </jars>

    <keep-names>
        <class template="class *.TestFrame"/>
    </keep-names>

    <property name="log-file" value="log.xml"/>
</config>

After running Allatori there will be one more file produced - single.jar. This jar contains obfuscated version of the classes of two jar files test.jar and mousegestures-1.2.jar. You can test it using MouseGesturesSingle.bat.

Step 3       Step 5       Contents