You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2016/10/21 09:07:57 UTC
[44/49] git commit: [flex-asjs]
[refs/heads/feature-autobuild/maven-archetypes] - Now loads the
cordoba-plugin-file if needed.
Now loads the cordoba-plugin-file if needed.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b7021112
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b7021112
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b7021112
Branch: refs/heads/feature-autobuild/maven-archetypes
Commit: b7021112344aee4de354f25f3abc4bae4e381def
Parents: 3292ce3
Author: Peter Ent <pe...@apache.org>
Authored: Wed Oct 19 16:44:45 2016 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Wed Oct 19 16:44:45 2016 -0400
----------------------------------------------------------------------
cordova-build.xml | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b7021112/cordova-build.xml
----------------------------------------------------------------------
diff --git a/cordova-build.xml b/cordova-build.xml
index 707e61a..1f78da8 100644
--- a/cordova-build.xml
+++ b/cordova-build.xml
@@ -139,7 +139,21 @@
Running the app on the platform
-->
- <target name="run.android" description="Runs the Cordova application on the specified platform">
+ <target name="check-fileplugin">
+ <property name="storage.file" value="${projectdir}/bin/js-debug/org/apache/flex/storage/IPermanentStorage.js" />
+ <available file="${storage.file}" type="file" property="file.plugin.needed" />
+ </target>
+
+ <target name="load-fileplugin" depends="check-fileplugin" if="file.plugin.needed">
+ <echo message="Loading cordova file-plugin" />
+ <exec executable="cordova" dir="${cordova.target.dir}">
+ <arg value="plugin" />
+ <arg value="add" />
+ <arg value="cordova-plugin-file" />
+ </exec>
+ </target>
+
+ <target name="run.android" depends="load-fileplugin" 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" />
@@ -147,7 +161,7 @@
</exec>
</target>
- <target name="run.ios" description="Runs the Cordova application on the specified platform">
+ <target name="run.ios" depends="load-fileplugin" 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" />