Added cordova to externs.
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/8d8b2f2e Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/8d8b2f2e Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/8d8b2f2e Branch: refs/heads/master Commit: 8d8b2f2e92843a2221ceb7f2e00ae84c3f581a09 Parents: 5ff0219 Author: Peter Ent <p...@apache.org> Authored: Wed Mar 9 10:53:14 2016 -0500 Committer: Peter Ent <p...@apache.org> Committed: Wed Mar 9 10:53:14 2016 -0500 ---------------------------------------------------------------------- build.xml | 24 ++++++++++- externs/cordova/build.xml | 42 +++++++++++++++++++ externs/cordova/compile-config.xml | 44 ++++++++++++++++++++ externs/cordova/cordova-compile-config.xml | 39 +++++++++++++++++ .../cordova/externs/cordova_file_plugin-4-11.js | 26 ++++++++++++ 5 files changed, 173 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8d8b2f2e/build.xml ---------------------------------------------------------------------- diff --git a/build.xml b/build.xml index ad753f1..75a2c9d 100644 --- a/build.xml +++ b/build.xml @@ -581,8 +581,8 @@ </target> - <target name="extern.swcs" depends="externc.js.swc, externc.jquery.swc, externc.jasmine.swc, externc.GCL.swc, externc.createjs.swc, externc.google_maps.swc, externc.node.swc" /> - <target name="extern.swcs.clean" depends="externc.js.swc.clean, externc.jquery.swc.clean, externc.jasmine.swc.clean, externc.GCL.swc.clean, externc.createjs.swc.clean, externc.google_maps.swc.clean, externc.node.swc.clean" /> + <target name="extern.swcs" depends="externc.js.swc, externc.cordova.swc, externc.jquery.swc, externc.jasmine.swc, externc.GCL.swc, externc.createjs.swc, externc.google_maps.swc, externc.node.swc" /> + <target name="extern.swcs.clean" depends="externc.js.swc.clean, externc.cordova.swc.clean, externc.jquery.swc.clean, externc.jasmine.swc.clean, externc.GCL.swc.clean, externc.createjs.swc.clean, externc.google_maps.swc.clean, externc.node.swc.clean" /> <target name="extern.swcs.wipe" depends="extern.swcs.clean" > <delete failonerror="false" includeEmptyDirs="true" > <fileset dir="${basedir}/externs/js"> @@ -611,6 +611,9 @@ <target name="externc.js.swc.clean" > <delete dir="${basedir}/externs/js/out" failonerror="false" includeEmptyDirs="true"/> </target> + <target name="externc.cordova.swc.clean" > + <delete dir="${basedir}/externs/cordova/out" failonerror="false" includeEmptyDirs="true"/> + </target> <target name="externc.jquery.swc.clean" > <delete dir="${basedir}/externs/jquery/out" failonerror="false" includeEmptyDirs="true"/> </target> @@ -679,6 +682,22 @@ </java> </target> + <target name="externc.cordova.swc" > + <java jar="${basedir}/compiler.jx/lib/externc.jar" fork="true" + failonerror="false"> + <arg value="+flexlib=externs" /> + <arg value="-debug" /> + <arg value="-load-config=${basedir}/externs/cordova/cordova-compile-config.xml" /> + </java> + <java jar="${basedir}/compiler/generated/dist/sdk/lib/falcon-compc.jar" fork="true" + failonerror="true"> + <arg value="+flexlib=externs/frameworks" /> + <arg value="-debug" /> + <arg value="-load-config=${basedir}/externs/cordova/compile-config.xml" /> + <arg value="-output=${basedir}/externs/cordova/out/bin/cordova.swc" /> + </java> + </target> + <target name="externc.jquery.swc" > <java jar="${basedir}/compiler.jx/lib/externc.jar" fork="true" failonerror="false"> @@ -872,6 +891,7 @@ <!-- generated --> <mkdir dir="${basedir}/temp/js/libs"/> <copy tofile="${basedir}/temp/js/libs/js.swc" file="${basedir}/externs/js/out/bin/js.swc" /> + <copy tofile="${basedir}/temp/js/libs/cordova.swc" file="${basedir}/externs/cordova/out/bin/cordova.swc" /> <copy tofile="${basedir}/temp/js/libs/jquery.swc" file="${basedir}/externs/jquery/out/bin/jquery-1.9.swc" /> <copy tofile="${basedir}/temp/js/libs/GCL.swc" file="${basedir}/externs/GCL/out/bin/GCL.swc" /> <copy tofile="${basedir}/temp/js/libs/node.swc" file="${basedir}/externs/node/out/bin/node.swc" /> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8d8b2f2e/externs/cordova/build.xml ---------------------------------------------------------------------- diff --git a/externs/cordova/build.xml b/externs/cordova/build.xml new file mode 100644 index 0000000..c95119e --- /dev/null +++ b/externs/cordova/build.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" ?> + +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> + +<project name="cordova" default="main" basedir="."> + + <property name="cordova.version" value="4.11" /> + + <target name="main" depends="preprocess" /> + + <!-- we need to insert a line near the beginning of the file to make the + compiler happy. --> + <target name="preprocess"> + <antcall target="preprocessfile" > + <param name="file" value="cordova_file_plugin-4-11.js" /> + </antcall> + </target> + + <target name="preprocessfile" > + <basename property="file.base" file="${file}" suffix=".js"/> + <echo>file.base is ${file.base}</echo> + <replace file="${basedir}/externs/${file}" token="// Namespace" value="/** @const */" /> + </target> + +</project> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8d8b2f2e/externs/cordova/compile-config.xml ---------------------------------------------------------------------- diff --git a/externs/cordova/compile-config.xml b/externs/cordova/compile-config.xml new file mode 100644 index 0000000..def8957 --- /dev/null +++ b/externs/cordova/compile-config.xml @@ -0,0 +1,44 @@ +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> +<flex-config> + + <compiler> + <accessible>true</accessible> + + <external-library-path> + <path-element>../js/out/bin/js.swc</path-element> + </external-library-path> + + <source-path> + <path-element>out/as/constants</path-element> + </source-path> + + <warn-no-constructor>false</warn-no-constructor> + </compiler> + + <include-sources> + <path-element>out/as/constants</path-element> + </include-sources> + + <include-file> + <name>externs/cordova_file_plugin-4-11.js</name> + <path>externs/cordova_file_plugin-4-11.js</path> + </include-file> + +</flex-config> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8d8b2f2e/externs/cordova/cordova-compile-config.xml ---------------------------------------------------------------------- diff --git a/externs/cordova/cordova-compile-config.xml b/externs/cordova/cordova-compile-config.xml new file mode 100644 index 0000000..d2e3dcb --- /dev/null +++ b/externs/cordova/cordova-compile-config.xml @@ -0,0 +1,39 @@ +<!-- + + 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</name></exclude> you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> +<flex-config> + + <compiler> + <accessible>true</accessible> + + <locale/> + + <source-path> + <path-element>src</path-element> + </source-path> + + <warn-no-constructor>false</warn-no-constructor> + </compiler> + + <external> + <path-element>externs/cordova_file_plugin-4-11.js</path-element> + </external> + + <as-root>out/as</as-root> + +</flex-config> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/8d8b2f2e/externs/cordova/externs/cordova_file_plugin-4-11.js ---------------------------------------------------------------------- diff --git a/externs/cordova/externs/cordova_file_plugin-4-11.js b/externs/cordova/externs/cordova_file_plugin-4-11.js new file mode 100644 index 0000000..96c6a5f --- /dev/null +++ b/externs/cordova/externs/cordova_file_plugin-4-11.js @@ -0,0 +1,26 @@ +/* + * Licensed 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. + */ +/** + * @fileoverview Definitions for objects in the Apache Cordova project: + * https://cordova.apache.org + * + * @externs + */ + + +/** + * @type {!Object} + * @const + */ +var cordova;