flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject [19/50] [abbrv] flex-typedefs git commit: convert google_maps to use patches
Date Sun, 17 Jul 2016 16:49:51 GMT
convert google_maps to use patches


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

Branch: refs/heads/master
Commit: c8a2c3e5b18336c3b246e40a037ad78ba5b9cee2
Parents: eae676d
Author: Alex Harui <aharui@apache.org>
Authored: Mon May 23 15:15:06 2016 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue May 24 21:05:59 2016 -0700

----------------------------------------------------------------------
 google_maps/build.xml                        |  30 +++++-
 google_maps/src/main/patch/google_maps.patch | 110 ++++++++++++++++++++++
 2 files changed, 139 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-typedefs/blob/c8a2c3e5/google_maps/build.xml
----------------------------------------------------------------------
diff --git a/google_maps/build.xml b/google_maps/build.xml
index 443b8af..5a07e95 100644
--- a/google_maps/build.xml
+++ b/google_maps/build.xml
@@ -25,12 +25,26 @@
     
     <target name="main" depends="preprocess, externc, postprocess, compc" />
     
+    <target name="preprocess" depends="download">
+        <exec executable="git" dir="${basedir}/../..">
+            <arg value="apply"/>
+            <arg value="${basedir}/src/main/patch/google_maps.patch"/>
+        </exec>
+    </target>
+    
     <!-- we need to insert a line near the beginning of the file to make the
          compiler happy. -->
-    <target name="preprocess">
+    <target name="make_patch" depends="download">
+        <mkdir dir="${basedir}/target/reference" />
+        <copy todir="${basedir}/target/reference" file="${basedir}/target/downloads/google_maps_api_v3_11.js"
/>
         <antcall target="preprocessfile" >
             <param name="file" value="google_maps_api_v3_11.js" />
         </antcall>
+        <antcall target="diff" />
+    </target>
+
+    <target name="download" >
+        <get src="https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/maps/google_maps_api_v3_11.js"
dest="${basedir}/target/downloads/google_maps_api_v3_11.js" />
     </target>
     
     <target name="preprocessfile" >
@@ -48,6 +62,20 @@ google.maps = {};]]></replacevalue>
         </replace>
     </target>
     
+    <target name="diff" >
+        <delete dir="${basedir}/src/main/patch" />
+        <mkdir dir="${basedir}/src/main/patch" />
+        <exec executable="git" output="${basedir}/src/main/patch/google_maps.patch" >
+            <arg value="diff"/>
+            <arg value="--no-index"/>
+            <arg value="--"/>
+            <arg value="${basedir}/target/reference"/>
+            <arg value="${basedir}/target/downloads"/>
+        </exec>
+        <replace file="${basedir}/src/main/patch/google_maps.patch" token="target/reference"
value="target/downloads" />
+        <replace file="${basedir}/src/main/patch/google_maps.patch" token="${basedir}/target/downloads"
value="/externs/google_Maps/target/downloads" />
+    </target>
+
     <target name="externc" >
         <java jar="${basedir}/../../compiler-jx/lib/externc.jar" fork="true"
             failonerror="false">

http://git-wip-us.apache.org/repos/asf/flex-typedefs/blob/c8a2c3e5/google_maps/src/main/patch/google_maps.patch
----------------------------------------------------------------------
diff --git a/google_maps/src/main/patch/google_maps.patch b/google_maps/src/main/patch/google_maps.patch
new file mode 100644
index 0000000..3662743
--- /dev/null
+++ b/google_maps/src/main/patch/google_maps.patch
@@ -0,0 +1,110 @@
+diff --git a/externs/google_Maps/target/downloads/google_maps_api_v3_11.js b/externs/google_Maps/target/downloads/google_maps_api_v3_11.js
+index ac91685..5dbb628 100644
+--- a/externs/google_Maps/target/downloads/google_maps_api_v3_11.js
++++ b/externs/google_Maps/target/downloads/google_maps_api_v3_11.js
+@@ -20,6 +20,11 @@
+  * @externs
+  */
+ 
++
++/** @const */
++var google = {};
++
++/** @const */
+ google.maps = {};
+ 
+ /**
+@@ -4181,7 +4186,7 @@ google.maps.ZoomControlStyle = {
+   SMALL: 3
+ };
+ 
+-// Namespace
++/** @const */
+ google.maps.adsense = {};
+ 
+ /**
+@@ -4386,7 +4391,7 @@ google.maps.adsense.AdUnitOptions.prototype.titleColor;
+  */
+ google.maps.adsense.AdUnitOptions.prototype.urlColor;
+ 
+-// Namespace
++/** @const */
+ google.maps.drawing = {};
+ 
+ /**
+@@ -4517,7 +4522,7 @@ google.maps.drawing.OverlayType = {
+   RECTANGLE: ''
+ };
+ 
+-// Namespace
++/** @const */
+ google.maps.event = {};
+ 
+ /**
+@@ -4581,10 +4586,10 @@ google.maps.event.removeListener = function(listener) {};
+  */
+ google.maps.event.trigger = function(instance, eventName, var_args) {};
+ 
+-// Namespace
++/** @const */
+ google.maps.geometry = {};
+ 
+-// Namespace
++/** @const */
+ google.maps.geometry.encoding = {};
+ 
+ /**
+@@ -4599,7 +4604,7 @@ google.maps.geometry.encoding.decodePath = function(encodedPath) {};
+  */
+ google.maps.geometry.encoding.encodePath = function(path) {};
+ 
+-// Namespace
++/** @const */
+ google.maps.geometry.poly = {};
+ 
+ /**
+@@ -4617,7 +4622,7 @@ google.maps.geometry.poly.containsLocation = function(point, polygon)
{};
+  */
+ google.maps.geometry.poly.isLocationOnEdge = function(point, poly, opt_tolerance) {};
+ 
+-// Namespace
++/** @const */
+ google.maps.geometry.spherical = {};
+ 
+ /**
+@@ -4682,7 +4687,7 @@ google.maps.geometry.spherical.computeSignedArea = function(loop, opt_radius)
{}
+  */
+ google.maps.geometry.spherical.interpolate = function(from, to, fraction) {};
+ 
+-// Namespace
++/** @const */
+ google.maps.panoramio = {};
+ 
+ /**
+@@ -4819,7 +4824,7 @@ google.maps.panoramio.PanoramioMouseEvent.prototype.latLng;
+  */
+ google.maps.panoramio.PanoramioMouseEvent.prototype.pixelOffset;
+ 
+-// Namespace
++/** @const */
+ google.maps.places = {};
+ 
+ /**
+@@ -5486,7 +5491,7 @@ google.maps.places.TextSearchRequest.prototype.radius;
+  */
+ google.maps.places.TextSearchRequest.prototype.types;
+ 
+-// Namespace
++/** @const */
+ google.maps.visualization = {};
+ 
+ /**
+@@ -5910,7 +5915,7 @@ google.maps.visualization.WeightedLocation.prototype.location;
+  */
+ google.maps.visualization.WeightedLocation.prototype.weight;
+ 
+-// Namespace
++/** @const */
+ google.maps.weather = {};
+ 
+ /**


Mime
View raw message