Android Build App with Ant

im pretty new in Ant and looked for a lot of examples. I'm pretty far away and I managed to get build.xml. Although I seem to have one thing missing. My application needs a custom help library, which I call a jar file. But I do not know how to add it. Any hints, link sites or examples that you have, I would really appreciate it. Thanks you

+3
source share
2 answers

To add a library, you just need to make sure that it is passed as an argument when invoking the tool dx.

I use something very similar to the dex target in the Ant template included in the SDK:

<!-- Convert this project .class files into .dex files. -->
<target name="dex" depends="compile">
  <echo>Converting compiled files and external libraries into ${out-folder}/${dex-file}...</echo>
  <apply executable="${dx}" failonerror="true" parallel="true">
    <arg value="--dex" />
    <arg value="--output=${intermediate-dex-location}" />
    <arg path="${out-classes-location}" />
    <fileset dir="${external-libs-folder}" includes="*.jar"/>
  </apply>
</target>

<fileset> JAR .

Ant, JAR libs.

+3

JAR libs/ . Ant ( Eclipse JAR ). , JAR BeanShell.

+3

Source: https://habr.com/ru/post/1760828/


All Articles