Repository: flex-asjs Updated Branches: refs/heads/e4x [created] 09c5c4fd2
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/basic-manifest.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/XML/basic-manifest.xml b/frameworks/projects/XML/basic-manifest.xml new file mode 100644 index 0000000..cd0f5b4 --- /dev/null +++ b/frameworks/projects/XML/basic-manifest.xml @@ -0,0 +1,24 @@ +<?xml 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. + +--> + + +<componentPackage> + +</componentPackage> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/build.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/XML/build.xml b/frameworks/projects/XML/build.xml new file mode 100644 index 0000000..8c39d13 --- /dev/null +++ b/frameworks/projects/XML/build.xml @@ -0,0 +1,166 @@ +<?xml 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. + +--> + + +<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}"/> + + <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> + + <target name="test" unless="is.jenkins"> + <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"/> + </fileset> + </delete> + <delete failonerror="false"> + <fileset dir="${basedir}/js/out"> + <include name="**/**"/> + </fileset> + </delete> + </target> + + <path id="lib.path"> + <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/> + </path> + + <target name="compile" description="Compiles .as files into .swc"> + <echo message="Compiling libs/XML.swc"/> + <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"/> + + <!-- Load the <compc> task. We can't do this at the <project> level --> + <!-- because targets that run before flexTasks.jar gets built would fail. --> + <taskdef resource="flexTasks.tasks" classpathref="lib.path"/> + <!-- + 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, + 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. + Don't include any resources in the SWC. + Write a bundle list of referenced resource bundles + into the file bundles.properties in this directory. + --> + <compc fork="true" + output="${FLEXJS_HOME}/frameworks/libs/XML.swc"> + <jvmarg line="${compc.jvm.args}"/> + <load-config filename="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> + </target> + + <target name="compile-asjs"> + <echo message="Cross-compiling XML"/> + <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/> + <java jar="${FALCONJX_HOME}/lib/compc.jar" fork="true" > + <jvmarg value="-Xmx384m" /> + <jvmarg value="-Dsun.io.useCanonCaches=false" /> + <jvmarg value="-Dflexcompiler=${FALCONJX_HOME}/../compiler" /> + <jvmarg value="-Dflexlib=${FLEXJS_HOME}/frameworks" /> + <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="+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" /> + <!-- 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="-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="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"/> + + <!-- Load the <compc> task. We can't do this at the <project> level --> + <!-- because targets that run before flexTasks.jar gets built would fail. --> + <taskdef resource="flexTasks.tasks" classpathref="lib.path"/> + <!-- + 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, + 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. + Don't include any resources in the SWC. + Write a bundle list of referenced resource bundles + into the file bundles.properties in this directory. + --> + <compc fork="true" + output="${FLEXJS_HOME}/frameworks/externs/XML.swc"> + <jvmarg line="${compc.jvm.args}"/> + <load-config filename="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" /> + <!-- 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="-define=COMPILE::AS3,false" /> + <arg value="-define=COMPILE::JS,true" /> + </compc> + </target> + + <target name="copy-js"> + <copy todir="${FLEXJS_HOME}/frameworks/js/FlexJS/libs"> + <fileset dir="${basedir}/js/out"> + <include name="**/**"/> + </fileset> + </copy> + </target> + +</project> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/compile-as-to-js-config.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/XML/compile-as-to-js-config.xml b/frameworks/projects/XML/compile-as-to-js-config.xml new file mode 100644 index 0000000..e601b79 --- /dev/null +++ b/frameworks/projects/XML/compile-as-to-js-config.xml @@ -0,0 +1,77 @@ +<!-- + + 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/a50de213/frameworks/projects/XML/compile-asjs-config.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/XML/compile-asjs-config.xml b/frameworks/projects/XML/compile-asjs-config.xml new file mode 100644 index 0000000..977c1d4 --- /dev/null +++ b/frameworks/projects/XML/compile-asjs-config.xml @@ -0,0 +1,78 @@ +<!-- + + 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> + </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> + </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> + </source-path> + + <warn-no-constructor>false</warn-no-constructor> + </compiler> + + <include-file> + </include-file> + + <include-sources> + </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>--> + + +</flex-config> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/compile-config.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/XML/compile-config.xml b/frameworks/projects/XML/compile-config.xml new file mode 100644 index 0000000..7d862dc --- /dev/null +++ b/frameworks/projects/XML/compile-config.xml @@ -0,0 +1,83 @@ +<!-- + + 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> + </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> + </include-classes> + + <include-namespaces> + <uri>library://ns.apache.org/flexjs/basic</uri> + </include-namespaces> + + <target-player>${playerglobal.version}</target-player> + + +</flex-config> http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a50de213/frameworks/projects/XML/compile-js-config.xml ---------------------------------------------------------------------- diff --git a/frameworks/projects/XML/compile-js-config.xml b/frameworks/projects/XML/compile-js-config.xml new file mode 100644 index 0000000..b37f6af --- /dev/null +++ b/frameworks/projects/XML/compile-js-config.xml @@ -0,0 +1,87 @@ +<!-- + + 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>
