This change makes sure the srcdir is pointing to only the java source folder and not recursively compile all source folders under the current folder. This is useful in having multiple java source folders for main, tests etc., Only the compile target is being affected by this change.
NOTE: Now you can have project/tests and work with tests as a separate android project, only for testing. In any case pointing to source explicitly makes sure no side affects arise by recursive compiling.
<!-- Compile this project's .java files into .class files. -->
<target name="compile" depends="dirs, resource-src, aidl">
<javac encoding="ascii" target="1.5" debug="true" extdirs=""
- srcdir="."
+ srcdir="${srcdir}"
destdir="${outdir-classes}"
bootclasspath="${android-jar}">
<classpath>