- Update the maven build to use the maven-patch-plugin for the patching - Added new versions of the patch files(Created with: diff -ur ../target/downloads/TweenJS-0.6.2/src/ TweenJS-0.6.2/src/ > tweenjs2.patch )
Project: http://git-wip-us.apache.org/repos/asf/flex-typedefs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-typedefs/commit/cc561239 Tree: http://git-wip-us.apache.org/repos/asf/flex-typedefs/tree/cc561239 Diff: http://git-wip-us.apache.org/repos/asf/flex-typedefs/diff/cc561239 Branch: refs/heads/master Commit: cc561239d39f49ab578286b61b6067a62871eaca Parents: f5865d0 Author: Christofer Dutz <[email protected]> Authored: Tue May 31 11:39:58 2016 +0200 Committer: Christofer Dutz <[email protected]> Committed: Tue May 31 11:39:58 2016 +0200 ---------------------------------------------------------------------- createjs/pom.xml | 102 +- createjs/src/main/patch/easeljs2.patch | 8636 +++++++++++++++++++++++++++ createjs/src/main/patch/tweenjs2.patch | 1462 +++++ 3 files changed, 10120 insertions(+), 80 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-typedefs/blob/cc561239/createjs/pom.xml ---------------------------------------------------------------------- diff --git a/createjs/pom.xml b/createjs/pom.xml index 84a7442..d2f5dd0 100644 --- a/createjs/pom.xml +++ b/createjs/pom.xml @@ -77,103 +77,45 @@ </plugin> <plugin> - <groupId>org.apache.flex.flexjs.compiler</groupId> - <artifactId>compiler-build-tools</artifactId> - <version>0.7.0-SNAPSHOT</version> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-patch-plugin</artifactId> + <version>1.2</version> + <configuration> + <patchDirectory>src/main/patch</patchDirectory> + <strip>2</strip> + <binary>true</binary> + </configuration> <executions> <execution> - <id>pre-process-sources</id> - <phase>validate</phase> - <goals> - <goal>pre-process-sources</goal> - </goals> - <configuration> - <operations> - <replace-regexp-operation><match>this\.createjs = this\.createjs(\s)*\|\|(\s)*\{\};</match><replace/></replace-regexp-operation> - <!-- Remove the opening brackets at the beginning --> - <replace-regexp-operation><match>(\n|\r){1,2}\(function(\s)*\(\)(\s)*\{(\s)*(\n|\r)*</match><replace/></replace-regexp-operation> - <!-- Remove the "use strict" output --> - <replace-regexp-operation><match>\s*"use strict";(\n\r)*</match><replace/></replace-regexp-operation> - <!-- Rewrite the way the functions are declared --> - <replace-regexp-operation><match>function §{file.base}\(</match><replace>createjs.§{file.base} = function(</replace></replace-regexp-operation> - <!-- Replace the way the type is referenced --> - <replace-regexp-operation><match>var p = §{file.base}\.prototype;</match><replace/></replace-regexp-operation> - <replace-regexp-operation><match>\sp\.</match><replace>_createjs.§{file.base}.prototype.</replace></replace-regexp-operation> - <replace-regexp-operation><match>(?<!createjs\.)§{file.base}\.</match><replace>createjs.§{file.base}.</replace></replace-regexp-operation> - <replace-regexp-operation><match>var p = createjs\.extend\(§{file.base}, createjs\..*\);</match><replace/></replace-regexp-operation> - <replace-regexp-operation><match>createjs\.§{file.base} = createjs\.promote\(§{file.base}, ".*"\);</match><replace/></replace-regexp-operation> - <replace-regexp-operation><match>createjs\.§{file.base} = §{file.base};</match><replace/></replace-regexp-operation> - <replace-regexp-operation><match>\s@extends\s(.*)</match><replace>_@extends createjs.$1</replace></replace-regexp-operation> - <!-- Add the package to the JavaScript Doc types that are not naive JavaScript --> - <replace-regexp-operation><match>\s@(param|type|return)\s\{(Sprite|SpriteSheet|DisplayObject|Container|Shadow|Rectangle|Matrix2D|Stage|Point|DisplayProps|Graphics|MovieClip|ColorMatrix|Filter)(\}|\s)</match><replace>_@$1 {createjs.$2$3</replace></replace-regexp-operation> - <!-- Remove the "[time]" that sometimes accompanies Number parameters and place it after the type --> - <replace-regexp-operation><match>@param \[time\] \{Number\}</match><replace>@param {Number} time</replace></replace-regexp-operation> - <!-- - Replace the try-catch - (Had to limit the number of chars as other wise I get Stack Overflows) - --> - <replace-regexp-operation><match>\stry \{\s*Object\.defineProperties\(p, \{\s*(.*): \{\s(.|\n|\r){0,200} *\} catch \(e\) \{\}</match><replace>createjs.§{file.base}.prototype.$1;</replace></replace-regexp-operation> - <!-- In MouseEvent and MovieClip the try-cach was completely removed --> - <replace-regexp-operation><match>createjs.MouseEvent.prototype.localX; // TODO: use Log</match><replace/></replace-regexp-operation> - <replace-regexp-operation><match>createjs.MovieClip.prototype.labels;</match><replace/></replace-regexp-operation> - <!-- Remove the closing brackets at the end --> - <replace-regexp-operation><match>\}(\)\(|\(\))\);</match><replace/></replace-regexp-operation> - <!-- Fixes needed by tweenjs --> - <replace-regexp-operation><match>@param data</match><replace>@param \{Object\} data</replace></replace-regexp-operation> - <replace-regexp-operation><match>@param ratio</match><replace>@param \{Number\} ratio</replace></replace-regexp-operation> - <replace-regexp-operation><match>@param target</match><replace>@param \{Object\} target</replace></replace-regexp-operation> - <replace-regexp-operation><match>\{any\}</match><replace>\{Object\}</replace></replace-regexp-operation> - </operations> - </configuration> - </execution> - <execution> - <id>pre-process-sources-ticker</id> + <id>patch-easeljs</id> <phase>validate</phase> <goals> - <goal>pre-process-sources</goal> + <goal>apply</goal> </goals> <configuration> - <includes> - <include>EaselJS-${createjs.version}/src/createjs/utils/Ticker.js</include> - </includes> - <operations> - <cut-operation> - <start-cutting-line>355</start-cutting-line> - <stop-cutting-line>378</stop-cutting-line> - </cut-operation> - </operations> + <patches> + <patch>easeljs2.patch</patch> + </patches> + <ignoreWhitespace>true</ignoreWhitespace> + <targetDirectory>${project.build.directory}/downloads/EaselJS-${createjs.version}/src</targetDirectory> </configuration> </execution> - <!-- Cut off the end of Graphics.js --> <execution> - <id>pre-process-sources-graphics</id> + <id>patch-tweenjs</id> <phase>validate</phase> <goals> - <goal>pre-process-sources</goal> + <goal>apply</goal> </goals> <configuration> - <includes> - <include>EaselJS-${createjs.version}/src/easeljs/display/Graphics.js</include> - </includes> - <operations> - <cut-operation> - <start-cutting-line>1560</start-cutting-line> - <stop-cutting-line>2163</stop-cutting-line> - </cut-operation> - </operations> + <patches> + <patch>tweenjs2.patch</patch> + </patches> + <targetDirectory>${project.build.directory}/downloads/TweenJS-${tweenjs.version}/src</targetDirectory> </configuration> </execution> </executions> - <configuration> - <!-- Take the JavaScript from the previously downloaded and unpacked distribution --> - <downloadesSourceDirectory>${project.build.directory}/downloads</downloadesSourceDirectory> - <includes> - <include>EaselJS-${createjs.version}/src/createjs/**/*.js</include> - <include>EaselJS-${createjs.version}/src/easeljs/**/*.js</include> - <include>TweenJS-${tweenjs.version}/src/tweenjs/**/*.js</include> - </includes> - </configuration> </plugin> + <plugin> <groupId>org.apache.flex.flexjs.compiler</groupId> <artifactId>flexjs-maven-plugin</artifactId>
