If your Android Studio project is a Maven type, all you have to do is add some AspectJ dependencies, a MonkeyTalk-Agent dependency, and make a maven profile with a setting for those dependencies.
First you will need to deploy the previously downloaded (available here ) jar file with MonkeyTalk-Agent for Android for your local Maven repository. If you have the correct maven configuration, you can do this with the following command:
mvn install:install-file -Dfile=monkeytalk-agent-2.0.4.jar -DgroupId="com.gorillalogic.monkeytalk" -DartifactId="monkeytalk-agent" -Dversion="2.0.4" -Dpackaging="jar"
When you successfully complete this part, you can edit the existing POM file of your project and add the following project dependencies:
<dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.6.2</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjtools</artifactId> <version>1.6.2</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.gorillalogic.monkeytalk</groupId> <artifactId>monkeytalk-agent</artifactId> <version>2.0.4</version> </dependency>
The next step is to create a maven profile that MonekyTalk can add at build time:
<profile> <id>monkeytalk</id> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> <version>1.4</version> <configuration> <source>1.6</source> <target>1.6</target> <aspectLibraries> <aspectLibrary> <groupId>com.gorillalogic.monkeytalk</groupId> <artifactId>monkeytalk-agent</artifactId> </aspectLibrary> </aspectLibraries> <showWeaveInfo>true</showWeaveInfo> <verbose>true</verbose> <Xlint>ignore</Xlint> </configuration> <executions> <execution> <goals> <goal>compile</goal> <goal>test-compile</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile>
The next step is to edit the application manifest file, providing the following permissions:
<uses-permission android:name="android.permission.GET_TASKS"/>
You are now set up and ready to create the MonkeyTalk app. To do this, you just need to use the new monkeytalk profile when creating the maven project. Command line usage example:
clean install android:deploy android:run -Pmonkeytalk
Now you can connect to your application through the MonkeyTalk IDE, available here .
Michal
source share