Created
May 14, 2011 19:31
-
-
Save fredgrott/972541 to your computer and use it in GitHub Desktop.
jdepend-ant-task-android
This file contains hidden or 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
Jdepend is the weird one that most get wrong and hence do not use when they should, | |
they key is getting the paths right: | |
<path id="jdepend.paths"> | |
<fileset dir="build/classes"> | |
<include name="**/*.class"/> | |
</fileset> | |
<fileset dir="${anttasklibs.dir}/jdepend" includes="jdepend-2.9.1.jar"/> | |
</path> | |
you still put the jdepend.jar in the ant/libs path..in your IDE its on your ant runtime preferences screen. | |
<target name="-jdepend"> | |
<jdepend | |
fork="true" | |
outputfile="${docs.dir}/jdepend.xml" | |
format="xml" | |
classpathref="jdepend.paths"> | |
<sourcespath> | |
<pathelement location="${source.absolute.dir}"/> | |
</sourcespath> | |
<classespath> | |
<pathelement location="${out.classes.absolute.dir}"/> | |
</classespath> | |
</jdepend> | |
<xslt basedir="${docs.dir}" destdir="${docs.dir}" | |
style="${jdepend.xsl.loc}"> | |
<param name="project" expression="${ant.project.name}"/> | |
<param name="today" expression="${DSTAMP}"/> | |
<param name="company" expression="${company}"/> | |
<mapper type="glob" from="jdepend.xml" to="jdepend.html"/> | |
</xslt> | |
<xslt basedir="${docs.dir}" | |
destdir="${docs.dir}" | |
includes="jdepend.xml" | |
extension=".dot" | |
style="${jdepend.dot.loc}"/> | |
<!-- need to define a path to Graphiz/dot path --> | |
<apply executable="${graphviz.home}" | |
dest="${docs.dir}" | |
parallel="false"> | |
<arg value="-Tpng"/> | |
<arg value="-o"/> | |
<targetfile/> | |
<srcfile/> | |
<fileset dir="${docs.dir}" includes="*.dot"/> | |
<mapper type="glob" from="*.dot" to="*.png"/> | |
</apply> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment