Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 131 lines (82 sloc) 4.825 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
<!-- Flex Library Project ASDocs -->

<project name="AS3SDKCompile" default="compile" basedir=".">

    <!-- import our build properties file -->
    <property file="./build.properties"/>
<property environment="env"/>
<property name="FLEX_HOME" value="${env.SDK_HOME}"/>


    <!-- Flex Ant Tasks used to perform compc and mxml compiling more info at http://labs.adobe.com/wiki/index.php/Flex_Ant_Tasks -->
    <taskdef resource="flexTasks.tasks" classpath="${env.SDK_HOME}/ant/lib/flexTasks.jar"/>

    <target name="setup" description="perform an setup operations"/>

    <!-- Execute the ASDoc Compile wich runs 3 seperate tasks in a series -->
    <target name="compile" description="series of tasks to create docs and swc">

        <!--<antcall target="cleanDir" description="clean the docs directory"/>-->

        <!--<antcall target="asDocs" description="full build of asdocs"/>-->

        <antcall target="buildSWC" description="build the SWC file"/>

    </target>

    <target name="deploy" description="perform an deployment operations"/>

    <target name="install" description="perform an installation operations"/>

    <!--

DELETE the existing output folder and files and then re-generate the output folder

-->

    <target name="clean" description="DELETE the existing output folder and files and then re-generate the output folder">

        <delete dir="${basedir}/${docsoutputfolder}" failonerror="true" includeemptydirs="true"/>
        <delete file="${basedir}/${liboutputfolder}/${liboutputfile}"/>
        <delete dir="${basedir}/dist" failonerror="true" includeemptydirs="true"/>

        <mkdir dir="${basedir}/${docsoutputfolder}"/>

     </target>

    <!--

Run the ASDoc executable and generate the ASDocs to the new output folder

-->

    <target name="docs" description="Run the ASDoc executable and generate the ASDocs to the new output folder">

        <exec executable="${env.SDK_HOME}/bin/asdoc" failonerror="true">

            <arg line="-doc-sources ${sourcepath}"/>
            <arg line="-source-path ${sourcepath}"/>
<arg line="-footer 'Copyright Wordnik'"/>
<arg line="-package com.wordnik.swagger.api 'Contains the apis which are used by clients to make calls to the services deployed'"/>
<arg line="-package com.wordnik.swagger.model 'Contains common classes which encapsulate data elements required'"/>
<arg line="-package com.wordnik.swagger.common 'Contains classes which are used by the api classes to invoke the deployed api like SwaggerApi - a base class, ApiUserCredentials, etc.''"/>
<arg line="-package com.wordnik.swagger.event 'Results of calls made to Wordnik are returned via dispatched events. This package contains such event classes. Right now thats just ApiClientEvent and Response.'"/>
<arg line="-package com.wordnik.swagger.exception 'Contains classes that encapsulate the errors generated'"/>

            <arg value="-window-title"/>
            <arg value="${title}"/>

            <arg value="-main-title"/>
            <arg value="${title}"/>

            <arg value="-output"/>
            <arg value="${basedir}/${docsoutputfolder}"/>

             <arg value="-external-library-path"/>
            <arg value="${basedir}/${libpath}"/>

        </exec>

        <echo>docs created</echo>

    </target>

    <!--

Compile the SWC file library including lib folder and the path to our classes, we use compc for library,
check the docs for Flex Ant Tasks, http://labs.adobe.com/wiki/index.php/Flex_Ant_Tasks.

-->

<target name="buildSWC" description="Compile the SWC file for the Librayr Project">

<compc output="${basedir}/${liboutputfolder}/${liboutputfile}">

<!--
Include the path to any external SWC files used in the sdk, you may have to place name of SWC (ASAXB-0.1.1.swc) at end of path.
So file path would be file="${basedir}/${libpath}/ASAXB-0.1.1.swc"
-->
<include-libraries file="${basedir}/${libpath}/" />

<source-path path-element="${sourcepath}" />

            <keep-as3-metadata name="XmlRootNode"/>
            <keep-as3-metadata name="XmlElement"/>
            <keep-as3-metadata name="XmlElements"/>

<!-- include our Class packages into the build (com folder) -->
<include-sources dir="${sourcepath}" includes="*" />

</compc>

<echo>SWC created</echo>

</target>

<target name="dist" depends="clean, buildSWC, docs">
<mkdir dir="${basedir}/dist/lib"/>
<mkdir dir="${basedir}/dist/docs"/>
<mkdir dir="${basedir}/dist/sample"/>

<copy file="${basedir}/${liboutputfolder}/${liboutputfile}" todir="${basedir}/dist/lib/">
</copy>
<copy todir="${basedir}/dist/docs/">
<fileset dir="${basedir}/asdoc"/>
</copy>


<zip destfile="sample-as3-sdk.zip" basedir="${basedir}/dist" />
</target>

</project>
Something went wrong with that request. Please try again.