Step 4 - Single Jar Packaging

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


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

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

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

    <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 classes from both test.jar and mousegestures-1.2.jar files. You can test it using MouseGesturesSingle.bat.

Step 3       Step 5       Contents