<?xml version="1.0" encoding="UTF-8"?>
<project name="<%= @spec[:name] %>">
    <path id="android.antlibs">
        <pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
        <pathelement path="${sdk.dir}/tools/lib/sdklib.jar" />
        <pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" />
    </path>

    <taskdef name="setup"
        classname="com.android.ant.SetupTask"
        classpathref="android.antlibs" />

    <taskdef name="mirahc" classname="org.mirah.ant.Compile" />

    <!-- TODO: better support for mixed-source builds -->
    <target name="javac" description="Compiles R.java and other gen/ files.">
      <javac srcdir="gen" destdir="${classes}" 
             includeantruntime="false" failonerror="true" />
    </target>

    <target name="compile" depends="-resource-src, -aidl, javac"
            description="Compiles project's .mirah files into .class files">
           <mirahc src="${src}" dir="${src}" destdir="${classes}" 
                   classpath="${classpath}" />
    </target>

    <setup />
</project>

<?xml version="1.0" encoding="UTF-8"?>
<project name="<%= @spec[:name] %>">
    <path id="android.antlibs">
        <pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
        <pathelement path="${sdk.dir}/tools/lib/sdklib.jar" />
        <pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" />
    </path>

    <taskdef name="setup"
        classname="com.android.ant.SetupTask"
        classpathref="android.antlibs" />

    <taskdef name="mirahc" classname="org.mirah.ant.Compile" />

    <!-- TODO: better support for mixed-source builds -->
    <target name="javac" description="Compiles R.java and other gen/ files.">
      <javac srcdir="gen" destdir="${classes}" 
             includeantruntime="false" failonerror="true" />
    </target>

    <target name="compile" depends="-resource-src, -aidl, javac"
            description="Compiles project's .mirah files into .class files">
           <mirahc src="${src}" dir="${src}" destdir="${classes}" 
                   classpath="${classpath}" failonerror="true"/>
    </target>

    <setup />
</project>

Set failonerror in mirahc; not sure if this takes effect.
Set failonerror in mirahc; not sure if this takes effect.
