Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed build so code quality and javadocs could be generated

  • Loading branch information...
commit 68c95ee38c3637ea8b714c0ed88c3d441f95f8ec 1 parent 0ad1ac5
@shareme authored
Showing with 20,465 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +49 −0 add-proguard-release.xml
  3. +551 −0 alpbuild.xml
  4. BIN  antlibs/classycle.jar
  5. BIN  antlibs/proguard.jar
  6. +3 −0  build.properties.template
  7. +1,034 −0 build.xml
  8. +86 −0 buildconfig/andcooper.reports.css
  9. BIN  buildconfig/images/abstract.png
  10. BIN  buildconfig/images/checkstylelogo.png
  11. BIN  buildconfig/images/class.png
  12. BIN  buildconfig/images/inner.png
  13. BIN  buildconfig/images/innerCycleLink.png
  14. BIN  buildconfig/images/innerabstract.png
  15. BIN  buildconfig/images/innerclass.png
  16. BIN  buildconfig/images/innerinterface.png
  17. BIN  buildconfig/images/interface.png
  18. BIN  buildconfig/images/link.png
  19. BIN  buildconfig/images/logo.png
  20. BIN  buildconfig/images/mix.png
  21. BIN  buildconfig/images/mixedCycleLink.png
  22. BIN  buildconfig/images/package.png
  23. BIN  buildconfig/images/pmd_logo_small.jpg
  24. +88 −0 buildconfig/xsls/andcooper.checkstyle.xsl
  25. +795 −0 buildconfig/xsls/andcooper.classycle.xsl
  26. +123 −0 buildconfig/xsls/andcooper.pmd.xsl
  27. +968 −0 buildlib.xml
  28. +3 −0  gitignore.template
  29. +203 −0 jGrouseDoc-2.0/3rdparty/ant/LICENSE
  30. +71 −0 jGrouseDoc-2.0/3rdparty/ant/LICENSE.dom
  31. +20 −0 jGrouseDoc-2.0/3rdparty/ant/LICENSE.sax
  32. +56 −0 jGrouseDoc-2.0/3rdparty/ant/LICENSE.xerces
  33. +20 −0 jGrouseDoc-2.0/3rdparty/ant/NOTICE
  34. +202 −0 jGrouseDoc-2.0/3rdparty/velocity/LICENSE
  35. +7 −0 jGrouseDoc-2.0/3rdparty/velocity/NOTICE
  36. +178 −0 jGrouseDoc-2.0/build.xml
  37. BIN  jGrouseDoc-2.0/jgdoc.jar
  38. +11 −0 jGrouseDoc-2.0/jgrousedoc.properties
  39. +21 −0 jGrouseDoc-2.0/license.txt
  40. +88 −0 jGrouseDoc-2.0/sample/innerObjects.js
  41. +288 −0 jGrouseDoc-2.0/sample/jbooze.js
  42. +383 −0 jGrouseDoc-2.0/sample/jbooze/browser/Browser.js
  43. +9 −0 jGrouseDoc-2.0/sample/project.js
  44. +13 −0 jGrouseDoc-2.0/sample/test.js
  45. +58 −0 jGrouseDoc-2.0/skins/classic/xslt/allLogicalContainers.xslt
  46. +84 −0 jGrouseDoc-2.0/skins/classic/xslt/allPhysContainers.xslt
  47. +504 −0 jGrouseDoc-2.0/skins/classic/xslt/antgen.xslt
  48. +118 −0 jGrouseDoc-2.0/skins/classic/xslt/fileDetail.xslt
  49. +98 −0 jGrouseDoc-2.0/skins/classic/xslt/fileOverview.xslt
  50. +51 −0 jGrouseDoc-2.0/skins/classic/xslt/jgsearch.xslt
  51. +122 −0 jGrouseDoc-2.0/skins/classic/xslt/jsindex.xslt
  52. +112 −0 jGrouseDoc-2.0/skins/classic/xslt/logicalContainersMain.xslt
  53. +290 −0 jGrouseDoc-2.0/skins/classic/xslt/logicalDetail.xslt
  54. +95 −0 jGrouseDoc-2.0/skins/classic/xslt/namespaceOverview.xslt
  55. +103 −0 jGrouseDoc-2.0/skins/classic/xslt/physContainersListMain.xslt
  56. +44 −0 jGrouseDoc-2.0/skins/classic/xslt/startup.xslt
  57. +60 −0 jGrouseDoc-2.0/skins/classic/xslt/topLevelObjects.xslt
  58. +52 −0 jGrouseDoc-2.0/skins/classic/xslt/trueindex.xslt
  59. +301 −0 jGrouseDoc-2.0/skins/common/css/jgdoc.css
  60. +53 −0 jGrouseDoc-2.0/skins/common/css/jgindex.css
  61. BIN  jGrouseDoc-2.0/skins/common/img/closed.gif
  62. BIN  jGrouseDoc-2.0/skins/common/img/closedLarge.gif
  63. BIN  jGrouseDoc-2.0/skins/common/img/node.gif
  64. BIN  jGrouseDoc-2.0/skins/common/img/open.gif
  65. BIN  jGrouseDoc-2.0/skins/common/img/openLarge.gif
  66. +239 −0 jGrouseDoc-2.0/skins/common/js/jgdoc.js
  67. +96 −0 jGrouseDoc-2.0/skins/common/js/jgindex.js
  68. +213 −0 jGrouseDoc-2.0/skins/common/js/navTree.js
  69. +604 −0 jGrouseDoc-2.0/skins/common/vm/common.vm
  70. +704 −0 jGrouseDoc-2.0/skins/common/xslt/common.xslt
  71. +32 −0 jGrouseDoc-2.0/skins/modern/vm/allFiles.vm
  72. +34 −0 jGrouseDoc-2.0/skins/modern/vm/allclasses-frame.vm
  73. +224 −0 jGrouseDoc-2.0/skins/modern/vm/antgen.vm
  74. +35 −0 jGrouseDoc-2.0/skins/modern/vm/fileDetail.vm
  75. +27 −0 jGrouseDoc-2.0/skins/modern/vm/fileOverview.vm
  76. +24 −0 jGrouseDoc-2.0/skins/modern/vm/jgsearch.vm
  77. +57 −0 jGrouseDoc-2.0/skins/modern/vm/jsindex.vm
  78. +15 −0 jGrouseDoc-2.0/skins/modern/vm/logicalDetail.vm
  79. +29 −0 jGrouseDoc-2.0/skins/modern/vm/mainpage.vm
  80. +21 −0 jGrouseDoc-2.0/skins/modern/vm/namespaceOverview.vm
  81. +31 −0 jGrouseDoc-2.0/skins/modern/vm/navtree.vm
  82. +12 −0 jGrouseDoc-2.0/skins/modern/vm/startup.vm
  83. +19 −0 jGrouseDoc-2.0/skins/modern/vm/trueindex.vm
  84. +67 −0 jGrouseDoc-2.0/skins/modern/xslt/allFiles.xslt
  85. +74 −0 jGrouseDoc-2.0/skins/modern/xslt/allclasses-frame.xslt
  86. +509 −0 jGrouseDoc-2.0/skins/modern/xslt/antgen.xslt
  87. +105 −0 jGrouseDoc-2.0/skins/modern/xslt/fileDetail.xslt
  88. +100 −0 jGrouseDoc-2.0/skins/modern/xslt/fileOverview.xslt
  89. +51 −0 jGrouseDoc-2.0/skins/modern/xslt/jgsearch.xslt
  90. +124 −0 jGrouseDoc-2.0/skins/modern/xslt/jsindex.xslt
  91. +288 −0 jGrouseDoc-2.0/skins/modern/xslt/logicalDetail.xslt
  92. +57 −0 jGrouseDoc-2.0/skins/modern/xslt/mainpage.xslt
  93. +94 −0 jGrouseDoc-2.0/skins/modern/xslt/namespaceOverview.xslt
  94. +57 −0 jGrouseDoc-2.0/skins/modern/xslt/navtree.xslt
  95. +53 −0 jGrouseDoc-2.0/skins/modern/xslt/startup.xslt
  96. +51 −0 jGrouseDoc-2.0/skins/modern/xslt/trueindex.xslt
  97. +473 −0 jGrouseDoc-2.0/skins/noframes/css/jgdoc.css
  98. BIN  jGrouseDoc-2.0/skins/noframes/img/logo.gif
  99. +326 −0 jGrouseDoc-2.0/skins/noframes/js/jgdoc.js
  100. +409 −0 jGrouseDoc-2.0/skins/noframes/js/navTree.js
  101. +77 −0 jGrouseDoc-2.0/skins/noframes/vm/antgen.vm
  102. +94 −0 jGrouseDoc-2.0/skins/noframes/vm/detail.vm
  103. +57 −0 jGrouseDoc-2.0/skins/noframes/vm/jsindex.vm
  104. +1 −0  jGrouseDoc-2.0/skins/noframes/vm/test.vm
  105. +357 −0 jGrouseDoc-2.0/skins/noframes/xslt/antgen.xslt
  106. +360 −0 jGrouseDoc-2.0/skins/noframes/xslt/detail.xslt
  107. +51 −0 jGrouseDoc-2.0/skins/noframes/xslt/jgsearch.xslt
  108. +124 −0 jGrouseDoc-2.0/skins/noframes/xslt/jsindex.xslt
  109. +98 −0 jGrouseDoc-2.0/skins/noframes/xslt/nfcommon.xslt
  110. +99 −0 jGrouseDoc-2.0/skins/noframes/xslt/startup.xslt
  111. +14 −0 jGrouseDoc-2.0/themes/sample/build.xml
  112. +122 −0 jGrouseDoc-2.0/themes/sample/css/theme.css
  113. BIN  jGrouseDoc-2.0/themes/sample/img/closed.gif
  114. BIN  jGrouseDoc-2.0/themes/sample/img/closedLarge.gif
  115. BIN  jGrouseDoc-2.0/themes/sample/img/node.gif
  116. BIN  jGrouseDoc-2.0/themes/sample/img/open.gif
  117. BIN  jGrouseDoc-2.0/themes/sample/img/openLarge.gif
  118. +11 −0 jGrouseDoc-2.0/themes/simple/build.xml
  119. +1 −0  jGrouseDoc-2.0/themes/simple/css/theme.css
  120. BIN  jGrouseDoc-2.0/velocity-dep-1.5.jar
  121. +33 −0 javadocs/allclasses-frame.html
  122. +33 −0 javadocs/allclasses-noframe.html
  123. +374 −0 javadocs/com/mobilebytes/andcustomtitle/MainActivity.html
  124. BIN  javadocs/com/mobilebytes/andcustomtitle/MainActivity.png
  125. +382 −0 javadocs/com/mobilebytes/andcustomtitle/Splash.html
  126. BIN  javadocs/com/mobilebytes/andcustomtitle/Splash.png
  127. +34 −0 javadocs/com/mobilebytes/andcustomtitle/package-frame.html
  128. +204 −0 javadocs/com/mobilebytes/andcustomtitle/package-summary.html
  129. BIN  javadocs/com/mobilebytes/andcustomtitle/package-summary.png
  130. +174 −0 javadocs/com/mobilebytes/andcustomtitle/package-tree.html
  131. +189 −0 javadocs/constant-values.html
  132. +161 −0 javadocs/deprecated-list.html
  133. +228 −0 javadocs/help-doc.html
  134. +189 −0 javadocs/index-all.html
  135. +36 −0 javadocs/index.html
  136. +176 −0 javadocs/overview-tree.html
  137. +1 −0  javadocs/package-list
  138. BIN  javadocs/resources/companylogo.png
  139. BIN  javadocs/resources/inherit.gif
  140. +29 −0 javadocs/stylesheet.css
  141. +6 −0 jgrousedoc.properties
  142. BIN  js_javadocs/closed.gif
  143. BIN  js_javadocs/closedLarge.gif
  144. +130 −0 js_javadocs/index.html
  145. +473 −0 js_javadocs/jgdoc.css
  146. +326 −0 js_javadocs/jgdoc.js
  147. +53 −0 js_javadocs/jgindex.css
  148. +16 −0 js_javadocs/jsindex.js
  149. BIN  js_javadocs/logo.gif
  150. +409 −0 js_javadocs/navTree.js
  151. BIN  js_javadocs/node.gif
  152. BIN  js_javadocs/open.gif
  153. BIN  js_javadocs/openLarge.gif
  154. +122 −0 js_javadocs/theme.css
  155. +7 −0 local.properties.template
  156. +31 −0 procfg.txt
  157. +337 −0 proguard_android_config.txt
  158. +86 −0 reports/andcooper.reports.css
  159. +75 −0 reports/checkstyle.html
  160. +15 −0 reports/checkstyle.xml
  161. +204 −0 reports/classycle.html
  162. +152 −0 reports/classycle.xml
  163. BIN  reports/images/abstract.png
  164. BIN  reports/images/checkstylelogo.png
  165. BIN  reports/images/class.png
  166. BIN  reports/images/companylogo.png
  167. BIN  reports/images/inner.png
  168. BIN  reports/images/innerCycleLink.png
  169. BIN  reports/images/innerabstract.png
  170. BIN  reports/images/innerclass.png
  171. BIN  reports/images/innerinterface.png
  172. BIN  reports/images/interface.png
  173. BIN  reports/images/link.png
  174. BIN  reports/images/logo.png
  175. BIN  reports/images/mix.png
  176. BIN  reports/images/mixedCycleLink.png
  177. BIN  reports/images/package.png
  178. BIN  reports/images/pmd_logo_small.jpg
  179. +49 −0 reports/pmd.html
  180. +3 −0  reports/pmd.xml
  181. +782 −0 testbuild.xml
  182. +810 −0 testbuild_othertestrunner.xml
View
1  .gitignore
@@ -4,3 +4,4 @@ local.properties
/local.properties
/local.properties
/local.properties
+obf/
View
49 add-proguard-release.xml
@@ -0,0 +1,49 @@
+<!-- Proguard Properties -->
+<path id="android.modified.classpath">
+ <fileset dir="${external.libs.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ <path refid="android.target.classpath"/>
+</path>
+
+<property name="obfuscate.dir" value="obf" />
+<property name="obfuscate.absolute.dir" location="${obfuscate.dir}" />
+<property name="android-jar-preobfuscate" value="${obfuscate.absolute.dir}/original.jar" />
+<property name="android-jar-postobfuscate" value="${obfuscate.absolute.dir}/postobf.jar" />
+<property name="out.dex.input.absolute.dir" value="${android-jar-postobfuscate}" />
+
+<!-- replaces the post-compile step from ant_rules_r3 -->
+<target name="-post-compile" depends="-dex-obfuscate,-dex-no-obfuscate">
+</target>
+
+<target name="-dex-no-obfuscate" unless="build.mode.release">
+ <mkdir dir="${obfuscate.absolute.dir}" />
+ <jar basedir="${out.classes.dir}" destfile="${android-jar-postobfuscate}" />
+</target>
+
+<!-- Converts this project's .class files into .dex files -->
+<target name="-dex-obfuscate" if="build.mode.release">
+ <property name="proguard-jar" value="${proguard.dir}/proguard.jar" />
+ <property name="proguard-conf.dir" value="" />
+ <property name="proguard-conf.absolute.dir" location="${proguard-conf.dir}" />
+ <property name="proguard-conf" value="${proguard-conf.absolute.dir}/procfg.txt" />
+ <property name="libraryjarpath" refid="android.modified.classpath"/>
+ <!-- Add Proguard Task -->
+ <taskdef resource="proguard/ant/task.properties" classpath="${proguard-jar}" />
+
+ <mkdir dir="${obfuscate.absolute.dir}" />
+ <delete file="${android-jar-preobfuscate}"/>
+ <delete file="${android-jar-postobfuscate}"/>
+ <jar basedir="${out.classes.dir}" destfile="${android-jar-preobfuscate}" />
+ <proguard>
+ @${proguard-conf}
+ -injars ${android-jar-preobfuscate}
+ -outjars ${android-jar-postobfuscate}
+ -libraryjars ${libraryjarpath}
+ -dump ${obfuscate.absolute.dir}/dump.txt
+ -printseeds ${obfuscate.absolute.dir}/seeds.txt
+ -printusage ${obfuscate.absolute.dir}/usage.txt
+ -printmapping ${obfuscate.absolute.dir}/mapping.txt
+ </proguard>
+</target>
+
View
551 alpbuild.xml
@@ -0,0 +1,551 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="AndCooperANT" default="">
+<!-- The local.properties file is created and updated by the 'android'
+ tool.
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+ <property file="local.properties" />
+
+ <!-- The build.properties file can be created by you and is never touched
+ by the 'android' tool. This is the place to change some of the
+ default property values used by the Ant rules.
+ Here are some properties you may want to change/update:
+
+ source.dir
+ The name of the source directory. Default is 'src'.
+ out.dir
+ The name of the output directory. Default is 'bin'.
+
+ Properties related to the SDK location or the project target should
+ be updated using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems.
+
+ -->
+ <property file="build.properties" />
+
+ <!-- The default.properties file is created and updated by the 'android'
+ tool, as well as ADT.
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems. -->
+ <property file="default.properties" />
+
+ <!-- Custom Android task to deal with the project target, and import the
+ proper rules.
+ This requires ant 1.6.0 or above. -->
+ <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" />
+
+<!-- extension targets. Uncomment the ones where you want to do custom work
+ in between standard targets -->
+<!--
+ <target name="-pre-build">
+ </target>
+ <target name="-pre-compile">
+ </target>
+
+ [This is typically used for code obfuscation.
+ Compiled code location: ${out.classes.absolute.dir}
+ If this is not done in place, override ${out.dex.input.absolute.dir}]
+ <target name="-post-compile">
+ </target>
+-->
+
+
+ <!-- Execute the Android Setup task that will setup some properties
+ specific to the target, and import the build rules files.
+
+ The rules file is imported from
+ <SDK>/platforms/<target_platform>/ant/ant_rules_r#.xml
+
+ To customize existing targets, there are two options:
+ - Customize only one target:
+ - copy/paste the target into this file, *before* the
+ <setup> task.
+ - customize it to your needs.
+ - Customize the whole script.
+ - copy/paste the content of the rules files (minus the top node)
+ into this file, *after* the <setup> task
+ - disable the import of the rules by changing the setup task
+ below to <setup import="false" />.
+ - customize to your needs.
+ -->
+ <setup import="false" />
+
+ <!--
+ This rules file is meant to be imported by the custom Ant task:
+ com.android.ant.SetupTask
+
+ The following properties are put in place by the importing task:
+ android.jar, android.aidl, aapt, aidl, and dx
+
+ Additionnaly, the task sets up the following classpath reference:
+ android.target.classpath
+ This is used by the compiler task as the boot classpath.
+ -->
+
+ <!-- Custom tasks -->
+ <taskdef name="aapt"
+ classname="com.android.ant.AaptExecLoopTask"
+ classpathref="android.antlibs" />
+
+ <taskdef name="aidl"
+ classname="com.android.ant.AidlExecTask"
+ classpathref="android.antlibs" />
+
+ <taskdef name="xpath"
+ classname="com.android.ant.XPathTask"
+ classpathref="android.antlibs" />
+
+ <taskdef name="if"
+ classname="com.android.ant.IfElseTask"
+ classpathref="android.antlibs" />
+
+ <!-- Properties -->
+
+ <!-- Tells adb which device to target. You can change this from the command line
+ by invoking "ant -Dadb.device.arg=-d" for device "ant -Dadb.device.arg=-e" for
+ the emulator. -->
+ <property name="adb.device.arg" value="" />
+
+ <property name="android.tools.dir" location="${sdk.dir}/tools" />
+ <!-- Name of the application package extracted from manifest file -->
+ <xpath input="AndroidManifest.xml" expression="/manifest/@package"
+ output="manifest.package" />
+ <xpath input="AndroidManifest.xml" expression="/manifest/application/@android:hasCode"
+ output="manifest.hasCode" default="true"/>
+
+ <!-- Input directories -->
+ <property name="source.dir" value="src" />
+ <property name="source.absolute.dir" location="${source.dir}" />
+ <property name="gen.dir" value="gen" />
+ <property name="gen.absolute.dir" location="${gen.dir}" />
+ <property name="resource.dir" value="res" />
+ <property name="resource.absolute.dir" location="${resource.dir}" />
+ <property name="asset.dir" value="assets" />
+ <property name="asset.absolute.dir" location="${asset.dir}" />
+
+ <!-- Directory for the third party java libraries -->
+ <property name="external.libs.dir" value="libs" />
+ <property name="external.libs.absolute.dir" location="${external.libs.dir}" />
+ <!-- Directory for the native libraries -->
+ <property name="native.libs.dir" value="libs" />
+ <property name="native.libs.absolute.dir" location="${native.libs.dir}" />
+
+ <!-- Output directories -->
+ <property name="out.dir" value="bin" />
+ <property name="out.absolute.dir" location="${out.dir}" />
+ <property name="out.classes.dir" value="${out.absolute.dir}/classes" />
+ <property name="out.classes.absolute.dir" location="${out.classes.dir}" />
+
+ <!-- Verbosity -->
+ <property name="verbose" value="false" />
+ <!-- This is needed by emma as it uses multilevel verbosity instead of simple 'true' or 'false'
+ The property 'verbosity' is not user configurable and depends exclusively on 'verbose'
+ value.-->
+ <condition property="verbosity" value="verbose" else="quiet">
+ <istrue value="${verbose}" />
+ </condition>
+
+ <!-- Tools -->
+ <condition property="exe" value=".exe" else=""><os family="windows" /></condition>
+
+ <!-- Emma configuration -->
+ <property name="emma.dir" value="${sdk.dir}/tools/lib" />
+ <path id="emma.lib">
+ <pathelement location="${emma.dir}/emma.jar" />
+ <pathelement location="${emma.dir}/emma_ant.jar" />
+ </path>
+ <taskdef resource="emma_ant.properties" classpathref="emma.lib" />
+ <!-- End of emma configuration -->
+
+ <!-- Rules -->
+
+ <!-- Creates the output directories if they don't exist yet. -->
+ <target name="-dirs">
+ <echo>Creating output directories if needed...</echo>
+ <mkdir dir="${resource.absolute.dir}" />
+ <mkdir dir="${external.libs.absolute.dir}" />
+ <mkdir dir="${gen.absolute.dir}" />
+ <mkdir dir="${out.absolute.dir}" />
+ <mkdir dir="${out.classes.absolute.dir}" />
+ </target>
+
+ <!-- empty default pre-build target. Create a similar target in
+ your build.xml and it'll be called instead of this one. -->
+ <target name="-pre-build" depends="-mydirs, -jsjavadoc"/>
+
+ <!-- Generates the R.java file for this project's resources. -->
+ <target name="-resource-src" depends="-dirs, -pre-build">
+ <echo>Generating R.java / Manifest.java from the resources...</echo>
+ <aapt executable="${aapt}"
+ command="package"
+ verbose="${verbose}"
+ manifest="AndroidManifest.xml"
+ androidjar="${android.jar}"
+ rfolder="${gen.absolute.dir}">
+ <res path="${resource.absolute.dir}" />
+ </aapt>
+ </target>
+
+ <!-- Generates java classes from .aidl files. -->
+ <target name="-aidl" depends="-dirs">
+ <if condition="${manifest.hasCode}">
+ <then>
+ <echo>Compiling aidl files into Java classes...</echo>
+ <aidl executable="${aidl}" framework="${android.aidl}"
+ genFolder="${gen.absolute.dir}">
+ <source path="${source.absolute.dir}"/>
+ <source refid="android.libraries.src"/>
+ </aidl>
+ </then>
+ <else>
+ <echo>hasCode = false. Skipping...</echo>
+ </else>
+ </if>
+ </target>
+
+ <!-- empty default pre-compile target. Create a similar target in
+ your build.xml and it'll be called instead of this one. -->
+ <target name="-pre-compile" depends="-checkstyle,-pmd"/>
+
+ <!-- Compiles this project's .java files into .class files. -->
+ <target name="compile" depends="-resource-src, -aidl, -pre-compile"
+ description="Compiles project's .java files into .class files">
+ <!-- If android rules are used for a test project, its classpath should include
+ tested project's location -->
+ <condition property="extensible.classpath"
+ value="${tested.project.absolute.dir}/bin/classes" else=".">
+ <isset property="tested.project.absolute.dir" />
+ </condition>
+ <condition property="extensible.libs.classpath"
+ value="${tested.project.absolute.dir}/libs"
+ else="./libs">
+ <isset property="tested.project.absolute.dir" />
+ </condition>
+ <javac encoding="ascii" target="1.5" debug="true" extdirs=""
+ destdir="${out.classes.absolute.dir}"
+ bootclasspathref="android.target.classpath"
+ verbose="${verbose}"
+ classpath="${extensible.classpath}"
+ classpathref="android.libraries.jars">
+ <src path="${source.absolute.dir}" />
+ <src path="${gen.absolute.dir}" />
+ <src refid="android.libraries.src" />
+ <classpath>
+ <fileset dir="${external.libs.absolute.dir}" includes="*.jar" />
+ <fileset dir="${extensible.libs.classpath}" includes="*.jar" />
+ </classpath>
+ </javac>
+ </target>
+
+ <target name="clean" description="Removes output files created by other targets.">
+ <delete dir="${out.absolute.dir}" verbose="${verbose}" />
+ <delete dir="${gen.absolute.dir}" verbose="${verbose}" />
+ </target>
+
+ <target name="help">
+ <!-- displays starts at col 13
+ |13 80| -->
+ <echo>Android Ant Build. Available targets:</echo>
+ <echo> help: Displays this help.</echo>
+ <echo> clean: Removes output files created by other targets.</echo>
+ <echo> compile: Compiles project's .java files into .class files.</echo>
+ </target>
+
+ <!-- Properties -->
+ <property name="reports.dir" value="${basedir}/reports"/>
+ <property name="javadoc.dir" value="${basedir}/javadocs"/>
+ <property name="antlibs.dir" value="${basedir}/antlibs"/>
+ <property name="doclets.dir" value="${basedir}/doclets"/>
+
+ <!-- Paths -->
+ <path id="antlibs.classpath">
+ <fileset dir="${antlibs.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <property name="apiviz.location" value="doclets/apiviz-1.3.1.GA.jar"/>
+
+ <!-- Taskdefs -->
+ <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"
+ classpathref="antlibs.classpath"/>
+ <taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask"
+ classpathref="antlibs.classpath"/>
+ <taskdef resource="checkstyletask.properties"
+ classpathref="antlibs.classpath"/>
+
+ <taskdef name="classycleReport" classname="classycle.ant.ReportTask"
+ classpathref="antlibs.classpath"/>
+
+ <!-- For the xslt style task in reports need certain properties defined
+ to pass as parameters -->
+ <property name="project" value="${project.name}"/>
+ <property name="rulesets" value="androidrules"/>
+ <property name="today" value="${DSTAMP}"/>
+
+ <path id="javadoc.source">
+ <pathelement path="${source.absolute.dir}"/>
+ </path>
+
+ <!-- When I add javadoc I am assuming that IDE has put
+ its incremental build result at bin/
+ ie..
+
+ additionalparam -sourceclasspath ${out.classes.dir}
+ changed to -sourceclasspath ${out.dir}
+ in javadoc target
+
+ If runing from non_IDE than you needf to change
+ it back.
+
+ does not pick up android.target.classpath so..
+ a modification
+ -->
+ <!-- Properties -->
+ <property name="reports.dir" value="${basedir}/reports"/>
+ <property name="javadoc.dir" value="${basedir}/javadocs"/>
+ <property name="antlibs.dir" value="${basedir}/antlibs"/>
+ <property name="doclets.dir" value="${basedir}/doclets"/>
+
+ <!-- Paths -->
+ <path id="antlibs.classpath">
+ <fileset dir="${antlibs.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <!-- Path needs to include both Android jars and
+ 3rd party library jars in libs-->
+ <path id="android.project.libs">
+ <fileset dir="${native.libs.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ <path refid="android.target.classpath"/>
+ </path>
+
+ <property name="apiviz.location" value="doclets/apiviz-1.3.1.GA.jar"/>
+
+ <!-- For the xslt style task in reports need certain properties defined
+ to pass as parameters -->
+ <property name="project" value="${ant.project.name}"/>
+ <property name="rulesets" value="androidrules"/>
+ <property name="today" value="${DSTAMP}"/>
+
+ <path id="javadoc.source">
+ <pathelement path="${source.absolute.dir}"/>
+ </path>
+
+
+
+ <!-- ===============================
+ target: -mydirs
+ =============================== -->
+ <target name="-mydirs">
+ <mkdir dir="${reports.dir}/images"/>
+ <mkdir dir="${javadoc.dir}"/>
+ <mkdir dir="${javadoc.dir}/resources"/>
+ <mkdir dir="js_javadocs"/>
+ <mkdir dir="assets/js"/>
+ <!-- move companylogo.png to javadoc/resources-->
+ <copy file="buildconfig/images/companylogo.png"
+ todir="${javadoc.dir}/resources"/>
+ <copy file="buildconfig/images/abstract.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/class.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/companylogo.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/inner.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/innerabstract.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/innerclass.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/innerCycleLink.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/innerinterface.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/interface.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/link.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/logo.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/mix.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/mixedCycleLink.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/package.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/andcooper.reports.css"
+ todir="${reports.dir}"/>
+ <copy file="buildconfig/images/checkstylelogo.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/pmd_logo_small.jpg"
+ todir="${reports.dir}/images"/>
+ </target>
+
+ <!-- ================================
+ target: javadoc
+
+ additionalparam -sourceclasspath ${out.classes.dir}
+ changed to -sourceclasspath ${out.dir}
+ if runing from non-IDE change back
+ ================================ -->
+ <target name="-javadoc">
+
+ <javadoc
+ sourcepathref="javadoc.source"
+
+ destdir="${javadoc.dir}"
+
+ bootclasspathref="android.project.libs"
+
+ private="true"
+ windowtitle="${ant.project.name}}"
+ additionalparam="-author -version -sourceclasspath ${out.classes.dir}">
+ <!-- Use a nice documentation title -->
+ <doctitle>
+ ${ant.project.name}&lt;/br>
+ API Specification
+ </doctitle>
+ <!-- Create a header that contains the taglets logo -->
+ <!-- Note the use of the {@docRoot} tag to link to the logo -->
+ <header>
+ &lt;img
+ src=&quot;{@docRoot}/resources/companylogo.png&quot;
+ width=&quot;88&quot; height=&quot;40&quot; border=&quot;0&quot;
+ &gt;
+ </header>
+ <!-- Same for the footer -->
+ <footer>
+ &lt;img
+ src=&quot;{@docRoot}/resources/companylogo.png&quot;
+ width=&quot;88&quot; height=&quot;40&quot;
+ &gt;
+ </footer>
+ <!-- Include a timestamp at the bottom of the docu generated -->
+ <!-- Note the use of ${timestamp} which was created by the -->
+ <!-- <tstamp> task at the start of this target -->
+ <bottom>
+ &lt;p align=&quot;right&quot;&gt;
+ &lt;font class=&quot;NavBarFont1&quot; size=&quot;-1&quot;&gt;
+ Android SDK API Target ${target}&lt;br&gt;
+ ${ant.project.name}&lt;br&gt;
+ API Spec&lt;br&gt;
+ ${TSTAMP} ${DSTAMP}
+ &lt;/font&gt;
+ &lt;/p&gt;
+ </bottom>
+ <doclet name="org.jboss.apiviz.APIviz" path="${apiviz.location}">
+
+ </doclet>
+ </javadoc>
+ </target>
+
+
+
+
+ <target name="-pmd" >
+
+ <pmd >
+ <auxclasspath>
+ <path refid="android.target.classpath"/>
+ <pathelement location="${out.classes.absolute.dir}" />
+ <fileset dir="libs">
+ <include name="*.jar" />
+ </fileset>
+ </auxclasspath>
+ <formatter type="xml" toFile="reports/pmd.xml"/>
+ <ruleset>rulesets/android.xml</ruleset>
+ <fileset dir="${source.dir}" includes="**/*.java" />
+ </pmd>
+ <xslt basedir="reports" destdir="reports"
+ style="buildconfig/xsls/andcooper.pmd.xsl">
+ <param name="project" expression="${ant.project.name}"/>
+ <param name="today" expression="${today}"/>
+
+ <param name="rulesets" expression="androidrules"/>
+ <mapper type="glob" from="pmd.xml" to="pmd.html"/>
+ </xslt>
+
+
+ <echo>pmd report generated and transformed to html</echo>
+ </target>
+
+
+
+
+
+
+
+
+ <!-- ================================
+ target: checkstyle
+ ================================ -->
+ <target name="-checkstyle" depends="">
+ <checkstyle config="${basedir}/eclipse_sun_checkstyle.xml"
+ failureProperty="checkstyle.failure"
+ failOnViolation="false">
+ <formatter type="xml"
+ tofile="reports/checkstyle.xml"/>
+ <fileset dir="${source.absolute.dir}" includes="**/*.java"/>
+ <classpath refid="antlibs.classpath"/>
+
+ </checkstyle>
+ <xslt basedir="reports" destdir="reports"
+ style="buildconfig/xsls/andcooper.checkstyle.xsl">
+ <param name="today" expression="${today}"/>
+ <mapper type="glob" from="checkstyle.xml" to="checkstyle.html"/>
+
+ </xslt>
+
+ <echo>Checkstyle report generated and transformed to html</echo>
+ </target>
+
+
+
+ <target name="-classycle" depends="">
+
+ <classycleReport
+ reportfile="reports/classycle.xml"
+ title="${ant.project.name}"
+ >
+ <fileset dir="${out.classes.absolute.dir}">
+ <include name="**/*.class"/>
+
+ </fileset>
+ </classycleReport>
+ <!-- xslt task for classycle requires no parameters to be paased -->
+
+ <xslt basedir="reports" destdir="reports"
+ style="buildconfig/xsls/andcooper.classycle.xsl">
+ <param name="date" expression="${today}"/>
+ <param name="title" expression="${ant.project.name}"/>
+ <mapper type="glob" from="classycle.xml" to="classycle.html"/>
+
+ </xslt>
+
+ </target>
+
+ <target name="compile.and.doc" depends="compile,-javadoc, -classycle">
+ </target>
+
+ <!-- =================================
+ target: -jsjavdoc
+ ================================= -->
+ <target name="-jsjavadoc" >
+ <ant antfile="${jGrouseHome.default}/build.xml"/>
+ </target>
+
+</project>
View
BIN  antlibs/classycle.jar
Binary file not shown
View
BIN  antlibs/proguard.jar
Binary file not shown
View
3  build.properties.template
@@ -0,0 +1,3 @@
+application.package=
+source.dir=
+out.dir=
View
1,034 build.xml
@@ -0,0 +1,1034 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+ <!ENTITY add-proguard-release SYSTEM "add-proguard-release.xml">
+
+]>
+
+<!-- ======================================================================
+ Sep 11, 2010 10:20:13 AM
+
+ AndCoooperANT
+ ANdCooperANT for Android Java development
+
+ ParentProject
+ build.properties
+ application.package=com.mobilebytes.andcooperant
+ source.dir=src
+ out.dir=bin
+
+ default.properties
+ target=android-4
+ local.properties
+ sdk.dir=/home/fredgrott/opt/android/android-sdk-linux_86_mine
+ key.store=/home/fredgrott/.android/mesign
+ key.alias=mobilebytes
+ proguard.dir=/home/fredgrott/my35ws_github/AndCooperANT/antlibs
+
+ TestProject
+ build.properties
+ application.package=com.mobilebytes.andcooperant
+ source.dir=src
+ out.dir=bin
+
+ default.properties
+ target=android-4
+
+ local.properties
+ sdk.dir=/home/fredgrott/opt/android/android-sdk-linux_86_mine
+
+
+ AndroidLibraryProject
+ build.properties
+ application.package=com.mobilebytes.andcooperant
+ source.dir=src
+ out.dir=bin
+
+
+ default.properties
+ target=android-4
+
+ local.properties
+ sdk.dir=/home/fredgrott/opt/android/android-sdk-linux_86_mine
+
+
+ MultiExportAPKProject
+ build.properties
+
+ exported.properties
+
+
+
+ fredgrott
+ ====================================================================== -->
+<project name="AndCooperANT" basedir="." default="help">
+ <description>
+ AndCooperANT for Android Java development
+ </description>
+
+ <property environment="env"/>
+
+ <tstamp/>
+
+ <!-- Added proguard obfuscation per
+ dev blog post:http://android-developers.blogspot.com/2010/09/proguard-android-and-licensing-server.html
+ -->
+ &add-proguard-release;
+
+ <!-- ++++++++++++++++++++++++++++++++
+ start of build.template and
+ ant_rules_r2.xml copy
+ as we only need to compile
+ this library.
+ ++++++++++++++++++++++++++++++++ -->
+
+ <!-- +++ build.template +++ androidsdk/tools/lib -->
+
+ <!-- The local.properties file is created and updated by the 'android'
+ tool.
+ It contains the path to the SDK. It should *NOT* be checked into
+ Version Control Systems. -->
+ <property file="local.properties" />
+
+ <!-- The build.properties file can be created by you and is never touched
+ by the 'android' tool. This is the place to change some of the
+ default property values used by the Ant rules.
+ Here are some properties you may want to change/update:
+
+ source.dir
+ The name of the source directory. Default is 'src'.
+ out.dir
+ The name of the output directory. Default is 'bin'.
+
+ Properties related to the SDK location or the project target should
+ be updated using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems.
+
+ -->
+ <property file="build.properties" />
+
+ <!-- The default.properties file is created and updated by the 'android'
+ tool, as well as ADT.
+ This file is an integral part of the build system for your
+ application and should be checked into Version Control Systems. -->
+ <property file="default.properties" />
+
+ <!-- Custom Android task to deal with the project target, and import the
+ proper rules.
+ This requires ant 1.6.0 or above. -->
+ <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" />
+
+ <!-- extension targets. Uncomment the ones where you want to do custom work
+ in between standard targets -->
+ <!--
+ <target name="-pre-build">
+ </target>
+ <target name="-pre-compile">
+ </target>
+
+ [This is typically used for code obfuscation.
+ Compiled code location: ${out.classes.absolute.dir}
+ If this is not done in place, override ${out.dex.input.absolute.dir}]
+
+ </target>
+ -->
+
+
+ <!-- Execute the Android Setup task that will setup some properties
+ specific to the target, and import the build rules files.
+
+ The rules file is imported from
+ <SDK>/platforms/<target_platform>/ant/ant_rules_r#.xml
+
+ To customize existing targets, there are two options:
+ - Customize only one target:
+ - copy/paste the target into this file, *before* the
+ <setup> task.
+ - customize it to your needs.
+ - Customize the whole script.
+ - copy/paste the content of the rules files (minus the top node)
+ into this file, *after* the <setup> task
+ - disable the import of the rules by changing the setup task
+ below to <setup import="false" />.
+ - customize to your needs.
+ -->
+ <setup import="false" />
+
+ <!-- +++ ant_rules_r3.xml sdk/platforms/target/ant ++ -->
+ <!--
+ This rules file is meant to be imported by the custom Ant task:
+ com.android.ant.SetupTask
+
+ The following properties are put in place by the importing task:
+ android.jar, android.aidl, aapt, aidl, and dx
+
+ Additionnaly, the task sets up the following classpath reference:
+ android.target.classpath
+ This is used by the compiler task as the boot classpath.
+ -->
+
+ <!-- Custom tasks -->
+ <taskdef name="aapt"
+ classname="com.android.ant.AaptExecLoopTask"
+ classpathref="android.antlibs" />
+
+ <taskdef name="aidl"
+ classname="com.android.ant.AidlExecTask"
+ classpathref="android.antlibs" />
+
+ <taskdef name="apkbuilder"
+ classname="com.android.ant.ApkBuilderTask"
+ classpathref="android.antlibs" />
+
+ <taskdef name="xpath"
+ classname="com.android.ant.XPathTask"
+ classpathref="android.antlibs" />
+
+ <taskdef name="if"
+ classname="com.android.ant.IfElseTask"
+ classpathref="android.antlibs" />
+
+ <!-- Properties -->
+
+ <!-- Tells adb which device to target. You can change this from the command line
+ by invoking "ant -Dadb.device.arg=-d" for device "ant -Dadb.device.arg=-e" for
+ the emulator. -->
+ <property name="adb.device.arg" value="" />
+
+ <property name="android.tools.dir" location="${sdk.dir}/tools" />
+ <!-- Name of the application package extracted from manifest file -->
+ <xpath input="AndroidManifest.xml" expression="/manifest/@package"
+ output="manifest.package" />
+ <!-- Value of the debuggable attribute (Application node) extracted from manifest file -->
+ <xpath input="AndroidManifest.xml" expression="/manifest/application/@android:debuggable"
+ output="manifest.debuggable" default="false"/>
+ <!-- Value of the debuggable attribute (Application node) extracted from manifest file -->
+ <xpath input="AndroidManifest.xml" expression="/manifest/application/@android:hasCode"
+ output="manifest.hasCode" default="true"/>
+
+ <!-- Input directories -->
+ <property name="source.dir" value="src" />
+ <property name="source.absolute.dir" location="${source.dir}" />
+ <property name="gen.dir" value="gen" />
+ <property name="gen.absolute.dir" location="${gen.dir}" />
+ <property name="resource.dir" value="res" />
+ <property name="resource.absolute.dir" location="${resource.dir}" />
+ <property name="asset.dir" value="assets" />
+ <property name="asset.absolute.dir" location="${asset.dir}" />
+
+ <!-- Directory for the third party java libraries -->
+ <property name="external.libs.dir" value="libs" />
+ <property name="external.libs.absolute.dir" location="${external.libs.dir}" />
+
+ <!-- Directory for the native libraries -->
+ <property name="native.libs.dir" value="libs" />
+ <property name="native.libs.absolute.dir" location="${native.libs.dir}" />
+
+ <!-- Output directories -->
+ <property name="out.dir" value="bin" />
+ <property name="out.absolute.dir" location="${out.dir}" />
+ <property name="out.classes.dir" value="${out.absolute.dir}/classes" />
+ <property name="out.classes.absolute.dir" location="${out.classes.dir}" />
+ <property name="out.dex.input.absolute.dir" value="${out.classes.absolute.dir}" />
+
+ <!-- Intermediate files -->
+ <property name="dex.file.name" value="classes.dex" />
+ <property name="intermediate.dex.file"
+ location="${out.absolute.dir}/${dex.file.name}" />
+ <property name="resource.package.file.name"
+ value="${ant.project.name}.ap_" />
+
+ <!-- The final package file to generate
+ These can be overridden by setting them earlier to
+ different values -->
+ <property name="out.debug.unaligned.file"
+ location="${out.absolute.dir}/${ant.project.name}-debug-unaligned.apk" />
+ <property name="out.debug.file"
+ location="${out.absolute.dir}/${ant.project.name}-debug.apk" />
+
+ <property name="out.unsigned.file.name"
+ value="${ant.project.name}-unsigned.apk" />
+ <property name="out.unsigned.file"
+ location="${out.absolute.dir}/${out.unsigned.file.name}" />
+
+ <property name="out.unaligned.file.name"
+ value="${ant.project.name}-unaligned.apk" />
+ <property name="out.unaligned.file"
+ location="${out.absolute.dir}/${out.unaligned.file.name}" />
+
+ <property name="out.release.file.name"
+ value="${ant.project.name}-release.apk" />
+ <property name="out.release.file"
+ location="${out.absolute.dir}/${out.release.file.name}" />
+
+ <!-- set some properties used for filtering/override. If those weren't defined
+ before, then this will create them with empty values, which are then ignored
+ by the custom tasks receiving them. -->
+ <property name="version.code" value="" />
+ <property name="aapt.resource.filter" value="" />
+ <property name="filter.abi" value="" />
+
+ <!-- Verbosity -->
+ <property name="verbose" value="false" />
+ <!-- This is needed by emma as it uses multilevel verbosity instead of simple 'true' or 'false'
+ The property 'verbosity' is not user configurable and depends exclusively on 'verbose'
+ value.-->
+ <condition property="verbosity" value="verbose" else="quiet">
+ <istrue value="${verbose}" />
+ </condition>
+ <!-- This is needed to switch verbosity of zipalign. Depends exclusively on 'verbose'
+ -->
+ <condition property="v.option" value="-v" else="">
+ <istrue value="${verbose}" />
+ </condition>
+ <!-- This is needed to switch verbosity of dx. Depends exclusively on 'verbose' -->
+ <condition property="verbose.option" value="--verbose" else="">
+ <istrue value="${verbose}" />
+ </condition>
+
+ <!-- properties for signing in release mode -->
+ <condition property="has.keystore">
+ <and>
+ <isset property="key.store" />
+ <length string="${key.store}" when="greater" length="0" />
+ <isset property="key.alias" />
+ </and>
+ </condition>
+ <condition property="has.password">
+ <and>
+ <isset property="has.keystore" />
+ <isset property="key.store.password" />
+ <isset property="key.alias.password" />
+ </and>
+ </condition>
+
+ <!-- Tools -->
+ <condition property="exe" value=".exe" else=""><os family="windows" /></condition>
+ <property name="adb" location="${android.tools.dir}/adb${exe}" />
+ <property name="zipalign" location="${android.tools.dir}/zipalign${exe}" />
+
+ <!-- Emma configuration -->
+ <property name="emma.dir" value="${sdk.dir}/tools/lib" />
+ <path id="emma.lib">
+ <pathelement location="${emma.dir}/emma.jar" />
+ <pathelement location="${emma.dir}/emma_ant.jar" />
+ </path>
+ <taskdef resource="emma_ant.properties" classpathref="emma.lib" />
+ <!-- End of emma configuration -->
+
+
+
+ <!-- Macros -->
+
+ <!-- Configurable macro, which allows to pass as parameters output directory,
+ output dex filename and external libraries to dex (optional) -->
+ <macrodef name="dex-helper">
+ <element name="external-libs" optional="yes" />
+ <element name="extra-parameters" optional="yes" />
+ <sequential>
+ <echo>Converting compiled files and external libraries into ${intermediate.dex.file}...</echo>
+ <apply executable="${dx}" failonerror="true" parallel="true">
+ <arg value="--dex" />
+ <arg value="--output=${intermediate.dex.file}" />
+ <extra-parameters />
+ <arg line="${verbose.option}" />
+ <arg path="${out.dex.input.absolute.dir}" />
+ <fileset dir="${external.libs.absolute.dir}" includes="*.jar" />
+ <path refid="android.libraries.jars" />
+ <external-libs />
+ </apply>
+ </sequential>
+ </macrodef>
+
+ <!-- This is macro that enable passing variable list of external jar files to ApkBuilder
+ Example of use:
+ <package-helper sign.package="true" output.filepath="/path/to/foo.apk">
+ <extra-jars>
+ <jarfolder path="my_jars" />
+ <jarfile path="foo/bar.jar" />
+ <jarfolder path="your_jars" />
+ </extra-jars>
+ </package-helper> -->
+ <macrodef name="package-helper">
+ <attribute name="sign.package" />
+ <attribute name="output.filepath" />
+ <element name="extra-jars" optional="yes" />
+ <sequential>
+ <apkbuilder
+ outfolder="${out.absolute.dir}"
+ resourcefile="${resource.package.file.name}"
+ apkfilepath="@{output.filepath}"
+ signed="@{sign.package}"
+ debug="${manifest.debuggable}"
+ abifilter="${filter.abi}"
+ verbose="${verbose}"
+ hascode="${manifest.hasCode}">
+ <dex path="${intermediate.dex.file}"/>
+ <sourcefolder path="${source.absolute.dir}"/>
+ <sourcefolder refid="android.libraries.src"/>
+ <jarfolder path="${external.libs.absolute.dir}" />
+ <jarfolder refid="android.libraries.libs" />
+ <nativefolder path="${native.libs.absolute.dir}" />
+ <nativefolder refid="android.libraries.libs" />
+ <extra-jars/>
+ </apkbuilder>
+ </sequential>
+ </macrodef>
+
+ <!-- This is macro which zipaligns in.package and outputs it to out.package. Used by targets
+ debug, -debug-with-emma and release.-->
+ <macrodef name="zipalign-helper">
+ <attribute name="in.package" />
+ <attribute name="out.package" />
+ <sequential>
+ <echo>Running zip align on final apk...</echo>
+ <exec executable="${zipalign}" failonerror="true">
+ <arg line="${v.option}" />
+ <arg value="-f" />
+ <arg value="4" />
+ <arg path="@{in.package}" />
+ <arg path="@{out.package}" />
+ </exec>
+ </sequential>
+ </macrodef>
+
+ <!-- This is macro used only for sharing code among two targets, -install and
+ -install-with-emma which do exactly the same but differ in dependencies -->
+ <macrodef name="install-helper">
+ <sequential>
+ <echo>Installing ${out.debug.file} onto default emulator or device...</echo>
+ <exec executable="${adb}" failonerror="true">
+ <arg line="${adb.device.arg}" />
+ <arg value="install" />
+ <arg value="-r" />
+ <arg path="${out.debug.file}" />
+ </exec>
+ </sequential>
+ </macrodef>
+
+ <!-- Rules -->
+
+ <!-- Creates the output directories if they don't exist yet. -->
+ <target name="-dirs">
+ <echo>Creating output directories if needed...</echo>
+ <mkdir dir="${resource.absolute.dir}" />
+ <mkdir dir="${external.libs.absolute.dir}" />
+ <mkdir dir="${out.absolute.dir}" />
+ <if condition="${manifest.hasCode}">
+ <then>
+ <mkdir dir="${gen.absolute.dir}" />
+ <mkdir dir="${out.classes.absolute.dir}" />
+ </then>
+ </if>
+ </target>
+
+ <!-- empty default pre-build target. Create a similar target in
+ your build.xml and it'll be called instead of this one. -->
+ <target name="-pre-build" depends="-mydirs, -jsjavadoc"/>
+
+ <!-- Generates the R.java file for this project's resources. -->
+ <target name="-resource-src" depends="-dirs, -pre-build">
+ <if condition="${manifest.hasCode}">
+ <then>
+ <echo>Generating R.java / Manifest.java from the resources...</echo>
+ <aapt executable="${aapt}"
+ command="package"
+ verbose="${verbose}"
+ manifest="AndroidManifest.xml"
+ androidjar="${android.jar}"
+ rfolder="${gen.absolute.dir}">
+ <res path="${resource.absolute.dir}" />
+ </aapt>
+ </then>
+ <else>
+ <echo>hasCode = false. Skipping...</echo>
+ </else>
+ </if>
+ </target>
+
+ <!-- Generates java classes from .aidl files. -->
+ <target name="-aidl" depends="-dirs">
+ <if condition="${manifest.hasCode}">
+ <then>
+ <echo>Compiling aidl files into Java classes...</echo>
+ <aidl executable="${aidl}" framework="${android.aidl}"
+ genFolder="${gen.absolute.dir}">
+ <source path="${source.absolute.dir}"/>
+ <source refid="android.libraries.src"/>
+ </aidl>
+ </then>
+ <else>
+ <echo>hasCode = false. Skipping...</echo>
+ </else>
+ </if>
+ </target>
+
+ <!-- empty default pre-compile target. Create a similar target in
+ your build.xml and it'll be called instead of this one. -->
+ <target name="-pre-compile" depends="-checkstyle,-pmd"/>
+
+ <!-- Compiles this project's .java files into .class files. -->
+ <target name="compile" depends="-resource-src, -aidl, -pre-compile"
+ description="Compiles project's .java files into .class files">
+ <if condition="${manifest.hasCode}">
+ <then>
+ <!-- If android rules are used for a test project, its classpath should include
+ tested project's location -->
+ <condition property="extensible.classpath"
+ value="${tested.project.absolute.dir}/bin/classes"
+ else="${basedir}">
+ <isset property="tested.project.absolute.dir" />
+ </condition>
+ <condition property="extensible.libs.classpath"
+ value="${tested.project.absolute.dir}/libs"
+ else="${basedir}/libs">
+ <isset property="tested.project.absolute.dir" />
+ </condition>
+ <javac encoding="ascii" target="1.5" debug="true" extdirs=""
+ destdir="${out.classes.absolute.dir}"
+ bootclasspathref="android.target.classpath"
+ verbose="${verbose}"
+ classpath="${extensible.classpath}"
+ classpathref="android.libraries.jars">
+ <src path="${source.absolute.dir}" />
+ <src path="${gen.absolute.dir}" />
+ <src refid="android.libraries.src" />
+ <classpath>
+ <fileset dir="${external.libs.absolute.dir}" includes="*.jar" />
+ <fileset dir="${extensible.libs.classpath}" includes="*.jar" />
+ </classpath>
+ </javac>
+ </then>
+ <else>
+ <echo>hasCode = false. Skipping...</echo>
+ </else>
+ </if>
+ </target>
+
+ <!-- empty default post-compile target. Create a similar target in
+ your build.xml and it'll be called instead of this one. -->
+ <!-- renamed so we could add doc targets
+ -->
+ <target name="-post-compile-doc" depends="-javadoc, -classycle"/>
+
+ <!-- Converts this project's .class files into .dex files -->
+ <target name="-dex" depends="compile, -post-compile, -post-compile-doc"
+ unless="do.not.compile">
+ <if condition="${manifest.hasCode}">
+ <then>
+ <dex-helper />
+ </then>
+ <else>
+ <echo>hasCode = false. Skipping...</echo>
+ </else>
+ </if>
+ </target>
+
+ <!-- Puts the project's resources into the output package file
+ This actually can create multiple resource package in case
+ Some custom apk with specific configuration have been
+ declared in default.properties.
+ -->
+ <target name="-package-resources">
+ <echo>Packaging resources</echo>
+ <aapt executable="${aapt}"
+ command="package"
+ versioncode="${version.code}"
+ manifest="AndroidManifest.xml"
+ assets="${asset.absolute.dir}"
+ androidjar="${android.jar}"
+ apkfolder="${out.absolute.dir}"
+ resourcefilename="${resource.package.file.name}"
+ resourcefilter="${aapt.resource.filter}">
+ <res path="${resource.absolute.dir}" />
+ <!-- <nocompress /> forces no compression on any files in assets or res/raw -->
+ <!-- <nocompress extension="xml" /> forces no compression on specific file extensions in assets and res/raw -->
+ </aapt>
+ </target>
+
+ <!-- Packages the application and sign it with a debug key. -->
+ <target name="-package-debug-sign" depends="-dex, -package-resources">
+ <package-helper
+ sign.package="true"
+ output.filepath="${out.debug.unaligned.file}" />
+ </target>
+
+ <!-- Packages the application without signing it. -->
+ <target name="-package-release" depends="-dex, -package-resources">
+ <package-helper
+ sign.package="false"
+ output.filepath="${out.unsigned.file}"/>
+ </target>
+
+ <target name="-compile-tested-if-test" if="tested.project.dir" unless="do.not.compile.again">
+ <subant target="compile">
+ <fileset dir="${tested.project.absolute.dir}" includes="build.xml" />
+ </subant>
+ </target>
+
+ <!-- Builds debug output package, provided all the necessary files are already dexed -->
+ <target name="debug" depends="-compile-tested-if-test, -package-debug-sign"
+ description="Builds the application and signs it with a debug key.">
+ <zipalign-helper in.package="${out.debug.unaligned.file}"
+ out.package="${out.debug.file}" />
+ <echo>Debug Package: ${out.debug.file}</echo>
+ </target>
+
+ <!-- called through target 'release'. Only executed if the keystore and
+ key alias are known but not their password. -->
+ <target name="-release-prompt-for-password" if="has.keystore" unless="has.password">
+ <!-- Gets passwords -->
+ <input
+ message="Please enter keystore password (store:${key.store}):"
+ addproperty="key.store.password" />
+ <input
+ message="Please enter password for alias '${key.alias}':"
+ addproperty="key.alias.password" />
+ </target>
+
+ <!-- called through target 'release'. Only executed if there's no
+ keystore/key alias set -->
+ <target name="-release-nosign" unless="has.keystore">
+ <echo>No key.store and key.alias properties found in build.properties.</echo>
+ <echo>Please sign ${out.unsigned.file} manually</echo>
+ <echo>and run zipalign from the Android SDK tools.</echo>
+ </target>
+
+ <target name="-set-release-mode">
+ <property name="build.mode.release" value="true"/>
+ </target>
+
+ <!-- This runs -package-release and -release-nosign first and then runs
+ only if release-sign is true (set in -release-check,
+ called by -release-no-sign)-->
+ <target name="release"
+ depends="-set-release-mode, -package-release, -release-prompt-for-password, -release-nosign"
+ if="has.keystore"
+ description="Builds the application. The generated apk file must be signed before
+ it is published.">
+ <!-- Signs the APK -->
+ <echo>Signing final apk...</echo>
+ <signjar
+ jar="${out.unsigned.file}"
+ signedjar="${out.unaligned.file}"
+ keystore="${key.store}"
+ storepass="${key.store.password}"
+ alias="${key.alias}"
+ keypass="${key.alias.password}"
+ verbose="${verbose}" />
+
+ <!-- Zip aligns the APK -->
+ <zipalign-helper in.package="${out.unaligned.file}"
+ out.package="${out.release.file}" />
+ <echo>Release Package: ${out.release.file}</echo>
+ </target>
+
+ <target name="install" depends="debug"
+ description="Installs/reinstalls the debug package onto a running
+ emulator or device. If the application was previously installed,
+ the signatures must match." >
+ <install-helper />
+ </target>
+
+ <target name="-uninstall-check">
+ <condition property="uninstall.run">
+ <isset property="manifest.package" />
+ </condition>
+ </target>
+
+ <target name="-uninstall-error" depends="-uninstall-check" unless="uninstall.run">
+ <echo>Unable to run 'ant uninstall', manifest.package property is not defined.
+ </echo>
+ </target>
+
+ <!-- Uninstalls the package from the default emulator/device -->
+ <target name="uninstall" depends="-uninstall-error" if="uninstall.run"
+ description="Uninstalls the application from a running emulator or device.">
+ <echo>Uninstalling ${manifest.package} from the default emulator or device...</echo>
+ <exec executable="${adb}" failonerror="true">
+ <arg line="${adb.device.arg}" />
+ <arg value="uninstall" />
+ <arg value="${manifest.package}" />
+ </exec>
+ </target>
+
+ <target name="clean" description="Removes output files created by other targets.">
+ <delete dir="${out.absolute.dir}" verbose="${verbose}" />
+ <delete dir="${gen.absolute.dir}" verbose="${verbose}" />
+ </target>
+
+ <!-- Targets for code-coverage measurement purposes, invoked from external file -->
+
+ <!-- Emma-instruments tested project classes (compiles the tested project if necessary)
+ and writes instrumented classes to ${instrumentation.absolute.dir}/classes -->
+ <target name="-emma-instrument" depends="compile">
+ <echo>Instrumenting classes from ${out.absolute.dir}/classes...</echo>
+ <!-- It only instruments class files, not any external libs -->
+ <emma enabled="true">
+ <instr verbosity="${verbosity}"
+ mode="overwrite"
+ instrpath="${out.absolute.dir}/classes"
+ outdir="${out.absolute.dir}/classes">
+ </instr>
+ <!-- TODO: exclusion filters on R*.class and allowing custom exclusion from
+ user defined file -->
+ </emma>
+ </target>
+
+ <target name="-dex-instrumented" depends="-emma-instrument">
+ <dex-helper>
+ <extra-parameters>
+ <arg value="--no-locals" />
+ </extra-parameters>
+ <external-libs>
+ <fileset file="${emma.dir}/emma_device.jar" />
+ </external-libs>
+ </dex-helper>
+ </target>
+
+ <!-- Invoked from external files for code coverage purposes -->
+ <target name="-package-with-emma" depends="-dex-instrumented, -package-resources">
+ <package-helper
+ sign.package="true"
+ output.filepath="${out.debug.unaligned.file}">
+ <extra-jars>
+ <!-- Injected from external file -->
+ <jarfile path="${emma.dir}/emma_device.jar" />
+ </extra-jars>
+ </package-helper>
+ </target>
+
+ <target name="-debug-with-emma" depends="-package-with-emma">
+ <zipalign-helper in.package="${out.debug.unaligned.file}"
+ out.package="${out.debug.file}" />
+ </target>
+
+ <target name="-install-with-emma" depends="-debug-with-emma">
+ <install-helper />
+ </target>
+
+ <!-- End of targets for code-coverage measurement purposes -->
+
+ <target name="help">
+ <!-- displays starts at col 13
+ |13 80| -->
+ <echo>Android Ant Build. Available targets:</echo>
+ <echo> help: Displays this help.</echo>
+ <echo> clean: Removes output files created by other targets.</echo>
+ <echo> compile: Compiles project's .java files into .class files.</echo>
+ <echo> debug: Builds the application and signs it with a debug key.</echo>
+ <echo> release: Builds the application. The generated apk file must be</echo>
+ <echo> signed before it is published.</echo>
+ <echo> install: Installs/reinstalls the debug package onto a running</echo>
+ <echo> emulator or device.</echo>
+ <echo> If the application was previously installed, the</echo>
+ <echo> signatures must match.</echo>
+ <echo> uninstall: Uninstalls the application from a running emulator or</echo>
+ <echo> device.</echo>
+ </target>
+ <!-- ++++++++++++++++++++++++++++++++
+ end copy of build.template and
+ ant_rules_r3.xml
+ ++++++++++++++++++++++++++++++++ -->
+
+
+ <!-- Properties -->
+ <property name="reports.dir" value="${basedir}/reports"/>
+ <property name="javadoc.dir" value="${basedir}/javadocs"/>
+ <property name="antlibs.dir" value="${basedir}/antlibs"/>
+ <property name="doclets.dir" value="${basedir}/doclets"/>
+
+ <!-- Paths -->
+ <path id="antlibs.classpath">
+ <fileset dir="${antlibs.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <property name="apiviz.location" value="doclets/apiviz-1.3.1.GA.jar"/>
+
+ <!-- Taskdefs -->
+ <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask"
+ classpathref="antlibs.classpath"/>
+ <taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask"
+ classpathref="antlibs.classpath"/>
+ <taskdef resource="checkstyletask.properties"
+ classpathref="antlibs.classpath"/>
+
+ <taskdef name="classycleReport" classname="classycle.ant.ReportTask"
+ classpathref="antlibs.classpath"/>
+
+ <!-- For the xslt style task in reports need certain properties defined
+ to pass as parameters -->
+ <property name="project" value="${project.name}"/>
+ <property name="rulesets" value="androidrules"/>
+ <property name="today" value="${DSTAMP}"/>
+
+ <path id="javadoc.source">
+ <pathelement path="${source.absolute.dir}"/>
+ </path>
+
+ <!-- When I add javadoc I am assuming that IDE has put
+ its incremental build result at bin/
+ ie..
+
+ additionalparam -sourceclasspath ${out.classes.dir}
+ changed to -sourceclasspath ${out.dir}
+ in javadoc target
+
+ If runing from non_IDE than you needf to change
+ it back.
+
+ does not pick up android.target.classpath so..
+ a modification
+ -->
+ <!-- Properties -->
+ <property name="reports.dir" value="${basedir}/reports"/>
+ <property name="javadoc.dir" value="${basedir}/javadocs"/>
+ <property name="antlibs.dir" value="${basedir}/antlibs"/>
+ <property name="doclets.dir" value="${basedir}/doclets"/>
+
+ <!-- Paths -->
+ <path id="antlibs.classpath">
+ <fileset dir="${antlibs.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <!-- Path needs to include both Android jars and
+ 3rd party library jars in libs-->
+ <path id="android.project.libs">
+ <fileset dir="${native.libs.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ <path refid="android.target.classpath"/>
+ </path>
+
+ <property name="apiviz.location" value="doclets/apiviz-1.3.1.GA.jar"/>
+
+ <!-- For the xslt style task in reports need certain properties defined
+ to pass as parameters -->
+ <property name="project" value="${ant.project.name}"/>
+ <property name="rulesets" value="androidrules"/>
+ <property name="today" value="${DSTAMP}"/>
+
+ <path id="javadoc.source">
+ <pathelement path="${source.absolute.dir}"/>
+ </path>
+
+
+
+ <!-- ===============================
+ target: -mydirs
+ =============================== -->
+ <target name="-mydirs">
+ <mkdir dir="${reports.dir}/images"/>
+ <mkdir dir="${javadoc.dir}"/>
+ <mkdir dir="${javadoc.dir}/resources"/>
+ <mkdir dir="js_javadocs"/>
+ <mkdir dir="assets/js"/>
+ <!-- move companylogo.png to javadoc/resources-->
+ <copy file="buildconfig/images/companylogo.png"
+ todir="${javadoc.dir}/resources"/>
+ <copy file="buildconfig/images/abstract.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/class.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/companylogo.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/inner.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/innerabstract.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/innerclass.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/innerCycleLink.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/innerinterface.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/interface.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/link.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/logo.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/mix.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/mixedCycleLink.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/package.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/andcooper.reports.css"
+ todir="${reports.dir}"/>
+ <copy file="buildconfig/images/checkstylelogo.png"
+ todir="${reports.dir}/images"/>
+ <copy file="buildconfig/images/pmd_logo_small.jpg"
+ todir="${reports.dir}/images"/>
+ </target>
+
+ <!-- =================================
+ target: -jsjavdoc
+ ================================= -->
+ <target name="-jsjavadoc" >
+ <ant antfile="${jGrouseHome.default}/build.xml"/>
+ </target>
+
+ <!-- ================================
+ target: javadoc
+
+ additionalparam -sourceclasspath ${out.classes.dir}
+ changed to -sourceclasspath ${out.dir}
+ if runing from non-IDE change back
+ ================================ -->
+ <target name="-javadoc">
+
+ <javadoc
+ sourcepathref="javadoc.source"
+
+ destdir="${javadoc.dir}"
+
+ bootclasspathref="android.project.libs"
+
+ private="true"
+ windowtitle="${ant.project.name}}"
+ additionalparam="-author -version -sourceclasspath ${out.classes.dir}">
+ <!-- Use a nice documentation title -->
+ <doctitle>
+ ${ant.project.name}&lt;/br>
+ API Specification
+ </doctitle>
+ <!-- Create a header that contains the taglets logo -->
+ <!-- Note the use of the {@docRoot} tag to link to the logo -->
+ <header>
+ &lt;img
+ src=&quot;{@docRoot}/resources/companylogo.png&quot;
+ width=&quot;88&quot; height=&quot;40&quot; border=&quot;0&quot;
+ &gt;
+ </header>
+ <!-- Same for the footer -->
+ <footer>
+ &lt;img
+ src=&quot;{@docRoot}/resources/companylogo.png&quot;
+ width=&quot;88&quot; height=&quot;40&quot;
+ &gt;
+ </footer>
+ <!-- Include a timestamp at the bottom of the docu generated -->
+ <!-- Note the use of ${timestamp} which was created by the -->
+ <!-- <tstamp> task at the start of this target -->
+ <bottom>
+ &lt;p align=&quot;right&quot;&gt;
+ &lt;font class=&quot;NavBarFont1&quot; size=&quot;-1&quot;&gt;
+ Android SDK API Target ${target}&lt;br&gt;
+ ${ant.project.name}&lt;br&gt;
+ API Spec&lt;br&gt;
+ ${TSTAMP} ${DSTAMP}
+ &lt;/font&gt;
+ &lt;/p&gt;
+ </bottom>
+ <doclet name="org.jboss.apiviz.APIviz" path="${apiviz.location}">
+
+ </doclet>
+ </javadoc>
+ </target>
+
+
+
+
+ <target name="-pmd" >
+
+ <pmd >
+ <auxclasspath>
+ <path refid="android.target.classpath"/>
+ <pathelement location="${out.classes.absolute.dir}" />
+ <fileset dir="libs">
+ <include name="*.jar" />
+ </fileset>
+ </auxclasspath>
+ <formatter type="xml" toFile="reports/pmd.xml"/>
+ <ruleset>rulesets/android.xml</ruleset>
+ <fileset dir="${source.dir}" includes="**/*.java" />
+ </pmd>
+ <xslt basedir="reports" destdir="reports"
+ style="buildconfig/xsls/andcooper.pmd.xsl">
+ <param name="project" expression="${ant.project.name}"/>
+ <param name="today" expression="${today}"/>
+
+ <param name="rulesets" expression="androidrules"/>
+ <mapper type="glob" from="pmd.xml" to="pmd.html"/>
+ </xslt>
+
+
+ <echo>pmd report generated and transformed to html</echo>
+ </target>
+
+
+
+
+
+
+
+
+ <!-- ================================
+ target: checkstyle
+ ================================ -->
+ <target name="-checkstyle" depends="">
+ <checkstyle config="${basedir}/eclipse_sun_checkstyle.xml"
+ failureProperty="checkstyle.failure"
+ failOnViolation="false">
+ <formatter type="xml"
+ tofile="reports/checkstyle.xml"/>
+ <fileset dir="${source.absolute.dir}" includes="**/*.java"/>
+ <classpath refid="antlibs.classpath"/>
+
+ </checkstyle>
+ <xslt basedir="reports" destdir="reports"
+ style="buildconfig/xsls/andcooper.checkstyle.xsl">
+ <param name="today" expression="${today}"/>
+ <mapper type="glob" from="checkstyle.xml" to="checkstyle.html"/>
+
+ </xslt>
+
+ <echo>Checkstyle report generated and transformed to html</echo>
+ </target>
+
+
+
+ <target name="-classycle" depends="">
+
+ <classycleReport
+ reportfile="reports/classycle.xml"
+ title="${ant.project.name}"
+ >
+ <fileset dir="${out.classes.absolute.dir}">
+ <include name="**/*.class"/>
+
+ </fileset>
+ </classycleReport>
+ <!-- xslt task for classycle requires no parameters to be paased -->
+
+ <xslt basedir="reports" destdir="reports"
+ style="buildconfig/xsls/andcooper.classycle.xsl">
+ <param name="date" expression="${today}"/>
+ <param name="title" expression="${ant.project.name}"/>
+ <mapper type="glob" from="classycle.xml" to="classycle.html"/>
+
+ </xslt>
+
+ </target>
+
+ <!-- Used in Test Project to doc everything-->
+ <target name="compile.and.doc" depends="compile, -javadoc, -classycle">
+ </target>
+
+</project>
View
86 buildconfig/andcooper.reports.css
@@ -0,0 +1,86 @@
+body {
+ font-size: 80%;
+ font-family: verdana, arial, helvetica, sans-serif;
+}
+
+th, td {
+ text-align: left;
+ padding: 5px;
+
+}
+
+td a img {
+ border-width:0;
+ margin-left:5pt;
+ vertical-align:middle;
+}
+
+table tr th {
+ font-weight: bold;
+}
+
+table.details tr th {
+ background-color: #a6caf0;
+}
+
+table.details tr td {
+ background-color: #eeeee0;
+}
+
+table.summary tr th {
+ background-color: #d6caf0;
+}
+
+table.summary tr td {
+ background-color: #eeeee0;
+}
+
+p {
+ line-height: 1.5em;
+ margin: 0.5em 2em 1.0em 2em;
+}
+
+h1 {
+ margin: 0px 0px 5px;
+ font: 165%;
+}
+
+h2 {
+ margin-top: 1em;
+ margin-bottom: 0.5em;
+ font: bold 125%;
+}
+
+h3 {
+ margin-bottom: 0.5em;
+ font: bold 115%;
+}
+
+h4 {
+ margin-bottom: 0.5em;
+ font: bold 100%;
+}
+
+h5 {
+ margin-bottom: 0.5em;
+ font: bold 100%;
+}
+
+h6 {
+ margin-bottom: 0.5em;
+ font: bold 100%;
+}
+
+hr {
+ height: 1px;
+}
+
+.Error {
+ font-weight:bold; color:red;
+ }
+ .Failure {
+ font-weight:bold; color:purple;
+ }
+.Properties {
+ text-align:right;
+ }
View
BIN  buildconfig/images/abstract.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/checkstylelogo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/class.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/inner.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/innerCycleLink.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/innerabstract.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/innerclass.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/innerinterface.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/interface.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/link.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/mix.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/mixedCycleLink.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/package.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  buildconfig/images/pmd_logo_small.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
88 buildconfig/xsls/andcooper.checkstyle.xsl
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- All modificatiosn to original
+ Checkstyle.xsl are Copyright (c) 2009, Fred Grott, ASFv2 License
+ where applicable.
+
+
+
+
+-->
+<!DOCTYPE checkstyle [
+ <!-- ====================================================================
+ Mapping of images onto files
+ ==================================================================== -->
+ <!ENTITY logoImg "images/checkstylelogo.png">
+ <!ENTITY companylogoImg "images/companylogo.png">
+ <!ENTITY linkImg "images/link.png">
+
+]>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output method="html"
+ indent="yes" />
+<xsl:param name="project" select="files"/>
+<xsl:param name="today" select="today"/>
+<xsl:param name="context-root" select="context-root"/>
+<xsl:param name="source-root" select="source-root"/>
+
+<xsl:template match="/checkstyle">
+ <html>
+ <head>
+ <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"/>
+ <title>Checkstyle Results for <xsl:value-of select="$project"/></title>
+ <link rel="stylesheet" type="text/css" href="andcooper.reports.css"/>
+ </head>
+ <body>
+ <h1><img src="&companylogoImg;"/></h1>
+ <h1><img src="&logoImg;"/>Checkstyle Audit of <xsl:value-of select="$project"/> source code</h1>
+ <p align="right">Run with <a href="http://checkstyle.sourceforge.net">Checkstyle <xsl:value-of select="//checkstyle/@version"/></a> via <a href="http://ant.apache.org">Apache ANT <xsl:value-of select="//ant/@version"/></a> on <xsl:value-of select="$today"/></p>
+ <hr size="2"/>
+ <table class="summary">
+ <tr>
+ <th>Files</th>
+ <th>Items Found</th>
+ </tr>
+ <tr>
+ <td><xsl:value-of select="count(//file)"/></td>
+ <td><xsl:value-of select="count(//error)" /></td>
+ </tr>
+ </table>
+ <hr size="2" />
+ <xsl:apply-templates/>
+ <hr size="2"/>
+ <h3>Explanations</h3>
+ Checkstyle reports on coding style warnings with the following levels of error, warning, and info.
+ </body>
+ </html>
+</xsl:template>
+
+<xsl:template name="severityDiv">
+<xsl:if test="@severity = 'error'">p1</xsl:if>
+<xsl:if test="@severity = 'warning'">p2</xsl:if>
+<xsl:if test="@severity = 'info'">p3</xsl:if>
+</xsl:template>
+
+<xsl:template match="//file[error]">
+ <xsl:variable name="filename" select="@name"/>
+ <xsl:variable name="translated-path" select="translate(@name, '\', '/')"/>
+ <xsl:variable name="translated-source-root" select="translate($source-root, '\', '/')"/>
+ <xsl:variable name="linkpath" select="substring-after($translated-path, $translated-source-root)"/>
+ <xsl:variable name="class-name" select="translate($linkpath, '/', '.')"/>
+ <table class="details">
+ <tr>
+ <th colspan="4">
+ <xsl:value-of select="$linkpath"/></th>
+ </tr>
+ <xsl:for-each select="error">
+ <tr>
+ <td style="padding: 3px" align="right"><div><xsl:attribute name="class"><xsl:call-template name="severityDiv"/></xsl:attribute><xsl:value-of disable-output-escaping="yes" select="@severity"/></div></td>
+ <xsl:variable name="lineNum" select="@line"/>
+ <td><a href="{$context-root}/{$linkpath}.html#{$lineNum}">Line <xsl:value-of select="@line"/></a></td>
+ <td><xsl:value-of select="."/></td>
+ <td><xsl:value-of select="@message"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <p/>
+</xsl:template>
+
+</xsl:stylesheet>
View
795 buildconfig/xsls/andcooper.classycle.xsl
@@ -0,0 +1,795 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Modifications to original reportXMLtoHTML.xsl
+ for classycle Copyright 2009 Fred Grott
+ ASFv2 License where applicale.
+-->
+<!--
+ Copyright (c) 2003-2008, Franz-Josef Elmer, All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ - Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.