Repository: flex-asjs Updated Branches: refs/heads/e4x 7f23ef37d -> 41ac2e1e5
Attempt at setting up XML project Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/41ac2e1e Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/41ac2e1e Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/41ac2e1e Branch: refs/heads/e4x Commit: 41ac2e1e53e67da409b03a3782606f5919cb435e Parents: 7f23ef3 Author: Harbs <[email protected]> Authored: Fri Feb 12 11:56:41 2016 +0200 Committer: Harbs <[email protected]> Committed: Fri Feb 12 11:56:41 2016 +0200 ---------------------------------------------------------------------- frameworks/projects/XML/build.xml | 66 ++++++++------- .../main/resources/compile-as-to-js-config.xml | 77 ----------------- .../src/main/resources/compile-asjs-config.xml | 15 ++-- .../XML/src/main/resources/compile-config.xml | 13 +-- .../src/main/resources/compile-js-config.xml | 87 -------------------- 5 files changed, 48 insertions(+), 210 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41ac2e1e/frameworks/projects/XML/build.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/XML/build.xml b/frameworks/projects/XML/build.xml index 8c39d13..ec948ec 100644 --- a/frameworks/projects/XML/build.xml +++ b/frameworks/projects/XML/build.xml @@ -21,45 +21,48 @@ <project name="XML" default="main" basedir="."> <property name="FLEXJS_HOME" location="../../.."/> - + <property file="${FLEXJS_HOME}/env.properties"/> <property environment="env"/> <property file="${FLEXJS_HOME}/build.properties"/> <property name="FLEX_HOME" value="${FLEXJS_HOME}"/> <property name="FALCON_HOME" value="${env.FALCON_HOME}"/> <property name="FALCONJX_HOME" value="${env.FALCONJX_HOME}"/> + <property name="JS.SWC" value="${FALCONJX_HOME}/../externs/js/out/bin/js.swc" /> + <property name="GCL.SWC" value="${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc" /> + <property name="target.name" value="XML-${release.version}.swc" /> + <property name="target.name.no.version" value="XML.swc" /> - <target name="main" depends="clean,compile,test" description="Clean build of Core.swc"> - </target> - - <target name="all" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test" description="Full build of XML.swc"> + <target name="main" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test-js" description="Full build of XML.swc"> </target> - + <target name="test" unless="is.jenkins"> - <ant dir="as/tests"/> + <!-- no tests yet + <ant dir="as/tests" /> + --> </target> - + <target name="test-js" unless="is.jenkins"> <!-- no tests yet <ant dir="js/tests" /> --> </target> - + <target name="clean"> <delete failonerror="false"> <fileset dir="${FLEXJS_HOME}/frameworks/libs"> - <include name="XML.swc"/> + <include name="${target.name.no.version}"/> </fileset> </delete> <delete failonerror="false"> - <fileset dir="${basedir}/js/out"> + <fileset dir="${basedir}/target"> <include name="**/**"/> </fileset> </delete> </target> - + <path id="lib.path"> - <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/> + <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/> </path> <target name="compile" description="Compiles .as files into .swc"> @@ -67,7 +70,7 @@ <echo message="FLEX_HOME: ${FLEX_HOME}"/> <echo message="FALCON_HOME: ${FALCON_HOME}"/> <!-- make JS output folder now so include-file doesn't error --> - <mkdir dir="${basedir}/js/out"/> + <mkdir dir="${basedir}/target/generated-sources/flexjs" /> <!-- Load the <compc> task. We can't do this at the <project> level --> <!-- because targets that run before flexTasks.jar gets built would fail. --> @@ -76,7 +79,7 @@ Link in the classes (and their dependencies) for the MXML tags listed in this project's manifest.xml. Also link the additional classes (and their dependencies) - listed in CoreClasses.as, + listed in XMLClasses.as, because these aren't referenced by the manifest classes. Keep the standard metadata when compiling. Include the appropriate CSS files and assets in the SWC. @@ -85,18 +88,19 @@ into the file bundles.properties in this directory. --> <compc fork="true" - output="${FLEXJS_HOME}/frameworks/libs/XML.swc"> + output="${basedir}/target/${target.name}"> <jvmarg line="${compc.jvm.args}"/> - <load-config filename="compile-config.xml" /> + <load-config filename="${basedir}/src/main/resources/compile-config.xml" /> <arg value="+playerglobal.version=${playerglobal.version}" /> <arg value="+env.AIR_HOME=${env.AIR_HOME}" /> <arg value="-define=COMPILE::AS3,true" /> <arg value="-define=COMPILE::JS,false" /> </compc> + <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" /> </target> <target name="compile-asjs"> - <echo message="Cross-compiling XML"/> + <echo message="Cross-compiling ${target.name}"/> <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/> <java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" > <jvmarg value="-Xmx384m" /> @@ -106,25 +110,26 @@ <arg value="+flexlib=${FLEX_HOME}/frameworks" /> <arg value="-js-output-type=FLEXJS" /> <arg value="-keep-asdoc" /><!-- allows compiler to see @flexjsignorecoercion annotations --> - <arg value="-output=${basedir}/js/out" /> - <arg value="-load-config=${basedir}/compile-asjs-config.xml" /> + <arg value="-output=${basedir}/target/generated-sources/flexjs" /> + <arg value="-load-config=${basedir}/src/main/resources/compile-asjs-config.xml" /> <arg value="+playerglobal.version=${playerglobal.version}" /> <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" /> <arg value="+env.AIR_HOME=${env.AIR_HOME}" /> - <arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" /> + <arg value="-external-library-path+=${JS.SWC}" /> <!-- this is not on external-library path otherwise goog.requires are not generated --> - <arg value="-library-path+=${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc" /> + <arg value="-library-path+=${GCL.SWC}" /> <arg value="-define=COMPILE::AS3,false" /> <arg value="-define=COMPILE::JS,true" /> </java> </target> <target name="compile-extern-swc" description="Compiles .as files into .swc used for cross-compiling other projects"> - <echo message="Compiling externs/XML.swc"/> + <echo message="Compiling target/externs/${target.name}"/> <echo message="FLEX_HOME: ${FLEX_HOME}"/> <echo message="FALCON_HOME: ${FALCON_HOME}"/> <!-- make JS output folder now so include-file doesn't error --> <mkdir dir="${FLEXJS_HOME}/frameworks/externs"/> + <mkdir dir="${basedir}/target/externs"/> <!-- Load the <compc> task. We can't do this at the <project> level --> <!-- because targets that run before flexTasks.jar gets built would fail. --> @@ -142,23 +147,24 @@ into the file bundles.properties in this directory. --> <compc fork="true" - output="${FLEXJS_HOME}/frameworks/externs/XML.swc"> + output="${basedir}/target/externs/${target.name}"> <jvmarg line="${compc.jvm.args}"/> - <load-config filename="compile-asjs-config.xml" /> + <load-config filename="src/main/resources/compile-asjs-config.xml" /> <arg value="+playerglobal.version=${playerglobal.version}" /> <arg value="+env.AIR_HOME=${env.AIR_HOME}" /> - <arg value="-external-library-path+=${FALCONJX_HOME}/../externs/js/out/bin/js.swc" /> + <arg value="-external-library-path+=${JS.SWC}" /> <!-- this is not on external-library path otherwise goog.requires are not generated --> - <arg value="-library-path+=${FALCONJX_HOME}/../externs/GCL/out/bin/GCL.swc" /> + <arg value="-library-path+=${GCL.SWC}" /> <arg value="-define=COMPILE::AS3,false" /> <arg value="-define=COMPILE::JS,true" /> </compc> + <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" /> </target> - <target name="copy-js"> + <target name="copy-js" > <copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs"> - <fileset dir="${basedir}/js/out"> - <include name="**/**"/> + <fileset dir="${basedir}/target/generated-sources/flexjs"> + <include name="**/**" /> </fileset> </copy> </target> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41ac2e1e/frameworks/projects/XML/src/main/resources/compile-as-to-js-config.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/XML/src/main/resources/compile-as-to-js-config.xml b/frameworks/projects/XML/src/main/resources/compile-as-to-js-config.xml deleted file mode 100644 index e601b79..0000000 --- a/frameworks/projects/XML/src/main/resources/compile-as-to-js-config.xml +++ /dev/null @@ -1,77 +0,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. - ---> -<flex-config> - - <compiler> - <accessible>false</accessible> - - <external-library-path> - <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element> - <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/js.swc</path-element> - <path-element>D:/SDKs/FlexJS/nightly_PF18_AIR18.0_en_US/js/libs/gcl.swc</path-element> - </external-library-path> - - <mxml> - <children-as-data>true</children-as-data> - </mxml> - <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event> - <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind> - <binding-value-change-event-type>valueChange</binding-value-change-event-type> - - <keep-as3-metadata> - <name>Bindable</name> - <name>Managed</name> - <name>ChangeEvent</name> - <name>NonCommittingChangeEvent</name> - <name>Transient</name> - </keep-as3-metadata> - - <namespaces> - <namespace> - <uri>library://ns.apache.org/flexjs/basic</uri> - <manifest>basic-manifest.xml</manifest> - </namespace> - </namespaces> - - <locale/> - - <source-path> - <!--<path-element>as/src</path-element>--> - </source-path> - - <warn-no-constructor>false</warn-no-constructor> - </compiler> - - <include-sources> - <path-element>as/src</path-element> - </include-sources> - - <include-classes> - <class>CoreClasses</class> - <!--<class>CoreASJSClasses</class>--> - </include-classes> - - <include-namespaces> - <uri>library://ns.apache.org/flexjs/basic</uri> - </include-namespaces> - - <target-player>11.1</target-player> - - -</flex-config> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41ac2e1e/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml b/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml index 977c1d4..2c5abf4 100644 --- a/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml +++ b/frameworks/projects/XML/src/main/resources/compile-asjs-config.xml @@ -42,6 +42,10 @@ <locale/> <library-path> + <!-- asjscompc won't 'link' these classes in, but will list their requires + if these swcs are on the external-library-path then their requires + will not be listed --> + <path-element>../../../../../externs/Core.swc</path-element> </library-path> <namespaces> @@ -52,7 +56,7 @@ </namespaces> <source-path> - <path-element>as/src</path-element> + <path-element>../flex</path-element> </source-path> <warn-no-constructor>false</warn-no-constructor> @@ -62,17 +66,14 @@ </include-file> <include-sources> + <path-element>../flex</path-element> </include-sources> - <include-classes> - <class>CoreClasses</class> - </include-classes> - <include-namespaces> <uri>library://ns.apache.org/flexjs/basic</uri> </include-namespaces> - - <!--<target-player>${playerglobal.version}</target-player>--> + + <target-player>${playerglobal.version}</target-player> </flex-config> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41ac2e1e/frameworks/projects/XML/src/main/resources/compile-config.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/XML/src/main/resources/compile-config.xml b/frameworks/projects/XML/src/main/resources/compile-config.xml index 7d862dc..9dde123 100644 --- a/frameworks/projects/XML/src/main/resources/compile-config.xml +++ b/frameworks/projects/XML/src/main/resources/compile-config.xml @@ -23,6 +23,7 @@ <external-library-path> <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element> + <path-element>../../../../../libs/Core.swc</path-element> </external-library-path> <mxml> @@ -52,7 +53,7 @@ </namespaces> <source-path> - <path-element>as/src</path-element> + <path-element>../flex</path-element> </source-path> <warn-no-constructor>false</warn-no-constructor> @@ -60,14 +61,8 @@ <include-file> <name>js/out/*</name> - <path>js/out/*</path> + <path>../../../target/generated-sources/flexjs/*</path> </include-file> - <!-- - <include-file> - <name>js/src/*</name> - <path>js/src/*</path> - </include-file> - --> <include-classes> <class>XMLClasses</class> @@ -75,7 +70,7 @@ <include-namespaces> <uri>library://ns.apache.org/flexjs/basic</uri> - </include-namespaces> + </include-namespaces> <target-player>${playerglobal.version}</target-player> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/41ac2e1e/frameworks/projects/XML/src/main/resources/compile-js-config.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/XML/src/main/resources/compile-js-config.xml b/frameworks/projects/XML/src/main/resources/compile-js-config.xml deleted file mode 100644 index b37f6af..0000000 --- a/frameworks/projects/XML/src/main/resources/compile-js-config.xml +++ /dev/null @@ -1,87 +0,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. - ---> -<flex-config> - - <compiler> - <accessible>false</accessible> - - <external-library-path> - <path-element>${env.AIR_HOME}/frameworks/libs/air/airglobal.swc</path-element> - </external-library-path> - - <mxml> - <children-as-data>true</children-as-data> - </mxml> - <binding-value-change-event>org.apache.flex.events.ValueChangeEvent</binding-value-change-event> - <binding-value-change-event-kind>org.apache.flex.events.ValueChangeEvent</binding-value-change-event-kind> - <binding-value-change-event-type>valueChange</binding-value-change-event-type> - - <keep-as3-metadata> - <name>Bindable</name> - <name>Managed</name> - <name>ChangeEvent</name> - <name>NonCommittingChangeEvent</name> - <name>Transient</name> - </keep-as3-metadata> - - <locale/> - - <library-path/> - - <namespaces> - <namespace> - <uri>library://ns.apache.org/flexjs/basic</uri> - <manifest>basic-manifest.xml</manifest> - </namespace> - </namespaces> - - <source-path> - <path-element>as/src</path-element> - <path-element>asjs/src</path-element> - </source-path> - - <warn-no-constructor>false</warn-no-constructor> - </compiler> - - <include-file> - <name>js/out/*</name> - <path>js/out/*</path> - </include-file> - <!-- - <include-file> - <name>js/src/*</name> - <path>js/src/*</path> - </include-file> - --> - - <include-classes> - <class>XMLClasses</class> - <!-- leave out for now until we get Application to compile - <class>CoreASJSClasses</class>--> - </include-classes> - - <include-namespaces> - <uri>library://ns.apache.org/flexjs/basic</uri> - <uri>library://ns.apache.org/flexjs/svg</uri> - </include-namespaces> - - <target-player>${playerglobal.version}</target-player> - - -</flex-config>
