How to specify multiple source folders in build.properties when using ant to build Android projects?

13,031

Did you try using colons to separate paths? My build.properties looks like this:

source.dir=src:src2:src3:src4:src5
Share:
13,031
Eno
Author by

Eno

Experienced mobile / web developer and systems admin (Linux, Solaris). Ive been using Linux since 1992 (anyone remember the SLS distro? But I still love my ole Beeb ;-)

Updated on July 15, 2022

Comments

  • Eno
    Eno almost 2 years

    Apparently, I can specify source folders using the source.dir property in build.properties - but what if I want to specify multiple source folders ?

    The comments below are from the build.xml file generated by the Android SDK tools:

    <!-- The build.properties file can be created by you and is never touched
         by the 'android' tool. This is the place to change some of the default property values
         used by the Ant rules.
         Here are some properties you may want to change/update:
    
         application.package
             the name of your application package as defined in the manifest. Used by the
             'uninstall' rule.
         source.dir
             the name of the source directory. Default is 'src'.
         out.dir
             the name of the output directory. Default is 'bin'.
    
         Properties related to the SDK location or the project target should be updated
          using the 'android' tool with the 'update' action.
    
         This file is an integral part of the build system for your application and
         should be checked in in Version Control Systems.
    
         -->
    

    Note: I dont care about building in Eclipse - Im setting up automated builds using ant.

  • Swarnendu Paul
    Swarnendu Paul about 11 years
    @ AndreyRegentov - here is the solution for Android Library project stackoverflow.com/questions/14605899/…