8

In eclipse users have the ability to exclude files from the build. Eclipse will then modify the .classpath and create the following entry so that eclipse knows not to build the particular files when compiling.

<classpathentry excluding="file1|file2|file3" kind="src" path="src"/>

I am creating ant scripts for several android projects. I am using the ADT auto generated script and overriding the -compile task. I was wondering if there was a way that i can get a list of the files that are being excluded?

I was thinking of having a task in ant that would parse the .classpath file and retrieve the file names and then use them that way... but i was hoping there was an easier way.

Thanks!

prolink007
  • 33,872
  • 24
  • 117
  • 185
  • Parsing the .classpath might be an option, but it might be done already: http://joeygibson.com/2004/06/15/free-eclipse-classpath-ant-task/ – martin clayton Jan 28 '12 at 10:17
  • I am really wanting a way to not have to add plugins to ant or anything else. This way the developers only have to have ant, the source and the build files. – prolink007 Feb 02 '12 at 14:43

2 Answers2

1

An alternative option could be to build project from command line, using Eclipse's command line builder. you can incorporate it into an ant script too.

Community
  • 1
  • 1
Eugene Kuleshov
  • 31,461
  • 5
  • 66
  • 67
0

What about using Export->General->ANT files? This creates a ant build script respecting the excluded classes.

Chris
  • 697
  • 4
  • 17