flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject git commit: [flex-asjs] [refs/heads/core_js_to_as] - Added HTML5 project to as-js back port.
Date Fri, 04 Dec 2015 15:25:43 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/core_js_to_as 94d9cf2f0 -> 0e9b17dc1


Added HTML5 project to as-js back port.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/0e9b17dc
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/0e9b17dc
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/0e9b17dc

Branch: refs/heads/core_js_to_as
Commit: 0e9b17dc162c83f2c19a104975d7ddc643c7be4d
Parents: 94d9cf2
Author: Peter Ent <pent@apache.org>
Authored: Fri Dec 4 10:25:39 2015 -0500
Committer: Peter Ent <pent@apache.org>
Committed: Fri Dec 4 10:25:39 2015 -0500

----------------------------------------------------------------------
 frameworks/build.xml                |   5 +-
 frameworks/projects/HTML5/build.xml | 120 ++++++++++++++++++-------------
 2 files changed, 71 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0e9b17dc/frameworks/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/build.xml b/frameworks/build.xml
index 0611280..5aeb5d1 100644
--- a/frameworks/build.xml
+++ b/frameworks/build.xml
@@ -98,7 +98,6 @@
         <ant dir="${basedir}/projects/CreateJS" target="compile-asjs"/>
         <ant dir="${basedir}/projects/Formatters" target="compile-asjs"/>
         <ant dir="${basedir}/projects/GoogleMaps" target="compile-asjs"/>
-        <ant dir="${basedir}/projects/HTML5" target="compile-asjs"/>
     </target>
 
     <target name="lint-js" description="Cross-compiles all SWCs">
@@ -106,7 +105,6 @@
         <ant dir="${basedir}/projects/Flat" target="lint-js"/>
         <ant dir="${basedir}/projects/Formatters" target="lint-js"/>
         <ant dir="${basedir}/projects/GoogleMaps" target="lint-js"/>
-        <ant dir="${basedir}/projects/HTML5" target="lint-js"/>
     </target>
 
     <target name="re-compile" description="Builds all SWCs which should pick up the JS
files from asjs">
@@ -115,7 +113,6 @@
         <ant dir="${basedir}/projects/CreateJS" target="compile"/>
         <ant dir="${basedir}/projects/Formatters" target="compile"/>
         <ant dir="${basedir}/projects/GoogleMaps" target="compile"/>
-        <ant dir="${basedir}/projects/HTML5" target="compile"/>
     </target>
 
     <target name="js" depends="compile-asjs, lint-js" />
@@ -229,7 +226,7 @@
     </target>
 
     <target name="HTML5" description="Clean build of HTML5.swc">
-        <ant dir="${basedir}/projects/HTML5"/>
+        <ant dir="${basedir}/projects/HTML5" target="all"/>
     </target>
 
     <target name="JQuery" description="Clean build of JQuery.swc">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0e9b17dc/frameworks/projects/HTML5/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML5/build.xml b/frameworks/projects/HTML5/build.xml
index f9cd570..a1862da 100644
--- a/frameworks/projects/HTML5/build.xml
+++ b/frameworks/projects/HTML5/build.xml
@@ -28,28 +28,16 @@
     <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="gjslint" value="gjslint" />
-    <property name="jshint" value="jshint" />
-    <condition property="no.lint" value="true">
-        <os family="windows"/>
-    </condition>
-    
+
     <target name="main" depends="clean,compile,test" description="Clean build of HTML5.swc">
     </target>
-    
-    <target name="all" depends="main,compile-asjs,lint-js,test-js" description="Full build
of HTML5.swc">
+
+    <target name="all" depends="clean,compile-asjs,compile-extern-swc,copy-js,compile,test"
description="Full build of HTML5.swc">
     </target>
-    
+
     <target name="test" unless="is.jenkins">
         <!-- no tests yet
          <ant dir="as/tests" />
-         <ant dir="asjs/tests" />
-         -->
-    </target>
-    
-    <target name="test-js" unless="is.jenkins">
-        <!-- no tests yet
-         <ant dir="js/tests" />
          -->
     </target>
     
@@ -74,6 +62,8 @@
         <echo message="Compiling libs/HTML5.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. -->
@@ -82,7 +72,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 HTML5Classes.as,
+            listed in ChartsClasses.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.
@@ -96,47 +86,77 @@
             <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" >
-        <!-- nothing to cross-compile yet -->
+    <target name="compile-asjs">
+        <echo message="Cross-compiling HTML5"/>
+        <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="lint-js" depends="gjslint, jshint, copy-js" />
-    <target name="copy-js" >
+    <target name="compile-extern-swc" description="Compiles .as files into .swc used for
cross-compiling other projects">
+        <echo message="Compiling externs/HTML5.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/HTML5.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/src">
-                <include name="**/**" />
+            <fileset dir="${basedir}/js/out">
+                <include name="**/**"/>
             </fileset>
         </copy>
     </target>
 
-    <target name="gjslint" unless="no.lint">
-        <echo>running gjslint</echo>
-        <exec executable="${gjslint}" dir="${basedir}" failonerror="true">
-            <arg value="--strict" />
-            <arg value="--disable" />
-            <arg value="006,100,214,300" />
-            <!-- 006: wrong indentation -->
-            <!-- 100: cannot have non-primitive value -->
-            <!-- 214: @fileoverview tag missing description -->
-            <!-- 300: missing newline at end of file -->
-            <arg value="--max_line_length" />
-            <arg value="120" />
-            <arg value="-r" />
-            <arg value="${basedir}/js/src" />
-        </exec>
-    </target>
-
-    <target name="jshint" unless="no.lint">
-        <echo>running jshint</echo>
-        <exec executable="${jshint}" dir="${basedir}" failonerror="true">
-            <arg value="--config" />
-            <arg value="${FLEX_HOME}/frameworks/js/jshint.properties" />
-            <arg value="${basedir}/js/src" />
-        </exec>
-    </target>
-
-
 </project>


Mime
View raw message