So I made a project with 2 source directories: one for actual code and the other for tests. It worked well in eclipse but then I decided to start using command line and the ant tool.
Android has a built-in function of generating build.xml, so I used the command 'android update project -p ProjectName'
This build.xml for installing works fine and I can run the application on the emulator. However, it only compiles the files from my source directory and the files from my test directory are not compiled. That means that I cannot run my unit tests from the command line and if I do I get class not found exceptions.
Is there any way to include another source directory so that it would compile my unit tests as well?
This is the build.xml that was generated (the rest is comments and not added here):
<?xml version="1.0" encoding="UTF-8" ?>
<project name="ProjectNameActivity" default="help">
<property file="local.properties" />
<property file="build.properties" />
<property file="default.properties" />
<path id="android.antlibs">
<pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
<pathelement path="${sdk.dir}/tools/lib/sdklib.jar" />
<pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" />
</path>
<taskdef name="setup" classname="com.android.ant.SetupTask" classpathref="android.antlibs" />
<setup />
</project>