Ant + AndroidAnnotations
- Put
androidannotations-X.Y.jar
somewhere in your project (e.g. $PROJECT_ROOT/apt
).
- Put
androidannotations-X.Y-api.jar
in $PROJECT_ROOT/libs
.
- Create
$PROJECT_ROOT/custom_rules.xml
(it will be loaded by the default build.xml
) with this content:
<?xml version="1.0" encoding="UTF-8"?>
<project>
<property name="annotationprocessor.path" value="apt/androidannotations-X.Y.jar" />
<property name="gen.dir" value="aptgen" />
<property name="java.compilerargs" value="-s '${gen.dir}' -processorpath '${annotationprocessor.path}'" />
<target name="-pre-compile">
<mkdir dir="${gen.dir}" />
</target>
<target name="-pre-clean">
<delete dir="${gen.dir}" verbose="${verbose}" />
</target>
</project>