I am working on an SDK, exported as a JAR, that will be used by an Android App. I have created a test App to teste the behavior of the SDK. I am looking for an easy way to export the JAR into the test App’s library folder when test App is compiled. So all the changes made in JAR can be tested along with the changes in the test App.
So current work flow is:
Make changes in SDK -> Compile -> Export JAR -> Place JAR in test App’s Lib folder -> compile test App -> Run test
Is there a way to link it all together, so when the test App is complied, all the previos steps will run automatically?
Create one ant file to compile the jar and copy it to the “app lib folder”, also configure it to run when you build the project.
Here is an example of an ant file to generate the jar
If you are using eclipse as your IDE, follow the steps below to configure it to run when you build the project:
right click your project->Properties->Builders->New->Choose Ant Builder->Add the ant file as Buildfile