Created
June 20, 2011 01:59
-
-
Save Swind/1035014 to your computer and use it in GitHub Desktop.
Android主專案的Ant build.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="OpenSudoku" default="help"> | |
<property file="local.properties" /> | |
<property file="build.properties" /> | |
<property file="default.properties" /> | |
<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> | |
<!--FindBug設定--> | |
<path id="findbugs_lib"> | |
<fileset dir="${findbugs.home}/lib/"> | |
<include name="*.jar" /> | |
</fileset> | |
</path> | |
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs_lib" /> | |
<!-- JavaNCSS --> | |
<path id="javancss_lib"> | |
<fileset dir="${javancss.home}/lib/"> | |
<include name="*.jar" /> | |
</fileset> | |
</path> | |
<taskdef name="javancss" classname="javancss.JavancssAntTask" classpathref="javancss_lib" /> | |
<!-- CheckStyle --> | |
<taskdef resource="checkstyletask.properties" classpath="${checkstyle.home}/checkstyle-5.3-all.jar" /> | |
<taskdef name="setup" classname="com.android.ant.SetupTask" classpathref="android.antlibs" /> | |
<setup /> | |
<target name="findbugs" depends="compile"> | |
<findbugs home="${findbugs.home}" excludefilter="FindBugConfig.xml" output="xml:withMessages" outputFile="findbugs.xml" jvmargs="-Xss1m -Xmx800m"> | |
<sourcePath path="src" /> | |
<auxClasspath path="${android.jar}" /> | |
<class location="${out.dir}" /> | |
</findbugs> | |
</target> | |
<target name="checkstyle" description="Generates a report of code convention violations."> | |
<checkstyle config="checkStyle_rule.xml" failureProperty="checkstyle.failure" failOnViolation="false"> | |
<formatter type="xml" tofile="checkstyle_report.xml" /> | |
<fileset dir="src" includes="**/*.java" /> | |
</checkstyle> | |
</target> | |
<target name="javancss"> | |
<javancss srcdir="src" generateReport="true" outputfile="javancss_metrics.xml" format="xml" /> | |
<xslt in="javancss_metrics.xml" out="javancss-metrics.html" style="${javancss.home}/xslt/javancss2methodhtml.xsl" /> | |
</target> | |
<!-- Emma --> | |
<target name="-emma-instrument" depends="compile"> | |
<echo>[OVERRIDE] Instrumenting classes from ${out.absolute.dir}/classes…</echo> | |
<echo>EMMA will create meta data file in ${emma.report.dir}/coverage.em</echo> | |
<emma enabled="true"> | |
<instr verbosity="${verbosity}" mode="overwrite" instrpath="${out.absolute.dir}/classes" outdir="${out.absolute.dir}/classes" metadatafile="${emma.report.dir}/coverage.em"> | |
</instr> | |
</emma> | |
</target> | |
<target name="staticAnalysis" description="static Analysis by findbugs,checkstyle and javancss" depends="findbugs,checkstyle,javancss" /> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment