Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1450)

Unified Diff: editor/tools/features/com.google.dart.tools.deploy.feature_releng/build-common.xml

Issue 8631010: Move bundled libraries out of plugins (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/features/com.google.dart.tools.deploy.feature_releng/build-common.xml
===================================================================
--- editor/tools/features/com.google.dart.tools.deploy.feature_releng/build-common.xml (revision 1856)
+++ editor/tools/features/com.google.dart.tools.deploy.feature_releng/build-common.xml (working copy)
@@ -379,5 +379,59 @@
<fileset dir="${build.stage}/workspace/.metadata" includes=".log" />
</concat>
</target>
+
+ <!--
+ ********************************************************************************
+ Macro: copyDartLib
+ Parse the @{name}.dart library file to determine the referenced #source and #native files
+ then copy that file and the referenced files to a new directory
+
+ required attributes:
+ name - the short name of the dart library (e.g "dom", "core")
+ dir - the directory containing the library source
+
+ optional attributes:
+ todir - the destination directory - defaults to ${libraries.out.dir}/@{name}
+ tmpdir - temp directory - defaults to ${build.tmp}/lib
+
+ ant properties required
+ build.tmp - temparary location for build work
+
+ ant properties set
+ dart.@{name}.files - comma separated list of #source and #native files in the library
+
+ ********************************************************************************
+ -->
+ <macrodef name="copyDartLib">
+ <attribute name="name" />
+ <attribute name="dir" />
+ <attribute name="libfile" default="@{name}.dart"/>
+ <attribute name="todir" default="${libraries.out.dir}/@{name}"/>
+ <attribute name="tmpdir" default="${build.tmp}/lib"/>
+ <sequential>
+ <mkdir dir="@{tmpdir}"/>
+ <copy file="@{dir}/@{libfile}" tofile="@{tmpdir}/@{name}-files.txt"/>
+ <replaceregexp file="@{tmpdir}/@{name}-files.txt" flags="s" match="class\s+\w+\s+\{.*" replace=""/>
+ <replaceregexp file="@{tmpdir}/@{name}-files.txt" flags="s" match="/\*.*\*/" replace=""/>
+ <replaceregexp file="@{tmpdir}/@{name}-files.txt" byline="true" match="#source\(.(.*).\);" replace="\1,"/>
+ <replaceregexp file="@{tmpdir}/@{name}-files.txt" byline="true" match="#native\(.(.*).\);" replace="\1,"/>
+ <loadfile property="dart.@{name}.files" srcfile="@{tmpdir}/@{name}-files.txt">
+ <filterchain>
+ <striplinecomments>
+ <comment value="#"/>
+ <comment value="//"/>
+ </striplinecomments>
+ <striplinebreaks/>
+ </filterchain>
+ </loadfile>
+ <echo message="Copying dart:@{name} files @{libfile},${dart.@{name}.files}"/>
+ <echo message="to @{todir}" />
+ <mkdir dir="@{todir}"/>
+ <copy todir="@{todir}">
+ <fileset dir="@{dir}" includes="@{libfile},${dart.@{name}.files}"/>
+ </copy>
+ </sequential>
+ </macrodef>
+
</project>

Powered by Google App Engine
This is Rietveld 408576698