I am trying to build my Android project with Ant. I have some reference libs which I defined in build.xml like below mentioned in this question:
<target name="-pre-compile">
<!-- HACK to add the android-support-v4.jar to the classpath directly from the SDK -->
<echo>ORIGINAL jars.path : ${toString:project.all.jars.path}</echo>
<path id="project.all.jars.path.hacked">
<path path="${toString:project.all.jars.path}"/>
<path path="${sdk.dir}/extras/android/support/v4/android-support-v4.jar"/>
</path>
<path id="project.all.jars.path">
<path path="${toString:project.all.jars.path.hacked}"/>
</path>
<echo>HACKED jars.path : ${toString:project.all.jars.path}</echo>
</target>
I have no problem while compiling with my external jars and it builds apk properly.
My problem starts when I use an external lib having exact package similar to system package.
For example, I have some customized frameworks.jar and I have linked it to my project in the same fashion mentioned above. But ANT considers system frameworks and ignores my frameworks.jar.
This works fine in Eclipse when I order it and keep my custom frameworks.jar above system Android libs (Eclipse > Project > Right Click > Build Path > Configure Build Path > Order and Export)
Is there any way how we can define order of libraries to be consider while compiling by ANT. Like how we do it in Eclipse?