使用ant构建Android项目时如何在build.properties中指定多个源文件夹?

Eno*_*Eno 10 ant directory android build

显然,我可以使用build.properties中的source.dir属性指定源文件夹 - 但是如果我想指定多个源文件夹呢?

以下注释来自Android SDK工具生成的build.xml文件:

<!-- 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.

     -->
Run Code Online (Sandbox Code Playgroud)

注意:我不关心在Eclipse中构建 - 我使用ant设置自动构建.

Ste*_*ato 18

您是否尝试使用冒号分隔路径?我的build.properties看起来像这样:

source.dir=src:src2:src3:src4:src5
Run Code Online (Sandbox Code Playgroud)

  • 我担心它在构建图书馆时不起作用. (3认同)