Commits

Fred Grott  committed 0e67442

first commit IVY dependency resolve/retrieve working

  • Participants

Comments (0)

Files changed (167)

+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="gen"/>
+	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+	<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+	<classpathentry kind="output" path="bin/classes"/>
+</classpath>
+bin/*
+gen/*
+local.properties
+ext-libs/*
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>GWSGantDroid</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

File .settings/org.eclipse.jdt.core.prefs

+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5

File AndroidManifest.xml

+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="org.bitbucket.fredgrott.gwsgantdroid"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="11"
+        android:targetSdkVersion="15" />
+
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name=".MainActivity"
+            android:label="@string/title_activity_main" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>

File android.eclipse.checkstyle.xml

+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+
+
+<!--
+    Checkstyle-Configuration: Android checkstyle by Enea
+    Description: none
+-->
+<module name="Checker">
+  <property name="severity" value="warning"></property>
+  <module name="TreeWalker">
+    <property name="tabWidth" value="4"></property>
+    <module name="JavadocMethod">
+      <property name="logLoadErrors" value="true"></property>
+      <property name="suppressLoadErrors" value="true"></property>
+    </module>
+    <module name="JavadocType"></module>
+    <module name="JavadocVariable"></module>
+    <module name="JavadocStyle"></module>
+    <module name="ConstantName"></module>
+    <module name="LocalFinalVariableName"></module>
+    <module name="LocalVariableName"></module>
+    <module name="MemberName">
+      <metadata name="net.sf.eclipsecs.core.comment" value="only public starts without m"></metadata>
+      <property name="applyToProtected" value="false"></property>
+      <property name="applyToPrivate" value="false"></property>
+    </module>
+    <module name="MethodName"></module>
+    <module name="PackageName"></module>
+    <module name="ParameterName"></module>
+    <module name="StaticVariableName">
+      <metadata name="net.sf.eclipsecs.core.comment" value="starts with 's'"></metadata>
+      <property name="format" value="^[s][a-zA-Z0-9]*$"></property>
+    </module>
+    <module name="TypeName"></module>
+    <module name="AvoidStarImport"></module>
+    <module name="IllegalImport"></module>
+    <module name="RedundantImport"></module>
+    <module name="UnusedImports"></module>
+    <module name="LineLength">
+      <property name="severity" value="ignore"></property>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"></metadata>
+    </module>
+    <module name="MethodLength"></module>
+    <module name="ParameterNumber"></module>
+    <module name="EmptyForIteratorPad"></module>
+    <module name="MethodParamPad"></module>
+    <module name="NoWhitespaceAfter">
+      <property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"></property>
+    </module>
+    <module name="NoWhitespaceBefore"></module>
+    <module name="OperatorWrap"></module>
+    <module name="ParenPad"></module>
+    <module name="TypecastParenPad"></module>
+    <module name="WhitespaceAfter"></module>
+    <module name="WhitespaceAround"></module>
+    <module name="ModifierOrder"></module>
+    <module name="RedundantModifier"></module>
+    <module name="AvoidNestedBlocks"></module>
+    <module name="EmptyBlock"></module>
+    <module name="LeftCurly"></module>
+    <module name="NeedBraces"></module>
+    <module name="RightCurly"></module>
+    <module name="AvoidInlineConditionals"></module>
+    <module name="DoubleCheckedLocking"></module>
+    <module name="EmptyStatement"></module>
+    <module name="EqualsHashCode"></module>
+    <module name="HiddenField"></module>
+    <module name="IllegalInstantiation"></module>
+    <module name="InnerAssignment"></module>
+    <module name="MagicNumber"></module>
+    <module name="MissingSwitchDefault"></module>
+    <module name="RedundantThrows">
+      <property name="logLoadErrors" value="true"></property>
+      <property name="suppressLoadErrors" value="true"></property>
+    </module>
+    <module name="SimplifyBooleanExpression"></module>
+    <module name="SimplifyBooleanReturn"></module>
+    <module name="DesignForExtension">
+      <property name="severity" value="ignore"></property>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"></metadata>
+    </module>
+    <module name="FinalClass"></module>
+    <module name="HideUtilityClassConstructor"></module>
+    <module name="InterfaceIsType"></module>
+    <module name="VisibilityModifier"></module>
+    <module name="ArrayTypeStyle"></module>
+    <module name="FinalParameters">
+      <property name="severity" value="ignore"></property>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"></metadata>
+    </module>
+    <module name="TodoComment">
+      <property name="severity" value="ignore"></property>
+      <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"></metadata>
+    </module>
+    <module name="UpperEll"></module>
+    <module name="MethodLength">
+      <property name="max" value="190"></property>
+    </module>
+    <module name="MemberName">
+      <metadata name="net.sf.eclipsecs.core.comment" value="non public members should start with m"></metadata>
+      <property name="applyToPublic" value="false"></property>
+      <property name="format" value="^[m][a-zA-Z0-9]*$"></property>
+    </module>
+    <module name="LineLength">
+      <property name="max" value="300"></property>
+    </module>
+  </module>
+  <module name="JavadocPackage"></module>
+  <module name="NewlineAtEndOfFile">
+    <property name="severity" value="ignore"></property>
+    <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"></metadata>
+  </module>
+  <module name="Translation"></module>
+  <module name="FileTabCharacter">
+    <property name="severity" value="ignore"></property>
+    <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"></metadata>
+  </module>
+  <module name="RegexpSingleline">
+    <property name="severity" value="ignore"></property>
+    <property name="format" value="\s+$"></property>
+    <property name="message" value="Line has trailing spaces."></property>
+    <metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"></metadata>
+  </module>
+</module>

File android.pmd.ruleset.xml

+<?xml version="1.0"?>
+<ruleset name="Android Application Rules"
+    xmlns="http://pmd.sf.net/ruleset/1.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
+    xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
+
+<description>Ruleset for Android application, its helpful to put the classes on the auxclasspath of the ant task</description>
+
+  <exclude-pattern>.*/R.java</exclude-pattern>
+  <exclude-pattern>.*/gen/.*</exclude-pattern>
+
+  <rule ref="rulesets/android.xml"/>
+
+   <rule name="CallSuperFirst"
+      since="4.2.5" language="java"
+      message="super should be called at the start of the method"
+      class="net.sourceforge.pmd.rules.XPathRule"
+      externalInfoUrl="http://pmd.sourceforge.net/rules/java/android.html#CallSuperFirst">
+    <description>Super should be called at the start of the method</description>
+    <priority>3</priority>
+    <properties>
+      <property name="xpath">
+        <value><![CDATA[
+//MethodDeclaration[MethodDeclarator[
+  @Image='onCreate' or
+  @Image='onConfigurationChanged' or
+  @Image='onPostCreate' or
+  @Image='onPostResume' or
+  @Image='onRestart' or
+  @Image='onRestoreInstanceState' or
+  @Image='onResume' or
+  @Image='onStart'
+  ]]
+    /Block[not(
+      (BlockStatement[1]/Statement/StatementExpression/PrimaryExpression/PrimaryPrefix[@Image= ancestor::MethodDeclaration/MethodDeclarator/@Image]))]
+[ancestor::ClassOrInterfaceDeclaration[//ClassOrInterfaceType[
+  typeof(@Image, 'android.app.Activity', 'Activity') or
+  typeof(@Image, 'android.app.Application', 'Application') or
+  typeof(@Image, 'android.app.Service', 'Service')
+]]]
+]]>
+        </value>
+      </property>
+    </properties>
+    <example><![CDATA[
+public class DummyActivity extends Activity {
+    public void onCreate(Bundle bundle) {
+     // missing call to super.onCreate(bundle)
+        foo();
+    }
+}
+]]>
+    </example>
+  </rule>
+
+  <rule name="CallSuperLast"
+      since="4.2.5" language="java"
+      message="super should be called at the end of the method"
+      class="net.sourceforge.pmd.rules.XPathRule"
+      externalInfoUrl="http://pmd.sourceforge.net/rules/java/android.html#CallSuperLast">
+    <description>Super should be called at the end of the method</description>
+    <priority>3</priority>
+    <properties>
+      <property name="xpath">
+        <value>
+          <![CDATA[
+//MethodDeclaration[MethodDeclarator[
+  @Image='finish' or
+  @Image='onDestroy' or
+  @Image='onPause' or
+  @Image='onSaveInstanceState' or
+  @Image='onStop' or
+  @Image='onTerminate'
+  ]]
+   /Block/BlockStatement[last()]
+    [not(Statement/StatementExpression/PrimaryExpression/PrimaryPrefix[@Image= ancestor::MethodDeclaration/MethodDeclarator/@Image])]
+[ancestor::ClassOrInterfaceDeclaration[//ClassOrInterfaceType[
+  typeof(@Image, 'android.app.Activity', 'Activity') or
+  typeof(@Image, 'android.app.Application', 'Application') or
+  typeof(@Image, 'android.app.Service', 'Service')
+]]]
+]]>
+        </value>
+      </property>
+    </properties>
+    <example>
+      <![CDATA[
+public class DummyActivity extends Activity {
+    public void onPause() {
+        foo();
+        // missing call to super.onPause()
+    }
+}
+]]>
+    </example>
+  </rule>
+
+  <rule name="DoNotHardCodeSDCard"
+      since="4.2.6" language="java"
+      message="Do not hardcode /sdcard."
+      class="net.sourceforge.pmd.rules.XPathRule"
+      externalInfoUrl="http://pmd.sourceforge.net/rules/java/android.html#DoNotHardCodeSDCard">
+    <description>Use Environment.getExternalStorageDirectory() instead of "/sdcard"</description>
+    <priority>3</priority>
+    <properties>
+      <property name="xpath">
+        <value>//Literal[starts-with(@Image,'"/sdcard')]</value>
+      </property>
+    </properties>
+    <example>
+      <![CDATA[
+public class MyActivity extends Activity {
+    protected void foo() {
+        String storageLocation = "/sdcard/mypackage";   // hard-coded, poor approach
+
+        storageLocation = Environment.getExternalStorageDirectory() + "/mypackage"; // preferred approach
+    }
+}
+]]>
+    </example>
+  </rule>
+
+
+  <rule ref="rulesets/clone.xml"/>
+  <rule ref="rulesets/finalizers.xml"/>
+  <rule ref="rulesets/imports.xml"/>
+  <rule ref="rulesets/logging-java.xml"/>
+  <rule ref="rulesets/naming.xml">
+    <exclude name="AbstractNaming"/>
+    <exclude name="LongVariable"/>
+    <exclude name="LongMethodName"/>
+    <exclude name="ShortMethodName"/>
+    <exclude name="ShortVariable"/>
+    <exclude name="VariableNamingConventions"/>
+  </rule>
+
+</ruleset>

File ant.properties

+source.dir=src
+out.dir=bin/classes
+company.url=http\://shareme.github.com
+company.name=GrottWorkShop
+copyright.years=2012-Whenever
+masterbranch.projecturl=https\://masterbranch.com/shareme
+apilevel.top=16
+apilevel.bottom=10
+androidsite.url=http\://android.com
+androidsite.name=android.com
+projectrepo.url=https\://bitbucket.org/fredgrott/gwsgantdroid
+/*
+   Gant Build System for Android Application development
+   Author: Fred Grott
+   License: Apache License 2.0
+   Version: 0.1
+   Date: August 13, 2012
+*/
+// build.template stuff
+ant.property(name: 'ant.project.name', value: 'GWSGantDroid')
+ant.property(name: 'ant.project.org', value: 'org.bitbucket.fredgrott')
+import org.codehaus.gant.GantState
+
+// We use the Gant State or "-d" flag
+// to switch debugging on in our build.
+// This closure allows us to query that property
+isDebug = { ->
+ if (GantState.verbosity == GantState.DEBUG) {
+   return true
+ }
+}
+
+if (isDebug()) {
+  ant.echoproperties()
+}
+
+
+
+ant.mkdir(dir: 'ext-libs')
+ant.mkdir(dir: 'bin/ivyresolvereports')
+
+
+ant.property(name: 'codeqaImagesDir', location:'buildsys/codeqa/images')
+ant.property(name:'codeqaXslsdir', location:'buildsys/codeqa/xsls')
+ant.property(name:'codeqaReportscssDir', location:'buildsys/codeqa/reportscss')
+ant.property(name:'doclavaAssetsDir', location:'buildsys/doclavaassets/gwsassets/templates/assets')
+ant.property(name:'doclavalHtmlDir', location:'buildsys/doclavaassets/htmldir')
+ant.property(name:'doclavaGWSAssetsHtmlDir', location:'buildsys/doclavaassets/gwsassets/html')
+ant.property(name:'doclavaGWSAssetsTemplatesDir', location:'buildsys/doclavaassets/gwsassets/templates')
+ant.property(name:'doclavaGWSAssetsTemplatesComponentsDir', location:'buildsys/doclavaassets/gwsassets/templates/components')
+
+ /*
+  * We have two main repo artifact groups:
+  * 
+  *          Jars that can be loaded as configurations but in the IDE build need to be 
+  *          in a project local gitignored folder and codeqa/doclet assets that at times/home/fredgrott/git/BITBUCKET/SarahID/android.eclipse.checkstyle.xml
+/home/fredgrott/git/BITBUCKET/SarahID/android.pmd.ruleset.xml
+  *          get edited and need to be placed in a non-gitignored local project folder.
+  *          
+  *  At this time due to the use of ant task libs, etc it seems the best option is to use 
+  *  the IVY ant task lib retrieve task and gitignore the proper folders containing the libs 
+  *  as opposed to using Grape/Grab.
+  */
+
+
+includeTool << gant.tools.Ivy
+
+ivy.resolve(file: 'ivy.xml')
+ivy.report(todir:'bin/ivyresolvereports', dot:'true')
+//okay it finally works, yeah
+ivy.retrieve(pattern:'ext-libs/[conf]/[artifact].[ext]' , conf:'ant, compile, doclet, aptfactory, javadoc')
+
+
+/*
+ * 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.
+ */
+ant.property(file: 'local.properties')
+
+/*
+ * The ant.properties file can be created by you. It is only edited by the
+         'android' tool to add properties to it.
+         This is the place to change some Ant specific build properties.
+         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'.
+
+         For other overridable properties, look at the beginning of the rules
+         files in the SDK, at tools/ant/build.xml
+
+         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.
+ */
+
+ant.property(file: 'ant.properties')
+
+/*
+ * if sdk.dir was not set from one of the property file, then
+         get it from the ANDROID_HOME env var.
+         This must be done before we load project.properties since
+         the proguard config can use sdk.dir
+ */
+ant.property(environment: 'env')
+ant.condition(property: 'sdk.dir', value: '${env.ANDROID_HOME}'){
+    ant.isset(property:'env.ANDROID_HOME')
+}
+
+/*
+ * The project.properties file is created and updated by the 'android'
+         tool, as well as ADT.
+
+         This contains project specific properties such as project target, and library
+         dependencies. Lower level build properties are stored in ant.properties
+         (or in .classpath for Eclipse projects).
+
+         This file is an integral part of the build system for your
+         application and should be checked into Version Control Systems.
+ */
+ant.loadproperties(srcFile:'project.properties')
+
+/*
+ * quick check on sdk.dir
+ */
+ant.fail(message:'sdk.dir is missing. Make sure to generate local.properties using "android update project" or to inject it through the ANDROID_HOME environment variable.', unless:'sdk.dir')
+
+/*
+ * Import per project custom build rules if present at the root of the project.
+        This is the place to put custom intermediary targets such as:
+            -pre-build
+            -pre-compile
+            -post-compile (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})
+            -post-package
+            -post-build
+            -pre-clean
+            
+            CUSTOM RULES GO HERE
+ */
+
+
+
+
+
+
+
+
+
+// build.xml modified from sdk gets pasted here:
+

File buildsys/codeqa/images/abstract.png

Added
New image

File buildsys/codeqa/images/arrow_down.gif

Added
New image

File buildsys/codeqa/images/arrow_up.gif

Added
New image

File buildsys/codeqa/images/checkstylelogo.png

Added
New image

File buildsys/codeqa/images/class.png

Added
New image

File buildsys/codeqa/images/classyclelogo.png

Added
New image

File buildsys/codeqa/images/close.gif

Added
New image

File buildsys/codeqa/images/collapsed.gif

Added
New image

File buildsys/codeqa/images/expanded.gif

Added
New image

File buildsys/codeqa/images/external.png

Added
New image

File buildsys/codeqa/images/icon_error_sml.gif

Added
New image

File buildsys/codeqa/images/icon_info_sml.gif

Added
New image

File buildsys/codeqa/images/icon_success_sml.gif

Added
New image

File buildsys/codeqa/images/icon_warning_sml.gif

Added
New image

File buildsys/codeqa/images/inner.png

Added
New image

File buildsys/codeqa/images/innerCycleLink.png

Added
New image

File buildsys/codeqa/images/innerabstract.png

Added
New image

File buildsys/codeqa/images/innerclass.png

Added
New image

File buildsys/codeqa/images/innerinterface.png

Added
New image

File buildsys/codeqa/images/interface.png

Added
New image

File buildsys/codeqa/images/javancsslogo.png

Added
New image

File buildsys/codeqa/images/jdependlogo.png

Added
New image

File buildsys/codeqa/images/link.png

Added
New image

File buildsys/codeqa/images/mix.png

Added
New image

File buildsys/codeqa/images/mixedCycleLink.png

Added
New image

File buildsys/codeqa/images/package.png

Added
New image

File buildsys/codeqa/images/pmdlogo.png

Added
New image

File buildsys/codeqa/reportscss/reports.css

+
+
+
+body {
+  font-size: 98%;
+  
+}
+ 
+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;
+ }

File buildsys/codeqa/xsls/android.checkstyle.xsl

+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- All modifications to original
+     Checkstyle.xsl are Copyright (c) 2012, Fred Grott, ASFv2 License
+     where applicable.
+
+
+
+
+-->
+<!DOCTYPE checkstyle [
+  <!-- ====================================================================
+       Mapping of images onto files
+       ==================================================================== -->
+  
+  <!ENTITY linkImg            "./assets/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="./reports.css"/>
+    </head>
+    <body>
+    <h1>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>

File buildsys/codeqa/xsls/android.classycle.xsl

+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    Modifications to original reportXMLtoHTML.xsl
+    for classycle Copyright 2012 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.
+   - Redistributions in binary form must reproduce the above copyright notice,
+     this list of conditions and the following disclaimer in the documentation
+     and/or other materials provided with the distribution.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+   TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<!DOCTYPE classycle [
+  <!-- ====================================================================
+       Mapping of images onto files
+       ==================================================================== -->
+  
+  <!ENTITY linkImg            "./assets/images/link.png">
+  <!ENTITY mixedCycleLinkImg       "./assets/images/mixedCycleLink.png">
+  <!ENTITY innerCycleLinkImg       "./assets/images/innerCycleLink.png">
+  <!ENTITY mixImg             "./assets/images/mix.png">
+  <!ENTITY packageImg         "./assets/images/package.png">
+  <!ENTITY innerImg           "./assets/images/inner.png">
+  <!ENTITY classImg           "./assets/ages/class.png">
+  <!ENTITY abstractImg        "./assets/images/abstract.png">
+  <!ENTITY interfaceImg       "./assets/images/interface.png">
+  <!ENTITY innerclassImg      "./assets/images/innerclass.png">
+  <!ENTITY innerabstractImg   "./assets/images/innerabstract.png">
+  <!ENTITY innerinterfaceImg  "./assets/images/innerinterface.png">
+]>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+  <xsl:strip-space elements="*"/>
+  
+  <xsl:param name="project" select="files"/>
+
+  <!-- ====================================================================
+       Definition of an explanation text appearing several times on the
+       page.
+       ==================================================================== -->
+  <xsl:variable name="infoLine">
+    Click on <img src="&linkImg;"/> behind a number and a window will pop up showing more details.
+  </xsl:variable>
+
+  <!-- ====================================================================
+       Calculates the number of cycles.
+       ==================================================================== -->
+  <xsl:variable name="numberOfCycles" select="count(/classycle/cycles/cycle)"/>
+
+  <!-- ====================================================================
+       Calculates the number of layers.
+       ==================================================================== -->
+  <xsl:variable name="numberOfLayers">
+    <xsl:for-each select="/classycle/classes/class">
+      <xsl:sort select="@layer" data-type="number"/>
+      <xsl:if test="position()=last()">
+        <xsl:value-of select="./@layer + 1"/>
+      </xsl:if>
+    </xsl:for-each>
+  </xsl:variable>
+
+  <!-- ====================================================================
+       Calculates the number of classes.
+       ==================================================================== -->
+  <xsl:variable name="numberOfClasses" select="count(/classycle/classes/class)"/>
+
+  <!-- ====================================================================
+       Calculates the number of package cycles.
+       ==================================================================== -->
+  <xsl:variable name="numberOfPackageCycles" select="count(/classycle/packageCycles/packageCycle)"/>
+
+  <!-- ====================================================================
+       Calculates the number of packages.
+       ==================================================================== -->
+  <xsl:variable name="numberOfPackages" select="count(/classycle/packages/package)"/>
+
+  <!-- ====================================================================
+       Matches root element <classycle>. Creates HTML page with headers,
+       style sheets, JavaScript, and title.
+       ==================================================================== -->
+  <xsl:template match="classycle">
+    <html>
+      <head>
+        <title>Classycle Analysis of <xsl:value-of select="$project"/>
+        </title>
+        <link rel="stylesheet" type="text/css" href="./reports.css"/>
+        <script type="text/javascript"><![CDATA[
+        <!--
+          var number = /^\d*$/;
+
+          function showTable(title, headers, content) {
+            text = "<h3>" + title + "</h3><p>";
+            if (content.length > 0) {
+              text += "<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\">";
+              if (headers.length > 0) {
+                text += "<tr>";
+                headerArray = headers.split(",");
+                for (i = 0; i < headerArray.length; i++) {
+                  text += "<th>" + headerArray[i] + "</th>";
+                }
+                text += "</tr>";
+              }
+              rows = content.split(";");
+              for (i = 0; i < rows.length; i++) {
+                if (rows[i].length > 0) {
+                  columns = rows[i].split(",");
+                  text += "<tr>";
+                  for (j = 0; j < columns.length; j++) {
+                    text += "<td" + (number.test(columns[j]) ? " align=\"right\">" : ">") + columns[j] + "</td>";
+                  }
+                  text += "</tr>";
+                }
+              }
+              text += "</table>";
+            }
+            showText(text);
+          }
+
+          function showText(text) {
+            list = window.open("", "list",
+                "dependent=yes,location=no,menubar=yes,resizable=yes,toolbar=no,scrollbars=yes,width=500,height=400");
+            list.document.close();
+            list.document.open();
+            list.document.write("<html><head><style type=\"text/css\">");
+            list.document.write("body { font-family:Helvetica,Arial,sans-serif; } ");
+            list.document.write(".link { cursor:pointer;text-decoration:underline; } ");
+            list.document.writeln("th { background-color:#aaaaaa; } </style></head><body>");
+            list.document.writeln(text);
+            list.document.writeln("</body></html>");
+            list.document.close();
+            list.focus();
+          }
+        //-->
+        ]]>
+        </script>
+      </head>
+      <body>
+      
+        <h1>Classycle
+            Analysis of <xsl:value-of select="$project"/></h1>
+        Date: <xsl:value-of select="/classycle/@date"/>
+        <hr size="2"/>
+        <xsl:call-template name="createSummary"/>
+        <hr size="2"/>
+        <xsl:if test="$numberOfClasses > 0">
+          <xsl:call-template name="createCyclesSection"/>
+        </xsl:if>
+        <hr size="2"/>
+        <xsl:call-template name="createPackageCyclesSection"/>
+        <xsl:if test="$numberOfClasses > 0">
+          <xsl:call-template name="createLayersTable"/>
+        </xsl:if>
+        <hr size="2"/>
+        <xsl:call-template name="createClassesAndPackagesSection"/>
+      </body>
+    </html>
+  </xsl:template>
+
+  <!-- ====================================================================
+       Subroutine which creates a short summary.
+       ==================================================================== -->
+  <xsl:template name="createSummary">
+    <h2>Summary</h2>
+    <table border="0" cellpadding="0" cellspacing="0">
+      <xsl:if test="$numberOfClasses > 0">
+        <tr>
+          <td align="right">
+            <xsl:choose>
+              <xsl:when test="$numberOfCycles = 0">no</xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="$numberOfCycles"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </td>
+          <td width="5"/>
+          <td>
+            <xsl:choose>
+              <xsl:when test="$numberOfCycles = 0">class cycles</xsl:when>
+              <xsl:when test="$numberOfCycles = 1">
+                <a href="#cycles">class cycle</a>
+              </xsl:when>
+              <xsl:otherwise>
+                <a href="#cycles">class cycles</a>
+              </xsl:otherwise>
+            </xsl:choose>
+          </td>
+        </tr>
+        <tr><td align="right"><xsl:copy-of select="$numberOfLayers"/></td>
+            <td width="5"/><td><a href="#layers">class layers</a></td>
+        </tr>
+        <tr><td align="right"><xsl:value-of select="$numberOfClasses"/></td>
+            <td width="5"/>
+            <td><a href="#classes">classes</a> (using
+              <xsl:value-of select="/classycle/classes/@numberOfExternalClasses"/>
+              external classes) grouped in <xsl:value-of select="$numberOfPackages"/> packages
+            </td>
+        </tr>
+      </xsl:if>
+      <tr>
+        <td align="right">
+          <xsl:choose>
+            <xsl:when test="$numberOfPackageCycles = 0">no</xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="$numberOfPackageCycles"/>
+            </xsl:otherwise>
+          </xsl:choose>
+        </td>
+        <td width="5"/>
+        <td>
+          <xsl:choose>
+            <xsl:when test="$numberOfPackageCycles = 0">package cycles</xsl:when>
+            <xsl:when test="$numberOfPackageCycles = 1">
+              <a href="#packageCycles">package cycle</a>
+            </xsl:when>
+            <xsl:otherwise>
+              <a href="#packageCycles">package cycles</a>
+            </xsl:otherwise>
+          </xsl:choose>
+        </td>
+      </tr>
+      <xsl:if test="$numberOfClasses = 0">
+        <tr>
+          <td align="right">
+            <xsl:choose>
+              <xsl:when test="$numberOfPackages = 0">no</xsl:when>
+              <xsl:otherwise>
+                <xsl:value-of select="$numberOfPackages"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </td>
+          <td width="5"/>
+          <td>
+            <xsl:choose>
+              <xsl:when test="$numberOfPackages = 1">
+                <a href="#packageCycles">package</a>
+              </xsl:when>
+              <xsl:otherwise>
+                <a href="#packageCycles">packages</a>
+              </xsl:otherwise>
+            </xsl:choose>
+          </td>
+        </tr>
+      </xsl:if>
+    </table>
+    <p/>
+    <xsl:if test="$numberOfClasses > 0">
+      <xsl:call-template name="createClassesSummary"/>
+    </xsl:if>
+  </xsl:template>
+
+  <!-- ====================================================================
+       Subroutine creating the summary table of class types.
+       ==================================================================== -->
+  <xsl:template name="createClassesSummary">
+    <xsl:variable name="classes" select="/classycle/classes/class"/>
+    <table border="1" cellpadding="5" cellspacing="0" width="770">
+      <tr>
+        <th>Type</th>
+        <th>Number of classes</th>
+        <th>Averaged (maximum) size in bytes</th>
+        <th>Averaged (maximum) number of usage by other classes</th>
+        <th>Averaged (maximum) number of used internal classes</th>
+        <th>Averaged (maximum) number of used external clasess</th>
+      </tr>
+      <xsl:call-template name="summary">
+        <xsl:with-param name="type">Interfaces</xsl:with-param>
+        <xsl:with-param name="set" select="$classes[@type='interface']"/>
+      </xsl:call-template>
+      <xsl:call-template name="summary">
+        <xsl:with-param name="type">Abstract classes</xsl:with-param>
+        <xsl:with-param name="set" select="$classes[@type='abstract class']"/>
+      </xsl:call-template>
+      <xsl:call-template name="summary">
+        <xsl:with-param name="type">Concrete classes</xsl:with-param>
+        <xsl:with-param name="set" select="$classes[@type='class']"/>
+      </xsl:call-template>
+    </table>
+  </xsl:template>
+
+  <!-- ====================================================================
+       Subroutine which creates the cycles table.
+       ==================================================================== -->
+  <xsl:template name="createCyclesSection">
+    <xsl:if test="$numberOfCycles &gt; 0">
+      <h2><a name="cycles">Cycles</a></h2>
+      <xsl:copy-of select="$infoLine"/>
+      <table border="1" cellpadding="5" cellspacing="0" width="770">
+        <tr>
+          <th>Name</th>
+          <th>Number of classes</th>
+          <th>Best Fragment Size</th>
+          <th>Girth</th>
+          <th>Radius</th>
+          <th>Diameter</th>
+          <th>Layer</th>
+        </tr>
+        <xsl:for-each select="/classycle/cycles/cycle">
+          <xsl:sort select="@size" data-type="number" order="descending"/>
+          <xsl:call-template name="cycle"/>
+        </xsl:for-each>
+      </table>
+    </xsl:if>
+  </xsl:template>
+
+  <!-- ====================================================================
+       Subroutine which creates the package cycles table.
+       ==================================================================== -->
+  <xsl:template name="createPackageCyclesSection">
+    <xsl:if test="$numberOfPackageCycles &gt; 0">
+      <h2><a name="packageCycles">Package Cycles</a></h2>
+      <xsl:copy-of select="$infoLine"/>
+      <table border="1" cellpadding="5" cellspacing="0" width="770">
+        <tr>
+          <th>Name</th>
+          <th>Number of packagess</th>
+          <th>Best Fragment Size</th>
+          <th>Girth</th>
+          <th>Radius</th>
+          <th>Diameter</th>
+          <th>Layer</th>
+        </tr>
+        <xsl:for-each select="/classycle/packageCycles/packageCycle">
+          <xsl:sort select="@size" data-type="number" order="descending"/>
+          <xsl:call-template name="packageCycle"/>
+        </xsl:for-each>
+      </table>
+    </xsl:if>
+  </xsl:template>
+
+  <!-- ====================================================================
+       Subroutine which creates the table with the layers statistics.
+       ==================================================================== -->
+  <xsl:template name="createLayersTable">
+    <h2><a name="layers">Layers</a></h2>
+    <xsl:variable name="dummyList" select="/classycle/classes/class[position() &lt;= $numberOfLayers]"/>
+    <xsl:copy-of select="$infoLine"/>
+    <table border="1" cellpadding="5" cellspacing="0" width="770">
+      <tr>
+        <td><b>Layer</b></td>
+        <xsl:for-each select="$dummyList">
+          <xsl:variable name="layer" select="position() - 1"/>
+          <xsl:variable name="set" select="/classycle/classes/class[@layer=$layer]"/>
+          <td align="center"><xsl:value-of select="$layer"/></td>
+        </xsl:for-each>
+      </tr>
+      <tr>
+        <td><b>Number of classes</b></td>
+        <xsl:for-each select="$dummyList">
+          <xsl:variable name="layer" select="position() - 1"/>
+          <xsl:variable name="set" select="/classycle/classes/class[@layer=$layer]"/>
+          <td align="center">
+            <xsl:call-template name="createListPopupWithLink">
+              <xsl:with-param name="set" select="$set"/>
+              <xsl:with-param name="number" select="count($set)"/>
+              <xsl:with-param name="text">Classes of layer <xsl:value-of select="$layer"/>:</xsl:with-param>
+            </xsl:call-template>
+          </td>
+        </xsl:for-each>
+      </tr>
+    </table>
+  </xsl:template>
+
+
+  <!-- ====================================================================
+       Subroutine creating the classes and packages section.
+       ==================================================================== -->
+  <xsl:template name="createClassesAndPackagesSection">
+    <h2>
+      <a name="classes">
+        <xsl:if test="$numberOfClasses > 0">Classes and </xsl:if>Packages
+      </a>
+    </h2>
+    Click on <img src="&mixedCycleLinkImg;" align="center"/> or
+    <img src="&innerCycleLinkImg;" align="center"/> to go to the cycle to
+    which the class/package belongs.
+    <br/>
+    <xsl:copy-of select="$infoLine"/>
+    <table cellpadding="3" cellspacing="0" border="1" width="770">
+      <tr>
+        <th>Class/Package</th>
+        <th>Size</th>
+        <th>Used by</th>
+        <th>Uses internal</th>
+        <th>Uses external</th>
+        <th>Layer</th>
+        <th>Source(s)</th>
+      </tr>
+      <xsl:for-each select="/classycle/classes/class|/classycle/packages/package">
+        <xsl:sort select="@name" case-order="upper-first" data-type="text"/>
+        <tr>
+          <td>
+            <nobr>
+            <xsl:call-template name="showIcon">
+                <xsl:with-param name="type" select="@type"/>
+                <xsl:with-param name="innerClass" select="@innerClass"/>
+            </xsl:call-template>
+            <xsl:element name="a">
+              <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+              <xsl:value-of select="@name"/>
+            </xsl:element>
+            <xsl:variable name="name"><xsl:value-of select="@name"/></xsl:variable>
+            <xsl:if test="string-length(@cycle) &gt; 0">
+              <a>
+                <xsl:attribute name="href">#<xsl:value-of select="translate(@cycle,' ','_')"/></xsl:attribute>
+                <xsl:attribute name="title">Member of cycle <xsl:value-of select="@cycle"/></xsl:attribute>
+                <xsl:choose>
+                  <xsl:when test="contains(@cycle, 'et al.')">
+                    <img src="&mixedCycleLinkImg;"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <img src="&innerCycleLinkImg;"/>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </a>
+            </xsl:if>
+            </nobr>
+          </td>
+          <td align="right"><xsl:value-of select="@size"/></td>
+          <xsl:if test="boolean(@type)">
+            <td align="right">
+              <xsl:call-template name="createListPopupWithLink">
+                <xsl:with-param name="set" select="classRef[@type='usedBy']"/>
+                <xsl:with-param name="number" select="count(classRef[@type='usedBy'])"/>
+                <xsl:with-param name="text">Classes using <xsl:value-of select="@name"/>:</xsl:with-param>
+              </xsl:call-template>
+            </td>
+            <td align="right">
+              <xsl:call-template name="createListPopupWithLink">
+                <xsl:with-param name="set" select="classRef[@type='usesInternal']"/>
+                <xsl:with-param name="number" select="count(classRef[@type='usesInternal'])"/>
+                <xsl:with-param name="text"><xsl:value-of select="@name"/> uses:</xsl:with-param>
+              </xsl:call-template>
+            </td>
+            <td align="right">
+              <xsl:call-template name="createListPopupWithLink">
+                <xsl:with-param name="noLink">true</xsl:with-param>
+                <xsl:with-param name="set" select="classRef[@type='usesExternal']"/>
+                <xsl:with-param name="number" select="count(classRef[@type='usesExternal'])"/>
+                <xsl:with-param name="text"><xsl:value-of select="@name"/> uses:</xsl:with-param>
+              </xsl:call-template>
+            </td>
+          </xsl:if>
+          <xsl:if test="boolean(@type) = false">
+            <td align="right">
+              <xsl:call-template name="createListPopupWithLink">
+                <xsl:with-param name="set" select="packageRef[@type='usedBy']"/>
+                <xsl:with-param name="number" select="count(packageRef[@type='usedBy'])"/>
+                <xsl:with-param name="text">Packages using <xsl:value-of select="@name"/>:</xsl:with-param>
+              </xsl:call-template>
+            </td>
+            <td align="right">
+              <xsl:call-template name="createListPopupWithLink">
+                <xsl:with-param name="set" select="packageRef[@type='usesInternal']"/>
+                <xsl:with-param name="number" select="count(packageRef[@type='usesInternal'])"/>
+                <xsl:with-param name="text"><xsl:value-of select="@name"/> uses:</xsl:with-param>
+              </xsl:call-template>
+            </td>
+            <td align="right">
+              <xsl:call-template name="createListPopupWithLink">
+                <xsl:with-param name="noLink">true</xsl:with-param>
+                <xsl:with-param name="set" select="packageRef[@type='usesExternal']"/>
+                <xsl:with-param name="number" select="count(packageRef[@type='usesExternal'])"/>
+                <xsl:with-param name="text"><xsl:value-of select="@name"/> uses:</xsl:with-param>
+              </xsl:call-template>
+            </td>
+          </xsl:if>
+          <td align="right"><xsl:value-of select="@layer"/></td>
+          <td align="left"><xsl:value-of select="@sources"/></td>
+        </tr>
+      </xsl:for-each>
+    </table>
+  </xsl:template>
+
+  <xsl:template name="showIcon">
+    <xsl:param name="type"/>
+    <xsl:param name="innerClass"/>
+    <xsl:choose>
+      <xsl:when test="$type='class' and $innerClass='true'">
+        <img src="&innerclassImg;" alt="inner class" width="20"
+             height="20" align="middle" hspace="4"/>
+      </xsl:when>
+      <xsl:when test="$type='class' and $innerClass='false'">
+        <img src="&classImg;" alt="class" width="20" height="20"
+             align="middle" hspace="4"/>
+      </xsl:when>
+      <xsl:when test="$type='abstract class' and $innerClass='true'">
+        <img src="&innerabstractImg;" alt="inner class" width="20"
+             height="20" align="middle" hspace="4"/>
+      </xsl:when>
+      <xsl:when test="$type='abstract class' and $innerClass='false'">
+        <img src="&abstractImg;" alt="class" width="20" height="20"
+            align="middle" hspace="4"/>
+      </xsl:when>
+      <xsl:when test="$type='interface' and $innerClass='true'">
+        <img src="&innerinterfaceImg;" alt="inner class" width="20"
+             height="20" align="middle" hspace="4"/>
+      </xsl:when>
+      <xsl:when test="$type='interface' and $innerClass='false'">
+        <img src="&interfaceImg;" alt="class" width="20" height="20"
+             align="middle" hspace="4"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <img src="&packageImg;" alt="package" width="20"
+             height="20" align="middle" hspace="4"/>
+      </xsl:otherwise>
+</xsl:choose>
+
+  </xsl:template>
+
+  <!-- ====================================================================
+       Matches element <cycle>. Creates a row in the cycles table with
+       JavaScript popups.
+       ==================================================================== -->
+  <xsl:template name="cycle">
+    <tr>
+      <td>
+        <a><xsl:attribute name="name"><xsl:value-of select="translate(@name,' ','_')"/></xsl:attribute></a>
+        <xsl:choose>
+          <xsl:when test="contains(@name,'et al.')">
+            <img src="&mixImg;" alt="class" width="20"
+                 height="20" align="middle" hspace="4"/>
+          </xsl:when>
+          <xsl:when test="contains(@name,'inner classes')">
+            <img src="&innerImg;" alt="inner class" width="20" height="20"
+                 align="middle" hspace="4"/>
+          </xsl:when>
+        </xsl:choose>
+        <xsl:value-of select="@name"/>
+      </td>
+      <td align="right">
+        <xsl:call-template name="classRefWithEccentricityPopup">
+          <xsl:with-param name="set" select="classes/classRef"/>
+          <xsl:with-param name="text">Classes of cycle <xsl:value-of select="@name"/>:</xsl:with-param>
+        </xsl:call-template>
+      </td>
+      <td align="right">
+        <xsl:call-template name="createListPopupWithLink">
+          <xsl:with-param name="set" select="bestFragmenters/classRef"/>
+          <xsl:with-param name="number" select="@bestFragmentSize"/>
+          <xsl:with-param name="text">Best fragmenter(s) of cycle <xsl:value-of select="@name"/>:</xsl:with-param>
+        </xsl:call-template>
+      </td>
+      <td align="right"><xsl:value-of select="@girth"/></td>
+      <td align="right">
+        <xsl:call-template name="createListPopupWithLink">
+          <xsl:with-param name="set" select="centerClasses/classRef"/>
+          <xsl:with-param name="number" select="@radius"/>
+          <xsl:with-param name="text">Center classes of cycle <xsl:value-of select="@name"/>:</xsl:with-param>
+        </xsl:call-template>
+      </td>
+      <td align="right"><xsl:value-of select="@diameter"/></td>
+      <td align="right"><xsl:value-of select="@longestWalk"/></td>
+    </tr>
+  </xsl:template>
+
+  <!-- ====================================================================
+       Matches element <packageCycle>. Creates a row in the cycles table with
+       JavaScript popups.
+       ==================================================================== -->
+  <xsl:template name="packageCycle">
+    <tr>
+      <td>
+        <a><xsl:attribute name="name"><xsl:value-of select="translate(@name,' ','_')"/></xsl:attribute></a>
+        <img src="&mixImg;" alt="package" width="20" height="20" align="middle" hspace="4"/>
+        <xsl:value-of select="@name"/>
+      </td>
+      <td align="right">
+        <xsl:call-template name="classRefWithEccentricityPopup">
+          <xsl:with-param name="set" select="packages/packageRef"/>
+          <xsl:with-param name="text">Packages of cycle <xsl:value-of select="@name"/>:</xsl:with-param>
+        </xsl:call-template>
+      </td>
+      <td align="right">
+        <xsl:call-template name="createListPopupWithLink">
+          <xsl:with-param name="set" select="bestFragmenters/packageRef"/>
+          <xsl:with-param name="number" select="@bestFragmentSize"/>
+          <xsl:with-param name="text">Best fragmenter(s) of cycle <xsl:value-of select="@name"/>:</xsl:with-param>
+        </xsl:call-template>
+      </td>
+      <td align="right"><xsl:value-of select="@girth"/></td>
+      <td align="right">
+        <xsl:call-template name="createListPopupWithLink">
+          <xsl:with-param name="set" select="centerPackages/packageRef"/>
+          <xsl:with-param name="number" select="@radius"/>
+          <xsl:with-param name="text">Center packages of cycle <xsl:value-of select="@name"/>:</xsl:with-param>
+        </xsl:call-template>
+      </td>
+      <td align="right"><xsl:value-of select="@diameter"/></td>
+      <td align="right"><xsl:value-of select="@longestWalk"/></td>
+    </tr>
+  </xsl:template>
+
+  <!-- ====================================================================
+       Subroutine which creates JavaScript popup listing the specified set
+       and the appropriated link.
+
+       parameters:
+
+       set Set of elements with attribute "name".
+       number Number show left of the link symbol.
+       text Explaining header of the popup
+
+       ==================================================================== -->
+  <xsl:template name="createListPopupWithLink">
+    <xsl:param name="set"/>
+    <xsl:param name="number"/>
+    <xsl:param name="text"/>
+    <xsl:param name="noLink"/>
+    <xsl:value-of select="$number"/>
+    <xsl:element name="a">
+      <xsl:attribute name="style">cursor:pointer;</xsl:attribute>
+      <xsl:attribute name="onClick">
+        <xsl:text>javascript:showTable(&quot;</xsl:text>
+        <xsl:value-of select="$text"/><xsl:text>&quot;,&quot;&quot;,&quot;</xsl:text>
+        <xsl:for-each select="$set">
+          <xsl:sort select="@name"/>
+          <xsl:if test="boolean($noLink)">
+            <xsl:value-of select="@name"/>
+          </xsl:if>
+          <xsl:if test="boolean($noLink) = false">
+            <xsl:call-template name="link">
+              <xsl:with-param name="name" select="@name"/>
+            </xsl:call-template>
+          </xsl:if>
+          <xsl:text>;</xsl:text>
+        </xsl:for-each>
+        <xsl:text>&quot;)</xsl:text>
+      </xsl:attribute>
+      <img src="&linkImg;" hspace="3"/>
+    </xsl:element>
+  </xsl:template>
+
+  <!-- ====================================================================
+       Subroutine which creates JavaScript popup class references with
+       eccentricities.
+
+       parameters:
+
+       set Set of elements with the attributes "name",
+           "maximumFragmentSize", and "eccentricity".
+       text Explaining header of the popup
+
+       ==================================================================== -->
+  <xsl:template name="classRefWithEccentricityPopup">
+    <xsl:param name="set"/>
+    <xsl:param name="text"/>
+    <xsl:value-of select="@size"/>
+    <xsl:element name="a">
+      <xsl:attribute name="style">cursor:pointer;</xsl:attribute>
+      <xsl:attribute name="onClick">
+        <xsl:text>javascript:showTable(&quot;</xsl:text>
+        <xsl:value-of select="$text"/>
+        <xsl:text>&quot;,&quot;Name,Maximum fragment size,Eccentricity&quot;,&quot;</xsl:text>
+        <xsl:for-each select="$set">
+          <xsl:sort select="@name"/>
+          <xsl:call-template name="link">
+            <xsl:with-param name="name" select="@name"/>
+          </xsl:call-template>
+          <xsl:text>,</xsl:text>
+          <xsl:value-of select="@maximumFragmentSize"/><xsl:text>,</xsl:text>
+          <xsl:value-of select="@eccentricity"/><xsl:text>;</xsl:text>
+        </xsl:for-each>
+        <xsl:text>&quot;)</xsl:text>
+      </xsl:attribute>
+      <img src="&linkImg;" hspace="3"/>
+    </xsl:element>
+  </xsl:template>
+
+  <!-- ====================================================================
+       Subroutine which creates a link onto the opener site.
+
+       parameter:
+
+       name of the element and link
+
+       ==================================================================== -->
+  <xsl:template name="link">
+    <xsl:param name="name"/>
+    <xsl:text>&lt;div class='link' onclick='javascript:window.opener.location.href=\"#</xsl:text>
+    <xsl:value-of select="$name"/>
+    <xsl:text>\"'&gt;</xsl:text>
+    <xsl:value-of select="$name"/>
+    <xsl:text>&lt;/div&gt;</xsl:text>
+  </xsl:template>
+
+  <!-- ====================================================================
+       Subroutine which calculates the summary for the specified subset of
+       classes and adds a row to the class summary table.
+
+       parameters:
+
+       type Text which will appear in the column "Type"
+       set Subset of <class> elements
+
+       ==================================================================== -->
+  <xsl:template name="summary">
+    <xsl:param name="type"/>
+    <xsl:param name="set"/>
+    <xsl:param name="totalNumber"/>
+    <tr>
+      <td>
+        <nobr>
+          <xsl:value-of select="round(100 * count($set) div $numberOfClasses)"/>% <xsl:value-of select="$type"/>
+        </nobr>
+      </td>
+      <td align="right"><xsl:value-of select="count($set)"/></td>
+      <td align="right">
+        <xsl:value-of select="round(sum($set/@size) div count($set))"/>
+        <xsl:variable name="maxSize">
+          <xsl:for-each select="$set">
+            <xsl:sort select="@size" data-type="number"/>
+            <xsl:if test="position()=last()">
+              <xsl:element name="a">
+                <xsl:attribute name="href">#<xsl:value-of select="./@name"/></xsl:attribute>
+                <xsl:value-of select="./@size"/>
+              </xsl:element>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:variable>
+        (<xsl:copy-of select="$maxSize"/>)
+      </td>
+      <td align="right">
+        <xsl:value-of select="round(10 * sum($set/@usedBy) div count($set)) div 10"/>
+        <xsl:variable name="maxUsedBy">
+          <xsl:for-each select="$set">
+            <xsl:sort select="@usedBy" data-type="number"/>
+            <xsl:if test="position()=last()">
+              <xsl:element name="a">
+                <xsl:attribute name="href">#<xsl:value-of select="./@name"/></xsl:attribute>
+                <xsl:value-of select="./@usedBy"/>
+              </xsl:element>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:variable>
+        (<xsl:copy-of select="$maxUsedBy"/>)
+      </td>
+      <td align="right">
+        <xsl:value-of select="round(10 * sum($set/@usesInternal) div count($set)) div 10"/>
+        <xsl:variable name="maxUsesInternal">
+          <xsl:for-each select="$set">
+            <xsl:sort select="@usesInternal" data-type="number"/>
+            <xsl:if test="position()=last()">
+              <xsl:element name="a">
+                <xsl:attribute name="href">#<xsl:value-of select="./@name"/></xsl:attribute>
+                <xsl:value-of select="./@usesInternal"/>
+              </xsl:element>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:variable>
+        (<xsl:copy-of select="$maxUsesInternal"/>)
+      </td>
+      <td align="right">
+        <xsl:value-of select="round(10 * sum($set/@usesExternal) div count($set)) div 10"/>
+        <xsl:variable name="maxUsesExternal">
+          <xsl:for-each select="$set">
+            <xsl:sort select="@usesExternal" data-type="number"/>
+            <xsl:if test="position()=last()">
+              <xsl:element name="a">
+                <xsl:attribute name="href">#<xsl:value-of select="./@name"/></xsl:attribute>
+                <xsl:value-of select="./@usesExternal"/>
+              </xsl:element>
+            </xsl:if>
+          </xsl:for-each>
+        </xsl:variable>
+        (<xsl:copy-of select="$maxUsesExternal"/>)
+      </td>
+    </tr>
+  </xsl:template>
+</xsl:stylesheet>

File buildsys/codeqa/xsls/android.jdepend.xsl

+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<xsl:output method="html" indent="yes"  encoding="US-ASCII"/>
+
+<xsl:template match="JDepend">
+    <html>
+    <head>
+        <title>JDepend Analysis</title>
+        
+    <style type="text/css">
+      body {
+        font:normal 68% verdana,arial,helvetica;
+        color:#000000;
+      }
+      table tr td, tr th {
+          font-size: 68%;
+      }
+      table.details tr th{
+        font-weight: bold;
+        text-align:left;
+        background:#a6caf0;
+      }
+      table.details tr td{
+        background:#eeeee0;
+      }
+      
+      p {
+        line-height:1.5em;
+        margin-top:0.5em; margin-bottom:1.0em;
+        margin-left:2em;
+        margin-right:2em;
+      }
+      h1 {
+        margin: 0px 0px 5px; font: 165% verdana,arial,helvetica
+      }
+      h2 {
+        margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica
+      }
+      h3 {
+        margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica
+      }
+      h4 {
+        margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
+      }
+      h5 {
+        margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
+      }
+      h6 {
+        margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica
+      }
+      .Error {
+        font-weight:bold; color:red;
+      }
+      .Failure {
+        font-weight:bold; color:purple;
+      }
+      .Properties {
+        text-align:right;
+      }
+      </style>
+        
+        
+    </head>
+    <body>
+    <!--h1>JDepend Report</h1>
+    <ul>
+    <xsl:for-each select="./Packages/Package">
+                <xsl:sort select="@name"/>
+        <li><xsl:value-of select="@name"/></li>
+    </xsl:for-each>
+    </ul-->
+    
+    <h1><a name="top">JDepend Analysis</a></h1>
+    <p align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="http://jakarta.apache.org">Ant</a>.</p>
+    <hr size="2" />
+    <img src="./jdepend.png"/>
+    <table width="100%"><tr><td>
+    <a name="NVsummary"><h2>Summary</h2></a>
+    </td><td align="right">
+    [<a href="#NVsummary">summary</a>]
+    [<a href="#NVpackages">packages</a>]
+    [<a href="#NVcycles">cycles</a>]
+    [<a href="#NVexplanations">explanations</a>]
+    </td></tr></table>
+    
+    <table width="100%" class="details">
+        <tr>
+            <th>Package</th>
+            <th>Total Classes</th>
+            <th><a href="#EXnumber">Abstract Classes</a></th>
+            <th><a href="#EXnumber">Concrete Classes</a></th>
+            <th><a href="#EXafferent">Afferent Couplings</a></th>
+            <th><a href="#EXefferent">Efferent Couplings</a></th>
+            <th><a href="#EXabstractness">Abstractness</a></th>
+            <th><a href="#EXinstability">Instability</a></th>
+            <th><a href="#EXdistance">Distance</a></th>
+            
+        </tr>
+    <xsl:for-each select="./Packages/Package">
+        <xsl:if test="count(error) = 0">
+            <tr>
+                <td align="left">
+                    <a>
+                    <xsl:attribute name="href">#PK<xsl:value-of select="@name"/>
+                    </xsl:attribute>
+                    <xsl:value-of select="@name"/>
+                    </a>
+                </td>
+                <td align="right"><xsl:value-of select="Stats/TotalClasses"/></td>
+                <td align="right"><xsl:value-of select="Stats/AbstractClasses"/></td>
+                <td align="right"><xsl:value-of select="Stats/ConcreteClasses"/></td>
+                <td align="right"><xsl:value-of select="Stats/Ca"/></td>
+                <td align="right"><xsl:value-of select="Stats/Ce"/></td>
+                <td align="right"><xsl:value-of select="Stats/A"/></td>
+                <td align="right"><xsl:value-of select="Stats/I"/></td>
+                <td align="right"><xsl:value-of select="Stats/D"/></td>
+                
+