Copy link to clipboard
Copied
I'm trying to generate documentation, and inject it into a SWC, for a library I have written. Problem is that every time I try to run asdoc, it tells me a class found within core files isn't found. First it began as just mobile classes not being found, so I manually added the mobilecomponents.swc manually. Then it was File not being found, so I added the AIR swcs manually. Now, it is core Flash files like Stage and URLRequest that aren't being found.
Output Example:
[asdoc] Loading configuration file /Applications/Adobe Flash Builder 4.7/sdks/4.11 AIR 3.9/frameworks/flex-config.xml
[asdoc] /Users/jjanusch/dev/workspaces/AIR/library/src/com/vuria/utils/DeviceInfo.as(73): col: 15 Error: Access of possibly undefined property orientation through a reference with static type flash.display:Stage.
[asdoc]
[asdoc] if ( stage.orientation == StageOrientation.DEFAULT || stage.orientation == StageOrientation.UPSIDE_DOWN ) {
[asdoc] ^
[asdoc]
[asdoc] /Users/jjanusch/dev/workspaces/AIR/library/src/com/vuria/ui/views/PanelViewBase.as(41): col: 37 Error: The definition of base class View was not found.
[asdoc]
[asdoc] public class PanelViewBase extends View
[asdoc] ^
[asdoc]
[asdoc] /Users/jjanusch/dev/workspaces/AIR/library/src/com/vuria/services/download/ProgressDownloader.as(155): col: 17 Error: Access of possibly undefined property idleTimeout through a reference with static type flash.net:URLRequest.
[asdoc]
[asdoc] this.request.idleTimeout = IDLE_TIMEOUT;
[asdoc] ^
[asdoc]
BUILD FAILED
/Users/jjanusch/dev/workspaces/AIR/library/build/build.xml:9: asdoc task failed
Here is the ANT task I am using (it is a little convoluted from how many different things I am trying right now):
<?xml version="1.0" encoding="utf-8"?>
<project name="ASDoc Builder" basedir=".">
<property name="FLEX_HOME" value="/Applications/Adobe Flash Builder 4.7/sdks/4.11 AIR 3.9"/>
<property name="FLEX_LIB" value="${FLEX_HOME}/frameworks"/>
<property name="PROJECT_DIR" value="/Users/jjanusch/dev/workspaces/AIR/library"/>
<property name="OUTPUT_DIR" value="${PROJECT_DIR}/documentation"/>
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
<target name="doc">
<asdoc output="${OUTPUT_DIR}" lenient="true" failonerror="true">
<arg line="-load-config+=${FLEX_HOME}/frameworks/air-config.xml" />
<arg line="-load-config+=${FLEX_HOME}/frameworks/flex-config.xml" />
<arg line="-load-config+=${FLEX_HOME}/frameworks/airmobile-config.xml" />
<external-library-path dir="${PROJECT_DIR}/libs/">
<include name="*.swc" />
</external-library-path>
<external-library-path dir="${FLEX_LIB}/libs/">
<include name="*.swc" />
</external-library-path>
<external-library-path dir="${FLEX_LIB}/libs/air/">
<include name="*.swc" />
</external-library-path>
<external-library-path dir="${FLEX_LIB}/libs/mobile/">
<include name="*.swc" />
</external-library-path>
<external-library-path dir="${FLEX_LIB}/libs/mx/">
<include name="*.swc" />
</external-library-path>
<compiler.source-path
path-element="${FLEX_HOME}/frameworks/projects/spark/src"/>
<compiler.source-path
path-element="${FLEX_HOME}/frameworks/projects/mobilecomponents/src"/>
<compiler.source-path
path-element="${FLEX_HOME}/frameworks/projects/advancedgrids/src"/>
<compiler.source-path
path-element="${FLEX_HOME}/frameworks/projects/air/Core/src"/>
<compiler.source-path
path-element="${FLEX_HOME}/frameworks/projects/apache/src"/>
<compiler.source-path
path-element="${FLEX_HOME}/frameworks/projects/airframework/src"/>
<compiler.source-path
path-element="${FLEX_HOME}/frameworks/projects/airspark/src"/>
<compiler.source-path
path-element="${FLEX_HOME}/frameworks/projects/core/src"/>
<compiler.source-path
path-element="${FLEX_HOME}/frameworks/projects/mx/src"/>
<doc-sources
path-element="${PROJECT_DIR}/src"/>
</asdoc>
</target>
<target name="clean">
<delete includeEmptyDirs="true">
<fileset dir="${OUTPUT_DIR}" includes="**/*"/>
</delete>
</target>
</project>
I have also tried bash scripting:
#!/bin/bash
asdoc="/Applications/Adobe Flash Builder 4.7/sdks/4.11 AIR 3.9/bin/asdoc"
docSource="/Users/jjanusch/dev/workspaces/AIR/library/src"
docOut="/Users/jjanusch/dev/workspaces/AIR/library/documentation"
spark="/Applications/Adobe Flash Builder 4.7/sdks/4.11 AIR 3.9/frameworks/projects/spark/src"
mobile="/Applications/Adobe Flash Builder 4.7/sdks/4.11 AIR 3.9/frameworks/projects/framework/src"
mx="/Applications/Adobe Flash Builder 4.7/sdks/4.11 AIR 3.9/frameworks/projects/mx/src"
framework="/Applications/Adobe Flash Builder 4.7/sdks/4.11 AIR 3.9/frameworks/projects/framework/src"
libraryPath="/Applications/Adobe Flash Builder 4.7/sdks/4.11 AIR 3.9/frameworks/libs"
packageDescriptions="/Users/jjanusch/dev/workspaces/AIR/library/asdocs-package-descriptions.xml"
docsTitle="VURIA AS3 Library Documentation"
windowTitle="VURIA AS3 Library Documentation"
libs="/Users/jjanusch/dev/workspaces/AIR/library/libs"
"$asdoc" \
-doc-sources "$docSource" \
-output "$docOut" \
-lenient \
-compiler.library-path "$libraryPath" \
-package-description-file "$packageDescriptions" \
-library-path+="$libs" \
-main-title "$docsTitle" \
-window-title "$windowTitle" \
-keep-xml=true \
-skip-xsl=true \
Every thing I attempt has the exact same error, only with different classes not being found. I'm at a point now where I have no idea what else to attempt. Any help would be greatly appreciated.
Using the AIR 3.9 SDK (latest release from this week) along with Flex 4.11. I've also tried every AIR and Flex release since 3.6 and 4.6.0. Additionally, ASDocr fails with the exact same errors.
For what it is worth, the task at the bottom of this page to generate docs for Spark works just fine. http://help.adobe.com/en_US/flex/using/WSda78ed3a750d6b8f4ce729f5121efe6ca1b-8000.html
Find more inspiration, events, and resources on the new Adobe Community
Explore Now