1. Download the AspectJ library
1.1 Go to the AspectJ download web page and download the latest stable jar. At the time of written the version is 1.8.4.
1.2 Unzip the Jar and put it on a folder. In Unix based system you just have to type the follow command:
jar xf aspectj-1.8.4.jar
Remember the folder where it is.
2. Generate Apache Ant files.
Create the Build.xml file and ant.properties file with android tool, if you have not done it yet. You can find more reference here:
3. Get the custom_rules.xml
3.1 Download the Monkey Talk package from here if you have not done it:
3.2 Unzip the file.
3.3 Copy the custom_rules.xml file in the samples/android folder to the same folder where Build.xml file were generated before.
4. Invoke Ant
From the console or terminal, type the follow:
ant clean debug -Daspectj.dir=PATH_TO_ASPECTJ_FOLDER
Where PATH_TO_ASPECTJ_FOLDER is the path to the aspectJ folder downloaded on the first step.