You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2015/12/08 21:47:56 UTC

git commit: [flex-falcon] [refs/heads/develop] - Added google_maps API to JavaScript externs.

Repository: flex-falcon
Updated Branches:
  refs/heads/develop 616a87802 -> c8581c9f4


Added google_maps API to JavaScript 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/c8581c9f
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/c8581c9f
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/c8581c9f

Branch: refs/heads/develop
Commit: c8581c9f472e10c1fcf578ccbeeb5633280525df
Parents: 616a878
Author: Peter Ent <pe...@apache.org>
Authored: Tue Dec 8 15:47:52 2015 -0500
Committer: Peter Ent <pe...@apache.org>
Committed: Tue Dec 8 15:47:52 2015 -0500

----------------------------------------------------------------------
 build.xml                                       | 24 ++++-
 compiler.jx/downloads.xml                       |  2 +
 externs/google_maps/build.xml                   | 57 ++++++++++++
 externs/google_maps/compile-config.xml          | 97 ++++++++++++++++++++
 .../google_maps/google_maps-compile-config.xml  | 39 ++++++++
 5 files changed, 217 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c8581c9f/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 73a079b..e000d25 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" />
-    <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" />
+    <target name="extern.swcs" depends="externc.js.swc, externc.jquery.swc, externc.jasmine.swc, externc.GCL.swc, externc.createjs.swc, externc.google_maps.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" />
     <target name="extern.swcs.wipe" depends="extern.swcs.clean" >
         <delete failonerror="false" includeEmptyDirs="true" >
             <fileset dir="${basedir}/externs/js">
@@ -623,6 +623,9 @@
     <target name="externc.createjs.swc.clean" >
         <delete dir="${basedir}/externs/createjs/out" failonerror="false" includeEmptyDirs="true"/>
     </target>
+    <target name="externc.google_maps.swc.clean" >
+        <delete dir="${basedir}/externs/google_maps/out" failonerror="false" includeEmptyDirs="true"/>
+    </target>
     
     <target name="externc.js.swc" >
         <java jar="${basedir}/compiler.jx/lib/externc.jar" fork="true"
@@ -728,6 +731,23 @@
         </java>
     </target>
     
+    <target name="externc.google_maps.swc" >
+        <ant dir="${basedir}/externs/google_maps" />
+        <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/google_maps/google_maps-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/google_maps/compile-config.xml" />
+            <arg value="-output=${basedir}/externs/google_maps/out/bin/google_maps.swc" />
+        </java>
+    </target>
+    
     <target name="binary-package"
         description="Package binary files in zip and tar-gzip file.">
         

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c8581c9f/compiler.jx/downloads.xml
----------------------------------------------------------------------
diff --git a/compiler.jx/downloads.xml b/compiler.jx/downloads.xml
index d248f6e..3de1d19 100644
--- a/compiler.jx/downloads.xml
+++ b/compiler.jx/downloads.xml
@@ -252,10 +252,12 @@
     <mkdir dir="${basedir}/../externs/js/externs" />
     <mkdir dir="${basedir}/../externs/jquery/externs" />
     <mkdir dir="${basedir}/../externs/jasmine/externs" />
+    <mkdir dir="${basedir}/../externs/google_maps/externs" />
     <unzip src="${download.dir}/temp/externs/externs.zip" dest="${basedir}/../externs/js/externs" />
     <get src="https://closureidl.googlecode.com/files/svg.js" dest="${basedir}/../externs/js/externs/svg.js"/>
     <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/jquery-1.9.js" dest="${basedir}/../externs/jquery/externs/jquery-1.9.js"/>
     <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/jasmine-2.0.js" dest="${basedir}/../externs/jasmine/externs/jasmine-2.0.js"/>
+    <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/maps/google_maps_api_v3_11.js" dest="${basedir}/../externs/google_maps/externs/google_maps_api_v3_11.js"/>
   </target>
 
   <target name="download-dependency-jar" if="project.download.jar" description="Downloads a jar to the lib directory.">

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c8581c9f/externs/google_maps/build.xml
----------------------------------------------------------------------
diff --git a/externs/google_maps/build.xml b/externs/google_maps/build.xml
new file mode 100644
index 0000000..6cefc42
--- /dev/null
+++ b/externs/google_maps/build.xml
@@ -0,0 +1,57 @@
+<?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="google_maps" default="main" basedir=".">
+    
+    <property name="google_maps.version" value="3.11" />
+    
+    <target name="main" depends="download, preprocess" />
+    
+    <target name="download" >
+        <!--mkdir dir="${basedir}/in" />
+        <get src="https://github.com/CreateJS/EaselJS/archive/${createjs.version}.zip"
+            dest="${basedir}/in/${createjs.version}.zip" /-->
+    </target>
+
+    <!-- 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="google_maps_api_v3_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 */" />
+        <replace file="${basedir}/externs/${file}">
+        	<replacetoken>google.maps = {};</replacetoken>
+        	<replacevalue><![CDATA[
+/** @const */
+var google = {};
+
+/** @const */
+google.maps = {};]]></replacevalue>
+        </replace>
+    </target>
+    
+</project>

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c8581c9f/externs/google_maps/compile-config.xml
----------------------------------------------------------------------
diff --git a/externs/google_maps/compile-config.xml b/externs/google_maps/compile-config.xml
new file mode 100644
index 0000000..ff0d4fc
--- /dev/null
+++ b/externs/google_maps/compile-config.xml
@@ -0,0 +1,97 @@
+<!--
+
+  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>${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc</path-element>
+            <path-element>../../libs/framework.swc</path-element>
+            <path-element>../../libs/mx/mx.swc</path-element>
+            <path-element>../../libs/osmf.swc</path-element>
+            <path-element>../../libs/textLayout.swc</path-element>
+        </external-library-path>
+        
+        <keep-as3-metadata>
+            <name>SkinPart</name>
+        </keep-as3-metadata>
+        
+        <mxml>
+            <minimum-supported-version>4.0.0</minimum-supported-version>
+        </mxml>
+        
+        <locale/>
+        
+        <library-path/>
+        
+        <namespaces>
+            <namespace>
+                <uri>library://ns.adobe.com/flex/spark</uri>
+                <manifest>manifest.xml</manifest>
+            </namespace>
+        </namespaces>
+        -->
+		
+        <external-library-path>
+            <path-element>../js/out/bin/js.swc</path-element>
+        </external-library-path>
+		
+        <source-path>
+            <path-element>out/as/classes</path-element>
+            <path-element>out/as/interfaces</path-element>
+        </source-path>
+        
+        <warn-no-constructor>false</warn-no-constructor>
+    </compiler>
+    
+    <include-sources>
+        <path-element>out/as/classes</path-element>
+        <path-element>out/as/interfaces</path-element>
+    </include-sources>
+
+    <include-file>
+        <name>externs/google_maps_api_v3_11.js</name>
+        <path>externs/google_maps_api_v3_11.js</path>
+    </include-file>
+
+    <!--
+    <include-file>
+        <name>defaults.css</name>
+        <path>defaults.css</path>
+    </include-file>
+    <include-file>
+        <name>assets/ErrorIndicator.png</name>
+        <path>assets/ErrorIndicator.png</path>
+    </include-file>
+    <include-file>
+        <name>assets/RequiredIndicator.png</name>
+        <path>assets/RequiredIndicator.png</path>
+    </include-file>
+    
+    <include-namespaces>
+        <uri>library://ns.adobe.com/flex/spark</uri>
+    </include-namespaces>  
+    
+    <resource-bundle-list>bundles.properties</resource-bundle-list>
+    
+    <target-player>${playerglobal.version}</target-player>
+     -->
+</flex-config>

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/c8581c9f/externs/google_maps/google_maps-compile-config.xml
----------------------------------------------------------------------
diff --git a/externs/google_maps/google_maps-compile-config.xml b/externs/google_maps/google_maps-compile-config.xml
new file mode 100644
index 0000000..ef14738
--- /dev/null
+++ b/externs/google_maps/google_maps-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/google_maps_api_v3_11.js</path-element>
+    </external>
+    
+    <as-root>out/as</as-root>
+
+</flex-config>