prolink007
prolink007

Reputation: 34594

excluding eclipse's excludes in an ant script

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!

Upvotes: 8

Views: 709

Answers (2)

Chris
Chris

Reputation: 727

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

Upvotes: 0

Eugene Kuleshov
Eugene Kuleshov

Reputation: 31795

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.

Upvotes: 1

Related Questions