flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject [43/49] git commit: [flex-asjs] [refs/heads/feature-autobuild/maven-archetypes] - Modified the cordova-build.xml ANT script to include the iOS platform. Once built, apps can be launched with the run.android or run.ios targets. The former runs on the devi
Date Fri, 21 Oct 2016 09:07:56 GMT
Modified the cordova-build.xml ANT script to include the iOS platform. Once built, apps can
be launched with the run.android or run.ios targets. The former runs on the device while the
latter runs in a simulator.


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

Branch: refs/heads/feature-autobuild/maven-archetypes
Commit: 3292ce3415274786e61d537e0cc44723e56c3f4b
Parents: f25cfe8
Author: Peter Ent <pent@apache.org>
Authored: Wed Oct 19 14:48:43 2016 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Wed Oct 19 14:48:43 2016 -0400

----------------------------------------------------------------------
 cordova-build.xml | 44 +++++++++++++++++++++++++++-----------------
 1 file changed, 27 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/3292ce34/cordova-build.xml
----------------------------------------------------------------------
diff --git a/cordova-build.xml b/cordova-build.xml
index e224d2e..707e61a 100644
--- a/cordova-build.xml
+++ b/cordova-build.xml
@@ -39,7 +39,7 @@
 	     
 	-->
 	
-	<target name="main" depends="create, compilejs, copyfiles" description="Creates the Cordova
app if needed, compiles the FlexJS app, copies the results to Cordova app">
+	<target name="main" depends="create, copyfiles" description="Creates the Cordova app
if needed, compiles the FlexJS app, copies the results to Cordova app">
 	</target>
 	
 	<!-- Set up properties and conditions -->
@@ -56,12 +56,16 @@
     	</not>
     </condition>
 	
-	<!-- override with -Dplatform=other-platform-name -->
-	<condition property="platform" value="android">
+	<condition property="platform.android" value="android">
 		<not>
-			<isset property="platform" />
+			<isset property="platform.android" />
 		</not>
     </condition>
+    <condition property="platform.ios" value="ios">
+    	<not>
+    		<isset property="platform.ios" />
+    	</not>
+    </condition>
     
 	<!-- override with -Dappname=other-app-name -->
 	<basename property="directory.name" file="${projectdir}" />
@@ -95,6 +99,8 @@
 		<exec executable="${cordova.executable}" dir="${projectdir}/app">
 			<arg value="create" />
 			<arg value="${appname}" />
+			<arg value="org.apache.flex.examples.${appname}" />
+			<arg value="${appname}" />
 		</exec>
 		
 		<echo>Adding in platform(s). This may take awhile.</echo>
@@ -103,17 +109,13 @@
 		<exec executable="${cordova.executable}" dir="${cordova.target.dir}">
 			<arg value="platform" />
 			<arg value="add" />
-			<arg value="${platform}" />
+			<arg value="${platform.android}" />
+		</exec>
+		<exec executable="${cordova.executable}" dir="${cordova.target.dir}">
+			<arg value="platform" />
+			<arg value="add" />
+			<arg value="${platform.ios}" />
 		</exec>
-    </target>
-    
-    <!-- Compile the FlexJS application -->
-    
-    <target name="compilejs" description="Compiles the FlexJS app into JavaScript">
-    	<echo message="Compiling FlexJS app" />
-    	<exec executable="mxmlc" dir="${projectdir}/src">
-    		<arg value="${appname}.mxml" />
-    	</exec>
     </target>
     
     <!-- Clean www directory -->
@@ -137,11 +139,19 @@
     	Running the app on the platform
     -->
     
-    <target name="run" description="Runs the Cordova application on the specified platform">
-    	<echo message="Launching ${appname} on platform ${platform}" />
+    <target name="run.android" description="Runs the Cordova application on the specified
platform">
+    	<echo message="Launching ${appname} on platform ${platform.android}" />
+    	<exec executable="cordova" dir="${cordova.target.dir}">
+    		<arg value="run" />
+    		<arg value="${platform.android}" />
+    	</exec>
+    </target>
+    
+    <target name="run.ios" description="Runs the Cordova application on the specified
platform">
+    	<echo message="Launching ${appname} on platform ${platform.ios}" />
     	<exec executable="cordova" dir="${cordova.target.dir}">
     		<arg value="run" />
-    		<arg value="${platform}" />
+    		<arg value="${platform.ios}" />
     	</exec>
     </target>
     


Mime
View raw message