Possible Duplicate:
Javac: Treat warnings as errors
I want to update the ANT script of my Android project to fail on warnings, but can’t seem to find how I would do that(I can’t find the javac element to update). I assume this is possible?
Just to be clear, I don’t want to do this in Eclipse because I would like for our build system to fail whenever someone introduces a new warning.
To see how to do this in ant, see: Javac: Treat warnings as errors. From that link:
Android hides the javac task from you. If you create a new android project using the current SDK, the
build.xmlfile will have a description on how to edit specific targets:You need to open the main_rules.xml file (or lib_rules if you are building a library), copy the
<target name="compile">section, and paste it into your build script before the<setup \>tag. Add the compiler arg to fail on errors above and you should be good to go.