You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2017/03/01 21:09:58 UTC

[10/10] git commit: [flex-asjs] [refs/heads/dual] - fix up examples to use dual mode

fix up examples to use dual mode


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

Branch: refs/heads/dual
Commit: 333e201aa3a3c20a29ea2caf3a8736171b7428d2
Parents: 6a4be59
Author: Alex Harui <ah...@apache.org>
Authored: Wed Mar 1 13:09:29 2017 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Wed Mar 1 13:09:29 2017 -0800

----------------------------------------------------------------------
 examples/build_example.xml                      | 248 ++-----------------
 examples/express/DataBindingExample/build.xml   |   3 +-
 examples/flexjs/ASDoc/build.xml                 |   3 +-
 .../flexjs/ASDoc/src/main/flex/ASDoc-config.xml |  23 ++
 examples/flexjs/ChartExample/build.xml          |  23 +-
 examples/flexjs/CordovaCameraExample/build.xml  |   4 +-
 examples/flexjs/CreateJSExample/build.xml       |  21 +-
 .../src/main/flex/CreateJSExample-config.xml    |  28 +++
 examples/flexjs/DataBindingExample/build.xml    |   2 +-
 .../src/main/flex/DataBindingExample-config.xml |  23 ++
 .../flexjs/DataBindingExample_Flat/build.xml    |   4 +-
 .../src/main/flex/DataBindingExample-config.xml |  28 +++
 examples/flexjs/DataBindingExample_as/build.xml |   4 +-
 .../src/main/flex/DataBindingExample-config.xml |  23 ++
 .../src/main/flex/DataBindingExample.as         |   8 +-
 examples/flexjs/DataGridExample/build.xml       |  20 +-
 examples/flexjs/DateControlsExample/build.xml   |  20 +-
 examples/flexjs/DesktopMap/build.xml            |   7 +-
 .../src/main/flex/DesktopMap-config.xml         |  26 ++
 examples/flexjs/FlexJSStore/build.xml           |   3 +-
 .../src/main/flex/FlexJSStore-config.xml        |  23 ++
 .../productsView/ProductCatalogThumbnail.mxml   |   1 -
 examples/flexjs/FlexJSStore_jquery/build.xml    |  21 +-
 .../src/main/flex/FlexJSStore-config.xml        |  28 +++
 .../productsView/ProductCatalogThumbnail.mxml   |   1 -
 examples/flexjs/FlexTeamPage_MDL/build.xml      |   4 +-
 .../src/main/flex/App-config.xml                |  26 ++
 .../flexjs/FlexWebsiteStatsViewer/build.xml     |   3 +-
 examples/flexjs/HelloWorld/build.xml            |   2 +-
 examples/flexjs/ListExample/build.xml           |  20 +-
 examples/flexjs/MDLExample/build.xml            |   4 +-
 .../MDLExample/src/main/flex/App-config.xml     |  26 ++
 examples/flexjs/MapSearch/build.xml             |  23 +-
 .../src/main/flex/MapSearch-config.xml          |  26 ++
 examples/flexjs/MobileMap/build.xml             |  22 +-
 .../src/main/flex/MobileMap-config.xml          |  26 ++
 examples/flexjs/MobileStocks/build.xml          |  24 +-
 examples/flexjs/MobileTrader/build.xml          |  21 +-
 .../src/main/flex/MobileTrader-config.xml       |  21 ++
 examples/flexjs/StorageExample/build.xml        |  24 +-
 .../src/main/flex/StorageExample-config.xml     |  26 ++
 examples/flexjs/StyleExample/build.xml          |   3 +-
 .../src/main/flex/StyleExample-config.xml       |  23 ++
 examples/flexjs/TeamPage/build.xml              |  21 +-
 .../TeamPage/src/main/flex/TeamPage-config.xml  |  21 ++
 examples/flexjs/TodoListSampleApp/build.xml     |   7 +-
 .../src/main/flex/TodoListSampleApp-config.xml  |  23 ++
 examples/flexjs/TreeExample/build.xml           |  20 +-
 examples/native/ButtonExample/build.xml         |  67 +----
 examples/native/USStatesMap/build.xml           |  67 +----
 50 files changed, 483 insertions(+), 662 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/build_example.xml
----------------------------------------------------------------------
diff --git a/examples/build_example.xml b/examples/build_example.xml
index 79a7e64..e2ba134 100644
--- a/examples/build_example.xml
+++ b/examples/build_example.xml
@@ -93,35 +93,28 @@
     </condition>
 
     <path id="lib.path">
-      <fileset dir="${FALCON_HOME}/lib" includes="falcon-flexTasks.jar"/>
+      <fileset dir="${FALCONJX_HOME}/lib" includes="falcon-flexTasks.jar"/>
+      <fileset dir="${FALCONJX_HOME}/lib" includes="jsc.jar"/>
     </path>
     
     <target name="compile" description="Compiles ${example}">
         <echo message="Compiling ${example}.swf"/>
         <echo message="FLEX_HOME: ${FLEX_HOME}"/>
+        <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
+        <echo message="GOOG_HOME: ${GOOG_HOME}"/>
 
         <!-- 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"/>
-        <!-- this is a dummy var placeholder in case some example needs to define a theme
-            then they would set theme_arg=-theme=<path to theme> -->
-        <property name="theme_arg" value="-define=CONFIG::theme,false" />
+        <property name="config_arg" value="flex" />
+        <property name="file_suffix" value="mxml" />
         <mxmlc fork="true"
-               file="${basedir}/src/main/flex/${example}.mxml"
+               debug="true"
+               configname="${config_arg}"
+               closure-lib="${GOOG_HOME}"
+               file="${basedir}/src/main/flex/${example}.${file_suffix}"
                output="${basedir}/bin-debug/${example}.swf">
             <jvmarg line="${mxmlc.jvm.args}"/>
-            <arg value="+flexlib=${basedir}/frameworks" />
-            <arg value="-debug" />
-            <arg value="${theme_arg}" />
-            <arg value="-compiler.mxml.children-as-data" />
-            <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-type=valueChange" />
-			<arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
-			<arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
-			<arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
-            <arg value="+playerglobal.version=${playerglobal.version}" />
-            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
         </mxmlc>
         
         <html-wrapper 
@@ -140,226 +133,21 @@
                 <include name="**/*.swf" />
             </fileset>
         </copy>
+        <antcall target="build_example.compile-js-release" />
     </target>
     
-    <target name="compileair" description="Compiles ${example}">
-        <echo message="Compiling ${example}.swf"/>
-        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
-        
-        <!-- 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"/>
-        <property name="theme_arg" value="-define=CONFIG::theme,false" />
+    <target name="compile-js-release">
+        <property name="js.release.target" value="JSFlex" />
         <mxmlc fork="true"
-            file="${basedir}/src/main/flex/${example}.mxml"
-            output="${basedir}/bin-debug/${example}.swf">
+            debug="false"
+            configname="${config_arg}"
+            closure-lib="${GOOG_HOME}"
+            file="${basedir}/src/main/flex/${example}.${file_suffix}"
+            output="${basedir}/bin-release/${example}.swf">
             <jvmarg line="${mxmlc.jvm.args}"/>
-            <arg value="+flexlib=${basedir}/frameworks" />
-            <arg value="+configname=air" />
-            <arg value="-debug" />
-            <arg value="${theme_arg}" />
-            <arg value="-target-player=${playerglobal.version}" />
-            <arg value="-swf-version=${swf.version}" />
-            <arg value="-compiler.mxml.children-as-data" />
-            <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-type=valueChange" />
-			<arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
-			<arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
-			<arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
-            <arg value="+playerglobal.version=${playerglobal.version}" />
-            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
         </mxmlc>
-        
-        <antcall target="build_example.copy-resources" />
-        <copy todir="${basedir}/bin-debug">
-            <fileset dir="${basedir}">
-                <include name="*-app.xml" />
-            </fileset>
-        </copy>
     </target>
     
-    <target name="compileas" description="Compiles ${example}">
-        <echo message="Compiling ${example}.swf"/>
-        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
-
-        <!-- 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"/>
-        <property name="theme_arg" value="-define=CONFIG::theme,false" />
-        <mxmlc fork="true"
-               file="${basedir}/src/main/flex/${example}.as"
-               output="${basedir}/bin-debug/${example}.swf">
-            <jvmarg line="${mxmlc.jvm.args}"/>
-            <arg value="+flexlib=${basedir}/frameworks" />
-            <arg value="-debug" />
-            <arg value="${theme_arg}" />
-            <arg value="-define=CONFIG::as_only,true" />
-            <arg value="-define=CONFIG::js_only,false" />
-            <arg value="-compiler.mxml.children-as-data" />
-            <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-type=valueChange" />
-			<arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
-			<arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
-			<arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
-            <arg value="+playerglobal.version=${playerglobal.version}" />
-            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
-        </mxmlc>
-        
-        <html-wrapper 
-            height="300" 
-            width="400"
-            bgcolor="#ffffff"
-            name="${example}"
-            versionmajor="11"
-            versionminor="1"
-            versionrevision="0" 
-            output="${basedir}/bin-debug"/> 
- 
-    </target>
-
-    <target name="compilejs" description="Cross-compiles ${example}" unless="no.js">
-        <echo message="Compiling ${example}.js"/>
-        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
-        <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
-        <echo message="GOOG_HOME: ${GOOG_HOME}"/>
-        <property name="theme_arg" value="-define=CONFIG::theme,false" />
-        <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
-        <property name="opt1_arg" value="-define=CONFIG::opt1,false" />
-        <property name="opt2_arg" value="-define=CONFIG::opt2,false" />
-
-        <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
-            fork="true">
-            <jvmarg line="${mxmlc.jvm.args}"/>
-            <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks}"/>
-            <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
-            <arg value="-debug=false" />
-            <arg value="${theme_arg}" />
-            <arg value="-compiler.mxml.children-as-data" />
-            <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-type=valueChange" />
-			<arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
-			<arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
-			<arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
-            <arg value="+playerglobal.version=${playerglobal.version}" />
-            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
-            <arg value="${extlib_arg}" />
-            <arg value="${opt1_arg}" />
-            <arg value="${opt2_arg}" />
-            <arg value="-js-output-type=FLEXJS" />
-            <arg value="-closure-lib=${GOOG_HOME}" />
-            <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources" />
-            <arg value="${basedir}/src/main/flex/${example}.mxml" />
-        </java>
-        <fail>
-			<condition>
-				<not>
-					<or>
-						<equals arg1="${errorCode}" arg2="0" />
-						<equals arg1="${errorCode}" arg2="2" />
-					</or>
-				</not>
-			</condition>
-		</fail>
-    </target>
-
-    <target name="compilejsair" description="Cross-compiles ${example}" unless="no.js">
-        <echo message="Compiling ${example}.js"/>
-        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
-        <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
-        <echo message="GOOG_HOME: ${GOOG_HOME}"/>
-        <property name="theme_arg" value="-define=CONFIG::theme,false" />
-        <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
-        <property name="opt1_arg" value="-define=CONFIG::opt1,false" />
-        <property name="opt2_arg" value="-define=CONFIG::opt2,false" />
-        
-        <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
-            fork="true">
-            <jvmarg line="${mxmlc.jvm.args}"/>
-            <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks}"/>
-            <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
-            <arg value="+configname=air" />
-            <arg value="-debug=false" />
-            <arg value="${theme_arg}" />
-            <arg value="-compiler.mxml.children-as-data" />
-            <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-type=valueChange" />
-			<arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
-			<arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
-			<arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
-            <arg value="+playerglobal.version=${playerglobal.version}" />
-            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
-            <arg value="${extlib_arg}" />
-            <arg value="${opt1_arg}" />
-            <arg value="${opt2_arg}" />
-            <arg value="-js-output-type=FLEXJS" />
-            <arg value="-closure-lib=${GOOG_HOME}" />
-            <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources" />
-            <arg value="${basedir}/src/main/flex/${example}.mxml" />
-        </java>
-        <fail>
-            <condition>
-                <not>
-                    <or>
-                        <equals arg1="${errorCode}" arg2="0" />
-                        <equals arg1="${errorCode}" arg2="2" />
-                    </or>
-                </not>
-            </condition>
-        </fail>
-    </target>
-
-    <target name="compileasjs" description="Cross-compiles ${example}" unless="no.js">
-        <echo message="Compiling ${example}.js"/>
-        <echo message="FLEX_HOME: ${FLEX_HOME}"/>
-        <echo message="FALCONJX_HOME: ${FALCONJX_HOME}"/>
-        <echo message="GOOG_HOME: ${GOOG_HOME}"/>
-        <property name="theme_arg" value="-define=CONFIG::theme,false" />
-        <property name="extlib_arg" value="-define=CONFIG::extlib,false" />
-        <property name="opt1_arg" value="-define=CONFIG::opt1,false" />
-        <property name="opt2_arg" value="-define=CONFIG::opt2,false" />
-
-        <java jar="${FALCONJX_HOME}/lib/mxmlc.jar" resultProperty="errorCode"
-            fork="true">
-            <jvmarg line="${mxmlc.jvm.args}"/>
-            <jvmarg line="-Dflexlib=${FLEXJS_HOME}/frameworks}"/>
-            <arg value="+flexlib=${FLEXJS_HOME}/frameworks" />
-            <arg value="-debug=false" />
-            <arg value="${theme_arg}" />
-            <arg value="-define=CONFIG::as_only,false" />
-            <arg value="-define=CONFIG::js_only,true" />
-            <arg value="-compiler.mxml.children-as-data" />
-            <arg value="-compiler.binding-value-change-event=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-kind=org.apache.flex.events.ValueChangeEvent" />
-            <arg value="-compiler.binding-value-change-event-type=valueChange" />
-			<arg value="-compiler.binding-event-handler-interface=org.apache.flex.events.IEventDispatcher" />
-			<arg value="-compiler.binding-event-handler-class=org.apache.flex.events.EventDispatcher" />
-			<arg value="-compiler.binding-event-handler-event=org.apache.flex.events.Event" />
-            <arg value="+playerglobal.version=${playerglobal.version}" />
-            <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
-            <arg value="${extlib_arg}" />
-            <arg value="${opt1_arg}" />
-            <arg value="${opt2_arg}" />
-            <arg value="-js-output-type=FLEXJS" />
-            <arg value="-closure-lib=${GOOG_HOME}" />
-            <arg value="-sdk-js-lib=${FLEXJS_HOME}/frameworks/js/FlexJS/generated-sources" />
-            <arg value="${basedir}/src/main/flex/${example}.as" />
-        </java>
-        <fail>
-			<condition>
-				<not>
-					<or>
-						<equals arg1="${errorCode}" arg2="0" />
-						<equals arg1="${errorCode}" arg2="2" />
-					</or>
-				</not>
-			</condition>
-		</fail>        
-    </target>
-
     <macrodef name="html-wrapper">
         <attribute name="width"/>
         <attribute name="height"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/express/DataBindingExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/express/DataBindingExample/build.xml b/examples/express/DataBindingExample/build.xml
index 6739bb6..6f58f1a 100644
--- a/examples/express/DataBindingExample/build.xml
+++ b/examples/express/DataBindingExample/build.xml
@@ -27,11 +27,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="opt1_arg" value="-js-output-optimization=skipAsCoercions" />
 
     <include file="${basedir}/../../build_example.xml" />
     
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/ASDoc/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ASDoc/build.xml b/examples/flexjs/ASDoc/build.xml
index e6e8fd4..ad248d2 100644
--- a/examples/flexjs/ASDoc/build.xml
+++ b/examples/flexjs/ASDoc/build.xml
@@ -27,11 +27,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="opt1_arg" value="-js-output-optimization=skipAsCoercions" />
 
     <include file="${basedir}/../../build_example.xml" />
     
-    <target name="main" depends="build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="build_example.compile" description="Clean build of ${example}">
         <available file="${basedir}/bin-debug/classes.json"
         type="file"
         property="json.exists"/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/ASDoc/src/main/flex/ASDoc-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ASDoc/src/main/flex/ASDoc-config.xml b/examples/flexjs/ASDoc/src/main/flex/ASDoc-config.xml
new file mode 100644
index 0000000..454808b
--- /dev/null
+++ b/examples/flexjs/ASDoc/src/main/flex/ASDoc-config.xml
@@ -0,0 +1,23 @@
+<!--
+
+  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>
+    <js-output-optimization>
+        <optimization>skipAsCoercions</optimization>
+    </js-output-optimization>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/ChartExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ChartExample/build.xml b/examples/flexjs/ChartExample/build.xml
index 24d793f..567320c 100644
--- a/examples/flexjs/ChartExample/build.xml
+++ b/examples/flexjs/ChartExample/build.xml
@@ -29,27 +29,8 @@
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
     
     <include file="${basedir}/../../build_example.xml" />
-    
-    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FLEXJS_HOME}/js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FALCONJX_HOME}/../js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/js/out/bin/js.swc"/>
-    
-<!-- temp remove build_example.compilejs -->
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/CordovaCameraExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/CordovaCameraExample/build.xml b/examples/flexjs/CordovaCameraExample/build.xml
index 0a7a08f..6d4d635 100644
--- a/examples/flexjs/CordovaCameraExample/build.xml
+++ b/examples/flexjs/CordovaCameraExample/build.xml
@@ -33,6 +33,7 @@
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
     
     <property name="AIR_HOME" value="${env.AIR_HOME}"/>
+    <property name="config_arg" value="air"/>
     
     
     <condition property="adl" value="adl.exe">
@@ -53,11 +54,10 @@
 
     <include file="${basedir}/../../build_example.xml" />
 
-    <target name="main" depends="clean,build_example.compileair,build_example.compilejsair" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">
-        <echo>playerglobal.version = ${playerglobal.version}</echo>
         <delete dir="${basedir}/bin" failonerror="false" />
         <delete dir="${basedir}/bin-debug" failonerror="false" />
         <delete dir="${basedir}/bin-release" failonerror="false" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/CreateJSExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/CreateJSExample/build.xml b/examples/flexjs/CreateJSExample/build.xml
index 514f257..3f8fead 100644
--- a/examples/flexjs/CreateJSExample/build.xml
+++ b/examples/flexjs/CreateJSExample/build.xml
@@ -27,29 +27,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="opt1_arg" value="-js-output-optimization=skipAsCoercions" />
 
     <include file="${basedir}/../../build_example.xml" />
     
-    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/createjs.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FLEXJS_HOME}/js/libs/createjs.swc" type="file" />
-        </and>
-    </condition>
-    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/createjs.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FALCONJX_HOME}/../js/libs/createjs.swc" type="file" />
-        </and>
-    </condition>
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/createjs/target/createjs.swc"/>
-    
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/CreateJSExample/src/main/flex/CreateJSExample-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/CreateJSExample/src/main/flex/CreateJSExample-config.xml b/examples/flexjs/CreateJSExample/src/main/flex/CreateJSExample-config.xml
new file mode 100644
index 0000000..51e4b0d
--- /dev/null
+++ b/examples/flexjs/CreateJSExample/src/main/flex/CreateJSExample-config.xml
@@ -0,0 +1,28 @@
+<!--
+
+  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>
+    <js-output-optimization>
+        <optimization>skipFunctionCoercions</optimization>
+    </js-output-optimization>
+    <compiler>
+        <js-external-library-path append="true">
+            <path-element>../../../../../../js/libs/createjs.swc</path-element>
+        </js-external-library-path>
+    </compiler>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/DataBindingExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataBindingExample/build.xml b/examples/flexjs/DataBindingExample/build.xml
index 6739bb6..3433c3d 100644
--- a/examples/flexjs/DataBindingExample/build.xml
+++ b/examples/flexjs/DataBindingExample/build.xml
@@ -31,7 +31,7 @@
 
     <include file="${basedir}/../../build_example.xml" />
     
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/DataBindingExample/src/main/flex/DataBindingExample-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataBindingExample/src/main/flex/DataBindingExample-config.xml b/examples/flexjs/DataBindingExample/src/main/flex/DataBindingExample-config.xml
new file mode 100644
index 0000000..b4290dc
--- /dev/null
+++ b/examples/flexjs/DataBindingExample/src/main/flex/DataBindingExample-config.xml
@@ -0,0 +1,23 @@
+<!--
+
+  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>
+    <js-output-optimization>
+        <optimization>skipFunctionCoercions</optimization>
+    </js-output-optimization>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/DataBindingExample_Flat/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataBindingExample_Flat/build.xml b/examples/flexjs/DataBindingExample_Flat/build.xml
index 730b4a3..2540061 100644
--- a/examples/flexjs/DataBindingExample_Flat/build.xml
+++ b/examples/flexjs/DataBindingExample_Flat/build.xml
@@ -22,8 +22,6 @@
 <project name="databindingexample_flat" default="main" basedir=".">
     <property name="FLEXJS_HOME" location="../../.."/>
     <property name="example" value="DataBindingExample" />
-    <property name="theme_arg" value="-theme=${FLEXJS_HOME}/frameworks/libs/Flat.swc" />
-    <property name="opt1_arg" value="-js-output-optimization=skipAsCoercions" />
     
     <property file="${FLEXJS_HOME}/env.properties"/>
     <property environment="env"/>
@@ -32,7 +30,7 @@
     
     <include file="${basedir}/../../build_example.xml" />
     
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/DataBindingExample_Flat/src/main/flex/DataBindingExample-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataBindingExample_Flat/src/main/flex/DataBindingExample-config.xml b/examples/flexjs/DataBindingExample_Flat/src/main/flex/DataBindingExample-config.xml
new file mode 100644
index 0000000..e15c6d5
--- /dev/null
+++ b/examples/flexjs/DataBindingExample_Flat/src/main/flex/DataBindingExample-config.xml
@@ -0,0 +1,28 @@
+<!--
+
+  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>
+    <js-output-optimization>
+        <optimization>skipAsCoercions</optimization>
+    </js-output-optimization>
+    <compiler>
+        <theme>
+            <filename>../../../../../../frameworks/libs/Flat.swc</filename>
+        </theme>
+    </compiler>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/DataBindingExample_as/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataBindingExample_as/build.xml b/examples/flexjs/DataBindingExample_as/build.xml
index 282506d..4c63dab 100644
--- a/examples/flexjs/DataBindingExample_as/build.xml
+++ b/examples/flexjs/DataBindingExample_as/build.xml
@@ -27,11 +27,11 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="opt1_arg" value="-js-output-optimization=skipAsCoercions" />
+    <property name="file_suffix" value="as"/>
     
     <include file="${basedir}/../../build_example.xml" />
     
-    <target name="main" depends="clean,build_example.compileas,build_example.compileasjs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/DataBindingExample_as/src/main/flex/DataBindingExample-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataBindingExample_as/src/main/flex/DataBindingExample-config.xml b/examples/flexjs/DataBindingExample_as/src/main/flex/DataBindingExample-config.xml
new file mode 100644
index 0000000..454808b
--- /dev/null
+++ b/examples/flexjs/DataBindingExample_as/src/main/flex/DataBindingExample-config.xml
@@ -0,0 +1,23 @@
+<!--
+
+  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>
+    <js-output-optimization>
+        <optimization>skipAsCoercions</optimization>
+    </js-output-optimization>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/DataBindingExample_as/src/main/flex/DataBindingExample.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataBindingExample_as/src/main/flex/DataBindingExample.as b/examples/flexjs/DataBindingExample_as/src/main/flex/DataBindingExample.as
index 95609cd..93b30c6 100644
--- a/examples/flexjs/DataBindingExample_as/src/main/flex/DataBindingExample.as
+++ b/examples/flexjs/DataBindingExample_as/src/main/flex/DataBindingExample.as
@@ -126,7 +126,7 @@ public class DataBindingExample extends Application
 			iViewportModel: ViewportModel
         };
 		
-        CONFIG::as_only {
+        COMPILE::SWF {
             o.iBackgroundBead = SolidBackgroundBead;
             o.iBorderBead = SingleLineBorderBead;
         }
@@ -151,7 +151,7 @@ public class DataBindingExample extends Application
             border: [1, "solid", 0x000000],
             padding: 4
         };
-        CONFIG::as_only {
+        COMPILE::SWF {
             o.iBeadView = CSSButtonView;
         }
             
@@ -169,7 +169,7 @@ public class DataBindingExample extends Application
             padding: 4
         };
         
-        CONFIG::as_only {
+        COMPILE::SWF {
             viv["org.apache.flex.html::CheckBox"] =
             {
                 iBeadModel: ToggleButtonModel,
@@ -280,7 +280,7 @@ public class DataBindingExample extends Application
     
     private function makeDefinitionName(s:String):String
     {
-        CONFIG::js_only {
+        COMPILE::JS {
             s = s.replace("::", ".");
         }
         return s;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/DataGridExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DataGridExample/build.xml b/examples/flexjs/DataGridExample/build.xml
index b21cc0f..b9f366a 100644
--- a/examples/flexjs/DataGridExample/build.xml
+++ b/examples/flexjs/DataGridExample/build.xml
@@ -30,25 +30,7 @@
     
     <include file="${basedir}/../../build_example.xml" />
 
-    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FLEXJS_HOME}/js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FALCONJX_HOME}/../js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/js/out/bin/js.swc"/>
-
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     	<mkdir dir="${basedir}/bin/js-debug/assets" />
         <copy todir="${basedir}/bin/js-debug/assets" >
             <fileset dir="${basedir}/src/main/resources/assets">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/DateControlsExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DateControlsExample/build.xml b/examples/flexjs/DateControlsExample/build.xml
index df39239..f92ce92 100644
--- a/examples/flexjs/DateControlsExample/build.xml
+++ b/examples/flexjs/DateControlsExample/build.xml
@@ -30,25 +30,7 @@
     
     <include file="${basedir}/../../build_example.xml" />
 
-    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FLEXJS_HOME}/js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FALCONJX_HOME}/../js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/js/out/bin/js.swc"/>
-
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/DesktopMap/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DesktopMap/build.xml b/examples/flexjs/DesktopMap/build.xml
index 7430444..b790bfe 100644
--- a/examples/flexjs/DesktopMap/build.xml
+++ b/examples/flexjs/DesktopMap/build.xml
@@ -32,6 +32,7 @@
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
     <property name="AIR_HOME" value="${env.AIR_HOME}"/>
+    <property name="config_arg" value="air"/>
     
     <condition property="adl" value="adl.exe">
         <os family="windows"/>
@@ -51,14 +52,10 @@
 
     <include file="${basedir}/../../build_example.xml" />
 
-    <property name="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/google_maps.swc"/>
-    <property name="opt1_arg" value="-remove-circulars" />
-
-    <target name="main" depends="clean,build_example.compileair,build_example.compilejsair" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">
-        <echo>playerglobal.version = ${playerglobal.version}</echo>
         <delete dir="${basedir}/bin" failonerror="false" />
         <delete dir="${basedir}/bin-debug" failonerror="false" />
         <delete dir="${basedir}/bin-release" failonerror="false" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/DesktopMap/src/main/flex/DesktopMap-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DesktopMap/src/main/flex/DesktopMap-config.xml b/examples/flexjs/DesktopMap/src/main/flex/DesktopMap-config.xml
new file mode 100644
index 0000000..0d2aeef
--- /dev/null
+++ b/examples/flexjs/DesktopMap/src/main/flex/DesktopMap-config.xml
@@ -0,0 +1,26 @@
+<!--
+
+  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>
+    <remove-circulars>true</remove-circulars>
+    <compiler>
+        <js-external-library-path append="true">
+            <path-element>../../../../../../js/libs/google_maps.swc</path-element>
+        </js-external-library-path>
+    </compiler>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/FlexJSStore/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore/build.xml b/examples/flexjs/FlexJSStore/build.xml
index 81cd3cb..5e841ec 100644
--- a/examples/flexjs/FlexJSStore/build.xml
+++ b/examples/flexjs/FlexJSStore/build.xml
@@ -27,11 +27,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="opt1_arg" value="-js-output-optimization=skipFunctionCoercions" />
     
     <include file="${basedir}/../../build_example.xml" />
     
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
         <mkdir dir="${basedir}/bin-debug/data" />
         <copy file="${basedir}/src/main/resources/data/catalog.json" tofile="${basedir}/bin-debug/data/catalog.json" />
         <mkdir dir="${basedir}/bin/js-debug/data" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/FlexJSStore/src/main/flex/FlexJSStore-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore/src/main/flex/FlexJSStore-config.xml b/examples/flexjs/FlexJSStore/src/main/flex/FlexJSStore-config.xml
new file mode 100644
index 0000000..b4290dc
--- /dev/null
+++ b/examples/flexjs/FlexJSStore/src/main/flex/FlexJSStore-config.xml
@@ -0,0 +1,23 @@
+<!--
+
+  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>
+    <js-output-optimization>
+        <optimization>skipFunctionCoercions</optimization>
+    </js-output-optimization>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/FlexJSStore/src/main/flex/productsView/ProductCatalogThumbnail.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore/src/main/flex/productsView/ProductCatalogThumbnail.mxml b/examples/flexjs/FlexJSStore/src/main/flex/productsView/ProductCatalogThumbnail.mxml
index 0946f8a..15e78ac 100755
--- a/examples/flexjs/FlexJSStore/src/main/flex/productsView/ProductCatalogThumbnail.mxml
+++ b/examples/flexjs/FlexJSStore/src/main/flex/productsView/ProductCatalogThumbnail.mxml
@@ -101,7 +101,6 @@ limitations under the License.
                 var dragEvent:DragEvent = new DragEvent(DragEvent.DRAG_START, true);
                 dragEvent.clientX = dragStartPoint.x;
                 dragEvent.clientY = dragStartPoint.y;
-                dragEvent.buttonDown = true;
                 dispatchEvent(dragEvent);
 
                 rollOutHandler(event);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/FlexJSStore_jquery/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore_jquery/build.xml b/examples/flexjs/FlexJSStore_jquery/build.xml
index ac61b45..5e841ec 100644
--- a/examples/flexjs/FlexJSStore_jquery/build.xml
+++ b/examples/flexjs/FlexJSStore_jquery/build.xml
@@ -30,26 +30,7 @@
     
     <include file="${basedir}/../../build_example.xml" />
     
-    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/jquery.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FLEXJS_HOME}/js/libs/jquery.swc" type="file" />
-        </and>
-    </condition>
-    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/jquery.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FALCONJX_HOME}/../js/libs/jquery.swc" type="file" />
-        </and>
-    </condition>
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/jquery/out/bin/jquery-1.9.swc"/>
-    <property name="opt1_arg" value="-js-output-optimization=skipFunctionCoercions" />
-    
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
         <mkdir dir="${basedir}/bin-debug/data" />
         <copy file="${basedir}/src/main/resources/data/catalog.json" tofile="${basedir}/bin-debug/data/catalog.json" />
         <mkdir dir="${basedir}/bin/js-debug/data" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/FlexJSStore_jquery/src/main/flex/FlexJSStore-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore_jquery/src/main/flex/FlexJSStore-config.xml b/examples/flexjs/FlexJSStore_jquery/src/main/flex/FlexJSStore-config.xml
new file mode 100644
index 0000000..6036129
--- /dev/null
+++ b/examples/flexjs/FlexJSStore_jquery/src/main/flex/FlexJSStore-config.xml
@@ -0,0 +1,28 @@
+<!--
+
+  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>
+    <js-output-optimization>
+        <optimization>skipFunctionCoercions</optimization>
+    </js-output-optimization>
+    <compiler>
+        <js-external-library-path append="true">
+            <path-element>../../../../../../js/libs/jquery.swc</path-element>
+        </js-external-library-path>
+    </compiler>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/FlexJSStore_jquery/src/main/flex/productsView/ProductCatalogThumbnail.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore_jquery/src/main/flex/productsView/ProductCatalogThumbnail.mxml b/examples/flexjs/FlexJSStore_jquery/src/main/flex/productsView/ProductCatalogThumbnail.mxml
index 0946f8a..15e78ac 100755
--- a/examples/flexjs/FlexJSStore_jquery/src/main/flex/productsView/ProductCatalogThumbnail.mxml
+++ b/examples/flexjs/FlexJSStore_jquery/src/main/flex/productsView/ProductCatalogThumbnail.mxml
@@ -101,7 +101,6 @@ limitations under the License.
                 var dragEvent:DragEvent = new DragEvent(DragEvent.DRAG_START, true);
                 dragEvent.clientX = dragStartPoint.x;
                 dragEvent.clientY = dragStartPoint.y;
-                dragEvent.buttonDown = true;
                 dispatchEvent(dragEvent);
 
                 rollOutHandler(event);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/FlexTeamPage_MDL/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexTeamPage_MDL/build.xml b/examples/flexjs/FlexTeamPage_MDL/build.xml
index e711b0e..e9207c7 100644
--- a/examples/flexjs/FlexTeamPage_MDL/build.xml
+++ b/examples/flexjs/FlexTeamPage_MDL/build.xml
@@ -27,12 +27,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="opt1_arg" value="-compiler.exclude-defaults-css-files=HTML.swc:defaults.css" />
-    <property name="opt2_arg" value="-html-template=${basedir}/src/main/resources/mdl-js-index-template.html" />
 
     <include file="${basedir}/../../build_example.xml" />
     
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
         <mkdir dir="${basedir}/bin/js-debug/assets" />
         <copy todir="${basedir}/bin/js-debug/assets" >
             <fileset dir="${basedir}/src/main/resources/assets">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/FlexTeamPage_MDL/src/main/flex/App-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexTeamPage_MDL/src/main/flex/App-config.xml b/examples/flexjs/FlexTeamPage_MDL/src/main/flex/App-config.xml
new file mode 100644
index 0000000..cba31b7
--- /dev/null
+++ b/examples/flexjs/FlexTeamPage_MDL/src/main/flex/App-config.xml
@@ -0,0 +1,26 @@
+<!--
+
+  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>
+        <exclude-defaults-css-files>
+            <filename>HTML.swc:defaults.css</filename>
+        </exclude-defaults-css-files>
+    </compiler>
+    <html-template>../resources/mdl-js-index-template.html</html-template>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/FlexWebsiteStatsViewer/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexWebsiteStatsViewer/build.xml b/examples/flexjs/FlexWebsiteStatsViewer/build.xml
index 8342b3d..d76519b 100644
--- a/examples/flexjs/FlexWebsiteStatsViewer/build.xml
+++ b/examples/flexjs/FlexWebsiteStatsViewer/build.xml
@@ -30,8 +30,7 @@
     
     <include file="${basedir}/../../build_example.xml" />
     
-<!-- temp remove build_example.compilejs -->
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/HelloWorld/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/HelloWorld/build.xml b/examples/flexjs/HelloWorld/build.xml
index 977e66f..797a98a 100644
--- a/examples/flexjs/HelloWorld/build.xml
+++ b/examples/flexjs/HelloWorld/build.xml
@@ -30,7 +30,7 @@
 
     <include file="${basedir}/../../build_example.xml" />
     
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/ListExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/ListExample/build.xml b/examples/flexjs/ListExample/build.xml
index 645d79c..0cb3a20 100644
--- a/examples/flexjs/ListExample/build.xml
+++ b/examples/flexjs/ListExample/build.xml
@@ -30,25 +30,7 @@
     
     <include file="${basedir}/../../build_example.xml" />
 
-    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FLEXJS_HOME}/js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FALCONJX_HOME}/../js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/js/out/bin/js.swc"/>
-
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/MDLExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/build.xml b/examples/flexjs/MDLExample/build.xml
index 226b10d..7c94681 100644
--- a/examples/flexjs/MDLExample/build.xml
+++ b/examples/flexjs/MDLExample/build.xml
@@ -27,12 +27,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="opt1_arg" value="-compiler.exclude-defaults-css-files=HTML.swc:defaults.css" />
-    <property name="opt2_arg" value="-html-template=${basedir}/src/main/resources/mdl-js-index-template.html" />
 
     <include file="${basedir}/../../build_example.xml" />
     
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
         <mkdir dir="${basedir}/bin/js-debug/assets" />
         <copy todir="${basedir}/bin/js-debug/assets" >
             <fileset dir="${basedir}/src/main/resources/assets">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/MDLExample/src/main/flex/App-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/App-config.xml b/examples/flexjs/MDLExample/src/main/flex/App-config.xml
new file mode 100644
index 0000000..cba31b7
--- /dev/null
+++ b/examples/flexjs/MDLExample/src/main/flex/App-config.xml
@@ -0,0 +1,26 @@
+<!--
+
+  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>
+        <exclude-defaults-css-files>
+            <filename>HTML.swc:defaults.css</filename>
+        </exclude-defaults-css-files>
+    </compiler>
+    <html-template>../resources/mdl-js-index-template.html</html-template>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/MapSearch/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MapSearch/build.xml b/examples/flexjs/MapSearch/build.xml
index c812942..5643fab 100644
--- a/examples/flexjs/MapSearch/build.xml
+++ b/examples/flexjs/MapSearch/build.xml
@@ -32,6 +32,7 @@
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
     
     <property name="AIR_HOME" value="${env.AIR_HOME}"/>
+    <property name="config_arg" value="air"/>
     
     <condition property="adl" value="adl.exe">
         <os family="windows"/>
@@ -51,30 +52,10 @@
 
     <include file="${basedir}/../../build_example.xml" />
 
-    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/google_maps.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FLEXJS_HOME}/js/libs/google_maps.swc" type="file" />
-        </and>
-    </condition>
-    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/google_maps.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FALCONJX_HOME}/../js/libs/google_maps.swc" type="file" />
-        </and>
-    </condition>
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/google_maps/out/bin/google_maps.swc"/>
-    <property name="opt1_arg" value="-remove-circulars" />
-
-    <target name="main" depends="clean,build_example.compilejsair" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">
-        <echo>playerglobal.version = ${playerglobal.version}</echo>
         <delete dir="${basedir}/bin" failonerror="false" />
         <delete dir="${basedir}/bin-debug" failonerror="false" />
         <delete dir="${basedir}/bin-release" failonerror="false" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/MapSearch/src/main/flex/MapSearch-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MapSearch/src/main/flex/MapSearch-config.xml b/examples/flexjs/MapSearch/src/main/flex/MapSearch-config.xml
new file mode 100644
index 0000000..0d2aeef
--- /dev/null
+++ b/examples/flexjs/MapSearch/src/main/flex/MapSearch-config.xml
@@ -0,0 +1,26 @@
+<!--
+
+  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>
+    <remove-circulars>true</remove-circulars>
+    <compiler>
+        <js-external-library-path append="true">
+            <path-element>../../../../../../js/libs/google_maps.swc</path-element>
+        </js-external-library-path>
+    </compiler>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/MobileMap/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileMap/build.xml b/examples/flexjs/MobileMap/build.xml
index ce2e376..2ce8d9d 100644
--- a/examples/flexjs/MobileMap/build.xml
+++ b/examples/flexjs/MobileMap/build.xml
@@ -29,29 +29,11 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="opt1_arg" value="-remove-circulars" />
+    <property name="config_arg" value="air" />
     
     <include file="${basedir}/../../build_example.xml" />
 
-    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/google_maps.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FLEXJS_HOME}/js/libs/google_maps.swc" type="file" />
-        </and>
-    </condition>
-    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/google_maps.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FALCONJX_HOME}/../js/libs/google_maps.swc" type="file" />
-        </and>
-    </condition>
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/js/out/bin/google_maps.swc"/>
-
-    <target name="main" depends="clean,build_example.compileair,build_example.compilejsair" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="cordova" description="Executes the Cordova build script to create Cordova app">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/MobileMap/src/main/flex/MobileMap-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileMap/src/main/flex/MobileMap-config.xml b/examples/flexjs/MobileMap/src/main/flex/MobileMap-config.xml
new file mode 100644
index 0000000..0d2aeef
--- /dev/null
+++ b/examples/flexjs/MobileMap/src/main/flex/MobileMap-config.xml
@@ -0,0 +1,26 @@
+<!--
+
+  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>
+    <remove-circulars>true</remove-circulars>
+    <compiler>
+        <js-external-library-path append="true">
+            <path-element>../../../../../../js/libs/google_maps.swc</path-element>
+        </js-external-library-path>
+    </compiler>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/MobileStocks/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileStocks/build.xml b/examples/flexjs/MobileStocks/build.xml
index 62d465e..28b1e4b 100644
--- a/examples/flexjs/MobileStocks/build.xml
+++ b/examples/flexjs/MobileStocks/build.xml
@@ -32,6 +32,7 @@
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
     <property name="AIR_HOME" value="${env.AIR_HOME}"/>
+    <property name="config_arg" value="air"/>
     
     <condition property="adl" value="adl.exe">
         <os family="windows"/>
@@ -51,31 +52,10 @@
 
     <include file="${basedir}/../../build_example.xml" />
 
-    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/cordova.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FLEXJS_HOME}/js/libs/cordova.swc" type="file" />
-        </and>
-    </condition>
-    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/cordova.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FALCONJX_HOME}/../js/libs/cordova.swc" type="file" />
-        </and>
-    </condition>
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/cordova/out/bin/cordova.swc"/>
-    <property name="opt1_arg" value="-remove-circulars" />
-
-<!-- build_example.compileair, -->
-    <target name="main" depends="clean,build_example.compileair,build_example.compilejsair" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">
-        <echo>playerglobal.version = ${playerglobal.version}</echo>
         <delete dir="${basedir}/bin" failonerror="false" />
         <delete dir="${basedir}/bin-debug" failonerror="false" />
         <delete dir="${basedir}/bin-release" failonerror="false" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/MobileTrader/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileTrader/build.xml b/examples/flexjs/MobileTrader/build.xml
index cb69a25..e331b36 100644
--- a/examples/flexjs/MobileTrader/build.xml
+++ b/examples/flexjs/MobileTrader/build.xml
@@ -26,29 +26,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="opt1_arg" value="-remove-circulars" />
     
     <include file="${basedir}/../../build_example.xml" />
 
-    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FLEXJS_HOME}/js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FALCONJX_HOME}/../js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/js/out/bin/js.swc"/>
-
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/MobileTrader/src/main/flex/MobileTrader-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MobileTrader/src/main/flex/MobileTrader-config.xml b/examples/flexjs/MobileTrader/src/main/flex/MobileTrader-config.xml
new file mode 100644
index 0000000..a8b73f5
--- /dev/null
+++ b/examples/flexjs/MobileTrader/src/main/flex/MobileTrader-config.xml
@@ -0,0 +1,21 @@
+<!--
+
+  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>
+    <remove-circulars>true</remove-circulars>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/StorageExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/StorageExample/build.xml b/examples/flexjs/StorageExample/build.xml
index 73ccdd7..a93bf25 100644
--- a/examples/flexjs/StorageExample/build.xml
+++ b/examples/flexjs/StorageExample/build.xml
@@ -32,6 +32,7 @@
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
     <property name="AIR_HOME" value="${env.AIR_HOME}"/>
+    <property name="config_arg" value="air" />
     
     <condition property="adl" value="adl.exe">
         <os family="windows"/>
@@ -51,31 +52,10 @@
 
     <include file="${basedir}/../../build_example.xml" />
 
-    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/cordova.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FLEXJS_HOME}/js/libs/cordova.swc" type="file" />
-        </and>
-    </condition>
-    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/cordova.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FALCONJX_HOME}/../js/libs/cordova.swc" type="file" />
-        </and>
-    </condition>
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/cordova/out/bin/cordova.swc"/>
-    <property name="opt1_arg" value="-remove-circulars" />
-
-<!-- build_example.compileair, -->
-    <target name="main" depends="clean,build_example.compileair,build_example.compilejsair" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">
-        <echo>playerglobal.version = ${playerglobal.version}</echo>
         <delete dir="${basedir}/bin" failonerror="false" />
         <delete dir="${basedir}/bin-debug" failonerror="false" />
         <delete dir="${basedir}/bin-release" failonerror="false" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/StorageExample/src/main/flex/StorageExample-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/StorageExample/src/main/flex/StorageExample-config.xml b/examples/flexjs/StorageExample/src/main/flex/StorageExample-config.xml
new file mode 100644
index 0000000..a165dee
--- /dev/null
+++ b/examples/flexjs/StorageExample/src/main/flex/StorageExample-config.xml
@@ -0,0 +1,26 @@
+<!--
+
+  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>
+    <remove-circulars>true</remove-circulars>
+    <compiler>
+        <js-external-library-path append="true">
+            <path-element>../../../../../../js/libs/cordova.swc</path-element>
+        </js-external-library-path>
+    </compiler>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/StyleExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/StyleExample/build.xml b/examples/flexjs/StyleExample/build.xml
index c9de1d0..09add5a 100644
--- a/examples/flexjs/StyleExample/build.xml
+++ b/examples/flexjs/StyleExample/build.xml
@@ -27,11 +27,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="opt1_arg" value="-js-output-optimization=skipAsCoercions" />
 
     <include file="${basedir}/../../build_example.xml" />
     
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/StyleExample/src/main/flex/StyleExample-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/StyleExample/src/main/flex/StyleExample-config.xml b/examples/flexjs/StyleExample/src/main/flex/StyleExample-config.xml
new file mode 100644
index 0000000..454808b
--- /dev/null
+++ b/examples/flexjs/StyleExample/src/main/flex/StyleExample-config.xml
@@ -0,0 +1,23 @@
+<!--
+
+  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>
+    <js-output-optimization>
+        <optimization>skipAsCoercions</optimization>
+    </js-output-optimization>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/TeamPage/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/TeamPage/build.xml b/examples/flexjs/TeamPage/build.xml
index 7b9ed5f..add4117 100644
--- a/examples/flexjs/TeamPage/build.xml
+++ b/examples/flexjs/TeamPage/build.xml
@@ -26,29 +26,10 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="opt1_arg" value="-remove-circulars" />
     
     <include file="${basedir}/../../build_example.xml" />
 
-    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FLEXJS_HOME}/js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FALCONJX_HOME}/../js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/js/out/bin/js.swc"/>
-
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     	<copy file="${basedir}/src/main/resources/team.json" tofile="${basedir}/bin-debug/team.json" />
         <copy file="${basedir}/src/main/resources/team.json" tofile="${basedir}/bin/js-debug/team.json" />
         <copy file="${basedir}/src/main/resources/team.json" tofile="${basedir}/bin/js-release/team.json" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/TeamPage/src/main/flex/TeamPage-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/TeamPage/src/main/flex/TeamPage-config.xml b/examples/flexjs/TeamPage/src/main/flex/TeamPage-config.xml
new file mode 100644
index 0000000..a8b73f5
--- /dev/null
+++ b/examples/flexjs/TeamPage/src/main/flex/TeamPage-config.xml
@@ -0,0 +1,21 @@
+<!--
+
+  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>
+    <remove-circulars>true</remove-circulars>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/TodoListSampleApp/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/TodoListSampleApp/build.xml b/examples/flexjs/TodoListSampleApp/build.xml
index 9c10a0d..ea5d145 100644
--- a/examples/flexjs/TodoListSampleApp/build.xml
+++ b/examples/flexjs/TodoListSampleApp/build.xml
@@ -25,16 +25,11 @@
     <property environment="env"/>
     <property file="${FLEXJS_HOME}/build.properties"/>
     <property name="FLEX_HOME" value="${FLEXJS_HOME}"/>
-    <property name="opt1_arg" value="-js-output-optimization=skipAsCoercions" />
 
     <include file="${basedir}/../../build_example.xml" />
     
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
-    <!-- Uncomment to reproduce cross-compilation error in compilejs step
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
-    </target>
-    -->
     
     <target name="clean">
         <delete dir="${basedir}/bin" failonerror="false" />

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/TodoListSampleApp/src/main/flex/TodoListSampleApp-config.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/TodoListSampleApp/src/main/flex/TodoListSampleApp-config.xml b/examples/flexjs/TodoListSampleApp/src/main/flex/TodoListSampleApp-config.xml
new file mode 100644
index 0000000..454808b
--- /dev/null
+++ b/examples/flexjs/TodoListSampleApp/src/main/flex/TodoListSampleApp-config.xml
@@ -0,0 +1,23 @@
+<!--
+
+  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>
+    <js-output-optimization>
+        <optimization>skipAsCoercions</optimization>
+    </js-output-optimization>
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/333e201a/examples/flexjs/TreeExample/build.xml
----------------------------------------------------------------------
diff --git a/examples/flexjs/TreeExample/build.xml b/examples/flexjs/TreeExample/build.xml
index 9e0d8f5..db2f622 100644
--- a/examples/flexjs/TreeExample/build.xml
+++ b/examples/flexjs/TreeExample/build.xml
@@ -30,25 +30,7 @@
     
     <include file="${basedir}/../../build_example.xml" />
 
-    <condition property="extlib_arg" value="-external-library-path=${FLEXJS_HOME}/js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FLEXJS_HOME}/js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <condition property="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../js/libs/js.swc" >
-        <and>
-            <not>
-                <isset property="extlib_arg" />
-            </not>
-            <available file="${FALCONJX_HOME}/../js/libs/js.swc" type="file" />
-        </and>
-    </condition>
-    <property name="extlib_arg" value="-external-library-path=${FALCONJX_HOME}/../externs/js/out/bin/js.swc"/>
-
-    <target name="main" depends="clean,build_example.compile,build_example.compilejs" description="Clean build of ${example}">
+    <target name="main" depends="clean,build_example.compile" description="Clean build of ${example}">
     </target>
     
     <target name="clean">