Changeset 7003

Show
Ignore:
Timestamp:
01/08/07 11:29:42 (23 months ago)
Author:
jburke
Message:

Fixes #2195, and removes Jython/python as a build dependency

Location:
trunk
Files:
2 added
3 removed
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/buildscripts/build.xml

    r6995 r7003  
    7676        test - builds and runs command line unit tests 
    7777 
    78         testScripting - tests the JS and Jython integration in the build process 
     78        testScripting - tests the JS integration in the build process 
    7979 
    8080        buildFlash - compiles a Flash ActionScript 2 file to use dojo.flash.comm; provide 
     
    123123        <target name="testScripting" 
    124124                depends="-fix-config" 
    125                 description="runs minimal test on our BSF+JS+Jython integration"> 
     125                description="runs minimal test on our BSF+JS integration"> 
    126126                <script language="javascript"> 
    127127                        <![CDATA[ 
     
    153153                ]]> 
    154154                </script> 
    155                 <script language="jython"> 
    156                         <![CDATA[ 
    157 import sys 
    158 # make the python standard library avialable 
    159 sys.path.append(project.resolveFile("lib/pyLib.zip").getPath()) 
    160  
    161 # import re 
    162  
    163 echo = dojo.createTask("echo") 
    164 testScripting.addTask(echo) 
    165 echo.setMessage("Jython integration is working!"); 
    166  
    167 print "look ma! Jython!" 
    168 ]]> 
    169                 </script> 
    170155        </target> 
    171156        <!-- end testScripting task --> 
     
    176161                <available property="bsf_ok" file="${user.home}/.ant/lib/bsf.jar" /> 
    177162                <available property="ant_bsf_ok" file="${user.home}/.ant/lib/ant-apache-bsf.jar" /> 
    178                 <available property="jython_ok" file="${user.home}/.ant/lib/jython.jar" /> 
    179                 <available property="jython_libs_ok" file="${user.home}/.ant/lib/pyLib.zip" /> 
    180163 
    181164                <condition property="config_ok"> 
     
    183166                                <isset property="bsf_ok" /> 
    184167                                <isset property="ant_bsf_ok" /> 
    185                                 <isset property="jython_ok" /> 
    186                                 <isset property="jython_libs_ok" /> 
    187168                        </and> 
    188169                </condition> 
     
    200181                        <fileset dir="lib/"> 
    201182                                <include name="bsf.jar"/> 
    202                                 <include name="jython.jar"/> 
    203                                 <include name="pyLib.zip"/> 
    204183                                <include name="js.jar"/> 
    205184                                <include name="ant-apache-bsf.jar"/> 
     
    523502        <!-- end src task --> 
    524503 
    525         <!-- -set-profile-deps task --> 
    526         <target name="-set-profile-deps" depends="-fix-config" 
    527                 description="populates the contents of the dependency list for a given profile"> 
    528                 <!-- 
    529                         FIXME: this is just a stub! need to fill it in! 
    530                 --> 
    531                 <script language="javascript"> 
    532                         <![CDATA[ 
    533                         function echo(msg){ 
    534                                                         var echo = dojo.createTask("echo"); 
    535                                                         echo.setMessage(msg); 
    536                                                         echo.execute(); 
    537                                                 } 
    538                         var pf = dojo.getProperty("profileFile"); 
    539                         if((!pf)||(pf=="null")||(pf=="")){ 
    540                                 // echo("profile: "+dojo.getProperty("profile"), compress); 
    541                                 var prof = dojo.getProperty("profile"); 
    542                                 if((prof)&&(prof!="null")&&(prof!="")){ 
    543                                         dojo.setNewProperty("profileFile", "profiles/"+prof+".profile.js"); 
    544                                 }else{ 
    545                                         dojo.setNewProperty("profileFile", "getDependencyList.js"); 
    546                                 } 
    547                         } 
    548                 ]]> 
    549                 </script> 
    550  
    551                 <!-- FIXME: need to actually get a list of js files to be processed  --> 
    552  
    553                 <java jar="./lib/custom_rhino.jar" failonerror="true" 
    554                         fork="true" outputproperty="concatFilesProp" logError="true"> 
    555                         <arg value="-opt" /> 
    556                         <arg value="-1" /> 
    557                         <arg value="-f" /> 
    558                         <arg value="${profileFile}" /> 
    559                         <sysproperty key="DOJO_LOADER" value="${dojoLoader}" /> 
    560                 </java> 
    561  
    562                 <script language="javascript"> 
    563                         <![CDATA[ 
    564                         var currentTask = dojo.getTargets().get("-set-profile-deps"); 
    565                         var files = dojo.getProperty("concatFilesProp"); 
    566                         dojo.setNewProperty("profileDeps", files); 
    567                 ]]> 
    568                 </script> 
    569         </target> 
    570         <!-- end -set-profile-deps task --> 
    571  
    572         <!-- list-profile-deps task --> 
    573         <target name="list-profile-deps" depends="-fix-config, -set-profile-deps" 
    574                 description="lists out the contents of the file dependencies"> 
    575                 <echo level="info" taskName="list-profile-deps">${profileDeps}</echo> 
    576         </target> 
    577         <!-- end list-profile-deps task --> 
    578  
    579         <!-- list-profile-sizes task --> 
    580         <target name="list-profile-sizes" depends="-fix-config, -set-profile-deps" 
    581                 description="lists out the contents of the file dependencies"> 
    582                 <script language="javascript"> 
    583                         <![CDATA[ 
    584                         function echo(msg){ 
    585                                 var echo = dojo.createTask("echo"); 
    586                                 echo.setMessage(msg); 
    587                                 echo.setTaskName("list-profile-sizes"); 
    588                                 echo.execute(); 
    589                         } 
    590  
    591                         var files = new String(dojo.getProperty("profileDeps")); 
    592                         var outparts = files.split("\n"); 
    593                         for(var x=0; x<outparts.length; x++){ 
    594                                 if(outparts[x][outparts[x].length-1]==","){ 
    595                                         outparts[x] = outparts[x].substring(0, outparts[x].length-1); 
    596                                 } 
    597                                 var flen  = parseInt(new java.io.File(new java.lang.String(outparts[x])).length()); 
    598                                 echo(((flen>=1024) ? parseInt(flen/1024)+"K" : flen+"B") +": \t"+ outparts[x]); 
    599                         } 
    600                 ]]></script> 
    601                 <!-- <echo>${profileDeps}</echo> --> 
    602         </target> 
    603         <!-- end list-profile-sizes task --> 
    604  
    605         <!-- compress task --> 
    606         <target name="compress" depends="-fix-config, list-profile-deps" 
    607                 description="runs compression code over release JS files"> 
    608                 <echo level="info" taskName="compress">profileFile: ${profileFile}</echo> 
    609  
    610                 <!-- Create the release dir if it doesn't exist. --> 
    611                 <mkdir dir="${release_dir}"/> 
    612                 <!-- write the list of files included to the release directory --> 
    613                 <echo file="${release_dir}/build.txt">Files baked into this package: 
    614  
    615 ${profileDeps}</echo> 
    616  
    617                 <!-- now write 'em all to a single file --> 
    618                 <concat fixlastline="yes" eol="crlf" destfile="${release_dir}/source.__package__.js"> 
    619                         <!-- 
    620                 <concat fixlastline="yes" eol="crlf" destfile="${release_dir}/dojo.js"> 
    621                 --> 
    622                         <filelist 
    623                                 dir="." 
    624                                 files="${profileDeps}" /> 
    625                 </concat> 
    626  
    627                 <!-- remove UTF-8 BOM sequence 
    628                 <replaceregexp match="\u00ef\u00bb\u00bf" encoding="utf-8"  
    629                         byline="true" flags="g" file="${release_dir}/source.__package__.js"> 
    630                         <substitution expression="BOM!"/> 
    631                 </replaceregexp> 
    632                 --> 
    633  
    634                 <!--  
    635                         clobber requireIf and requireAfterIf statements since they 
    636                         aren't applicable in build 
    637                 --> 
    638                 <replaceregexp match="dojo.requireIf\((.*?)\);" 
    639                         byline="true" flags="g" file="${release_dir}/source.__package__.js"> 
    640                         <substitution expression=""/> 
    641                 </replaceregexp> 
    642  
    643                 <replaceregexp match="dojo.requireAfterIf\((.*?)\);" 
    644                         byline="true" flags="g" file="${release_dir}/source.__package__.js"> 
    645                         <substitution expression=""/> 
    646                 </replaceregexp> 
    647  
    648                 <!-- Set the version number --> 
    649                 <script language="jython" taskName="compress"> 
    650                         <![CDATA[ 
    651 import sys 
    652 # make the python standard library avialable 
    653 sys.path.append(project.resolveFile("lib/pyLib.zip").getPath()) 
    654 sys.path.append(project.resolveFile(".").getPath()) 
    655  
    656 # import re 
    657 import os 
    658 from buildUtil import * 
    659  
    660 print "Setting version for Dojo to: " + dojo.getProperty("version") 
    661 replaceVersion(project.resolveFile(dojo.getProperty("release_dir") + "/source.__package__.js").getPath(), dojo.getProperty("version")) 
    662 print "Removing dojo.require calls in source.__package__.js." 
    663 removeRequires(project.resolveFile(dojo.getProperty("release_dir") + "/source.__package__.js").getPath()) 
    664 ]]> 
    665                 </script> 
    666  
    667                 <antcall target="-preload-resources"> 
    668                         <param name="srcFile" value="${release_dir}/source.__package__.js" /> 
    669                         <param name="dstFile" value="${release_dir}/source.__package__.js" /> 
    670                         <param name="buildPrefix" value="dojo" /> 
    671                 </antcall> 
    672  
    673                 <!-- 
    674                         clobber requireLocalization statements.  They need to be come no-ops since the resources 
    675                         are now prebuilt and also because we do not want dojo.js to trigger XHRs on load 
    676                 --> 
    677                 <replaceregexp match="dojo.requireLocalization\((.*?)\);" 
    678                         byline="true" flags="g" file="${release_dir}/source.__package__.js"> 
    679                         <substitution expression=""/> 
    680                 </replaceregexp> 
    681  
    682                 <antcall target="-rhino-compress"> 
    683                         <param name="srcFile" value="${release_dir}/source.__package__.js" /> 
    684                         <param name="dstFile" value="${release_dir}/dojo.js" /> 
    685                 </antcall> 
    686  
    687                 <antcall target="-no-rhino-compress"> 
    688                         <param name="srcFile" value="${release_dir}/source.__package__.js" /> 
    689                         <param name="dstFile" value="${release_dir}/dojo.js" /> 
    690                 </antcall> 
    691  
    692                 <!-- add build notice --> 
    693                 <replaceregexp match="^" byline="false" replace="${build_notice}"> 
    694                         <fileset dir="${release_dir}" includes="dojo.js"/> 
    695                 </replaceregexp> 
    696  
    697                 <!-- add copyright notice --> 
    698                 <replaceregexp match="^" byline="false" replace="${copyright}"> 
    699                         <fileset dir="${release_dir}"> 
    700                                 <include name="**/*.js" /> 
    701                                 <include name="**/*.as" /> 
    702                                 <not> 
    703                                         <contains text="copyright" casesensitive="no"  /> 
    704                                 </not> 
    705                         </fileset> 
    706                 </replaceregexp> 
    707  
    708                 <delete file="${release_dir}/source.__package__.js"/> 
    709  
    710                 <!-- we copy over iframe_history.html here just in case this is a truly 
    711                 stand-alone build that isn't being kicked off via release --> 
    712                 <copy file="../iframe_history.html" todir="${release_dir}/" /> 
    713  
    714                 <!-- copy our dojo.storage and dojo.flash SWFs --> 
    715                 <copy todir="${release_dir}/" preservelastmodified="true"> 
    716                         <fileset dir="${root}/"> 
    717                                 <include name="**/*.swf" /> 
    718                                 <include name="*.jar" /> 
    719                         </fileset> 
    720                 </copy> 
    721  
    722         </target> 
    723         <!-- end compress task --> 
    724  
    725         <target name="-rhino-compress" unless="nostrip"> 
    726                 <copy overwrite="true" file="${srcFile}" tofile="${dstFile}.uncompressed.js" /> 
    727                 <java jar="./lib/custom_rhino.jar" failonerror="true" fork="true" 
    728                                 logerror="true" output="${dstFile}"> 
    729                         <arg value="-strict" /> 
    730                         <arg value="-opt"/> 
    731                         <arg value="-1" /> 
    732                         <arg value="-c" /> 
    733                         <arg value="${srcFile}" /> 
    734                 </java> 
    735         </target> 
    736  
    737         <target name="-no-rhino-compress" 
    738                 if="nostrip"> 
    739                 <copy overwrite="true" file="${srcFile}" tofile="${dstFile}" /> 
    740         </target> 
    741  
    742         <target name="-flatten-resources" 
    743                 description="loads all localization bundles in the build for a particular locale, flattens the object, and outputs a preloaded version"> 
    744                 <!-- FIXME: should also remove dojo.requireLocalization() calls from the build? --> 
    745                 <copy overwrite="true" file="${srcFile}" tofile="${release_dir}/localizations.tmp.js"> 
    746                         <filterchain> 
    747                                 <tokenfilter> 
    748                                         <containsregex pattern="dojo\.requireLocalization\(.*\);"/> 
    749                                 </tokenfilter> 
    750                         </filterchain> 
    751                 </copy> 
    752  
    753                 <!-- Hmm. have to repeat this work here even though it was done in -set-profile-deps. I guess script block changes 
    754                 to properties only last within that target? --> 
     504 
     505        <!-- -set-profileFile task --> 
     506        <target name="-set-profileFile" depends="-fix-config" 
     507                description="Configures profileFile property."> 
     508                <!-- Set up the profileFile property. --> 
    755509                <script language="javascript"> 
    756510                        <![CDATA[ 
     
    766520                ]]> 
    767521                </script> 
     522        </target> 
     523        <!-- end -set-profileFile task --> 
     524 
     525        <!-- list-profile-deps task --> 
     526        <target name="list-profile-deps" depends="-fix-config, -set-profileFile" 
     527                description="Lists the files that will be included in dojo.js for a given profile"> 
     528                <!-- Call the JS script that will generate the file list. --> 
     529                <java jar="./lib/custom_rhino.jar" failonerror="true" fork="true" 
     530                        logError="true"> 
     531                        <arg value="listProfileDeps.js" /> 
     532                        <arg value="${profileFile}" /> 
     533                        <arg value="${version}" /> 
     534                        <sysproperty key="DOJO_LOADER" value="${dojoLoader}" /> 
     535                </java> 
     536        </target> 
     537        <!-- end list-profile-deps task --> 
     538 
     539        <!-- compress task --> 
     540        <target name="compress" depends="-fix-config, -set-profileFile" 
     541                description="runs compression code over release JS files"> 
     542                <!-- Create the release dir if it doesn't exist. --> 
     543                <mkdir dir="${release_dir}"/> 
     544 
     545                <echo level="info" taskName="compress">profileFile: ${profileFile}</echo> 
     546 
     547                <!-- Call the JS script that will generate the raw dojo.js file --> 
     548                <java jar="./lib/custom_rhino.jar" failonerror="true" fork="true" 
     549                        logError="true"> 
     550                        <arg value="makeDojoJs.js" /> 
     551                        <arg value="${profileFile}" /> 
     552                        <arg value="${release_dir}" /> 
     553                        <arg value="source.__package__.js" /> 
     554                        <arg value="${version}" /> 
     555                        <sysproperty key="DOJO_LOADER" value="${dojoLoader}" /> 
     556                </java> 
     557 
     558                <antcall target="-preload-resources"> 
     559                        <param name="srcFile" value="${release_dir}/source.__package__.js" /> 
     560                        <param name="dstFile" value="${release_dir}/source.__package__.js" /> 
     561                        <param name="buildPrefix" value="dojo" /> 
     562                </antcall> 
     563 
     564                <!-- 
     565                        clobber requireLocalization statements.  They need to be come no-ops since the resources 
     566                        are now prebuilt and also because we do not want dojo.js to trigger XHRs on load 
     567                --> 
     568                <replaceregexp match="dojo.requireLocalization\((.*?)\);" 
     569                        byline="true" flags="g" file="${release_dir}/source.__package__.js"> 
     570                        <substitution expression=""/> 
     571                </replaceregexp> 
     572 
     573                <antcall target="-rhino-compress"> 
     574                        <param name="srcFile" value="${release_dir}/source.__package__.js" /> 
     575                        <param name="dstFile" value="${release_dir}/dojo.js" /> 
     576                </antcall> 
     577 
     578                <antcall target="-no-rhino-compress"> 
     579                        <param name="srcFile" value="${release_dir}/source.__package__.js" /> 
     580                        <param name="dstFile" value="${release_dir}/dojo.js" /> 
     581                </antcall> 
     582 
     583                <!-- add build notice --> 
     584                <replaceregexp match="^" byline="false" replace="${build_notice}"> 
     585                        <fileset dir="${release_dir}" includes="dojo.js"/> 
     586                </replaceregexp> 
     587 
     588                <!-- add copyright notice --> 
     589                <replaceregexp match="^" byline="false" replace="${copyright}"> 
     590                        <fileset dir="${release_dir}"> 
     591                                <include name="**/*.js" /> 
     592                                <include name="**/*.as" /> 
     593                                <not> 
     594                                        <contains text="copyright" casesensitive="no"  /> 
     595                                </not> 
     596                        </fileset> 
     597                </replaceregexp> 
     598 
     599                <delete file="${release_dir}/source.__package__.js"/> 
     600 
     601                <!-- we copy over iframe_history.html here just in case this is a truly 
     602                stand-alone build that isn't being kicked off via release --> 
     603                <copy file="../iframe_history.html" todir="${release_dir}/" /> 
     604 
     605                <!-- copy our dojo.storage and dojo.flash SWFs --> 
     606                <copy todir="${release_dir}/" preservelastmodified="true"> 
     607                        <fileset dir="${root}/"> 
     608                                <include name="**/*.swf" /> 
     609                                <include name="*.jar" /> 
     610                        </fileset> 
     611                </copy> 
     612 
     613        </target> 
     614        <!-- end compress task --> 
     615 
     616        <target name="-rhino-compress" unless="nostrip"> 
     617                <copy overwrite="true" file="${srcFile}" tofile="${dstFile}.uncompressed.js" /> 
     618                <java jar="./lib/custom_rhino.jar" failonerror="true" fork="true" 
     619                                logerror="true" output="${dstFile}"> 
     620                        <arg value="-strict" /> 
     621                        <arg value="-opt"/> 
     622                        <arg value="-1" /> 
     623                        <arg value="-c" /> 
     624                        <arg value="${srcFile}" /> 
     625                </java> 
     626        </target> 
     627 
     628        <target name="-no-rhino-compress" 
     629                if="nostrip"> 
     630                <copy overwrite="true" file="${srcFile}" tofile="${dstFile}" /> 
     631        </target> 
     632 
     633        <target name="-flatten-resources" depends="-set-profileFile" 
     634                description="loads all localization bundles in the build for a particular locale, flattens the object, and outputs a preloaded version"> 
     635                <!-- FIXME: should also remove dojo.requireLocalization() calls from the build? --> 
     636                <copy overwrite="true" file="${srcFile}" tofile="${release_dir}/localizations.tmp.js"> 
     637                        <filterchain> 
     638                                <tokenfilter> 
     639                                        <containsregex pattern="dojo\.requireLocalization\(.*\);"/> 
     640                                </tokenfilter> 
     641                        </filterchain> 
     642                </copy> 
     643 
    768644                <java jar="./lib/custom_rhino.jar" failonerror="true" fork="true" 
    769645                        logError="true" outputproperty="generatedLocales" > 
     
    792668 
    793669        <!-- intern-strings task --> 
    794         <target name="intern-strings" depends="-fix-config" 
     670        <target name="intern-strings" depends="-fix-config, -set-profileFile" 
    795671                description="pulls template paths specified in prototypes into templateStrings which can be used to speed up widget construction"> 
    796672 
    797                 <!-- Hmm. have to repeat this work here even though it was done in -set-profile-deps. I guess script block changes 
    798                 to properties only last within that target? --> 
    799                 <script language="javascript" taskName="intern-strings"> 
    800                         <![CDATA[ 
    801                         var pf = dojo.getProperty("profileFile"); 
    802                         if((!pf)||(pf=="null")||(pf=="")){ 
    803                                 var prof = dojo.getProperty("profile"); 
    804                                 if((prof)&&(prof!="null")&&(prof!="")){ 
    805                                         dojo.setNewProperty("profileFile", "profiles/"+prof+".profile.js"); 
    806                                 }else{ 
    807                                         dojo.setNewProperty("profileFile", "getDependencyList.js"); 
    808                                 } 
    809                         } 
    810                 ]]> 
    811                 </script> 
    812                  
    813673                <java jar="./lib/custom_rhino.jar" failonerror="true" fork="true" 
    814674                        logError="true"> 
     
    1053913 
    1054914        <!-- xdgenRelease task --> 
    1055         <target name="xdgenRelease" if="xdgenRun" depends="xdgenRemove"> 
    1056                 <!-- Hmm. have to repeat this work here even though it was done in -set-profile-deps. I guess script block changes 
    1057                 to properties only last within that target? --> 
    1058                 <script language="javascript"> 
    1059                         <![CDATA[ 
    1060                         var pf = dojo.getProperty("profileFile"); 
    1061                         if((!pf)||(pf=="null")||(pf=="")){ 
    1062                                 var prof = dojo.getProperty("profile"); 
    1063                                 if((prof)&&(prof!="null")&&(prof!="")){ 
    1064                                         dojo.setNewProperty("profileFile", "profiles/"+prof+".profile.js"); 
    1065                                 }else{ 
    1066                                         dojo.setNewProperty("profileFile", "getDependencyList.js"); 
    1067                                 } 
    1068                         } 
    1069                 ]]> 
    1070                 </script> 
    1071  
     915        <target name="xdgenRelease" if="xdgenRun" depends="xdgenRemove, -set-profileFile"> 
    1072916                <echo level="info" message="Generating xd resource files..." taskName="xdgenRelease"/> 
    1073917                <java jar="./lib/custom_rhino.jar" failonerror="true" fork="true" logError="true"> 
     
    1084928 
    1085929        <!-- xdgenRemove task --> 
    1086         <target name="xdgenRemove" 
     930        <target name="xdgenRemove" depends="-set-profileFile" 
    1087931                        description="Removes package files that were created by xdgen."> 
    1088                 <!-- Hmm. have to repeat this work here even though it was done in -set-profile-deps. I guess script block changes 
    1089                 to properties only last within that target? --> 
    1090                 <script language="javascript"> 
    1091                         <![CDATA[ 
    1092                         var pf = dojo.getProperty("profileFile"); 
    1093                         if((!pf)||(pf=="null")||(pf=="")){ 
    1094                                 var prof = dojo.getProperty("profile"); 
    1095                                 if((prof)&&(prof!="null")&&(prof!="")){ 
    1096                                         dojo.setNewProperty("profileFile", "profiles/"+prof+".profile.js"); 
    1097                                 }else{ 
    1098                                         dojo.setNewProperty("profileFile", "getDependencyList.js"); 
    1099                                 } 
    1100                         } 
    1101                 ]]> 
    1102                 </script> 
    1103932                <!-- Remove .xd.js files --> 
    1104933                <echo level="info" message="Removing xd resource files..." taskName="xdgenRemove"/> 
  • trunk/buildscripts/buildUtil.js

    r6967 r7003  
    6666         
    6767        dojo.hostenv.name_ = hostenvType; 
     68         
     69        //Override dojo.provide to get a list of resource providers. 
     70        var provideList = []; 
     71        dojo._provide = dojo.provide; 
     72        dojo.provide = function(resourceName){ 
     73                provideList.push(resourceName); 
     74                dojo._provide(resourceName); 
     75        } 
    6876         
    6977        function removeComments(contents){ 
     
    193201        delete dj_global; 
    194202                 
    195         return depList; 
    196 } 
     203        return { 
     204                depList: depList, 
     205                provideList: provideList 
     206        }; 
     207} 
     208 
     209buildUtil.loadDependencyList = function(/*String*/profileFile){ 
     210        var dependencies = null; 
     211        var hostenvType = null; 
     212        var profileText = readFile(profileFile); 
     213         
     214        //Remove the call to getDependencyList.js because we want to call it manually. 
     215        profileText = profileText.replace(/load\(("|')getDependencyList.js("|')\)/, ""); 
     216        eval(profileText); 
     217        if(hostenvType){ 
     218                hostenvType.join(",\n"); 
     219        } 
     220        var depResult = buildUtil.getDependencyList(dependencies, hostenvType); 
     221        depResult.dependencies = dependencies; 
     222         
     223        return depResult; 
     224} 
     225 
     226buildUtil.makeDojoJs = function(/*String*/profileFile, /*String*/version){ 
     227        //summary: Makes the uncompressed contents for dojo.js. 
     228 
     229        //Get the profileFile text. 
     230        var lineSeparator = java.lang.System.getProperty("line.separator"); 
     231         
     232        //Remove the call to getDependencyList.js because we want to call it manually. 
     233        var depLists = buildUtil.loadDependencyList(profileFile); 
     234        var depList = depLists.depList; 
     235 
     236        //Concat the files together, and mark where we should insert all the 
     237        //provide statements. 
     238        var dojoContents = ""; 
     239        var insertedProvideMarker = false; 
     240        for(var i = 0; i < depList.length; i++){ 
     241                //Make sure we have a JS string and not a Java string by using new String(). 
     242                dojoContents += new String(readFile(depList[i])) + "\r\n"; 
     243                if(!insertedProvideMarker && depList[i].indexOf("bootstrap2.js") != -1){ 
     244                        dojoContents += "__DOJO_PROVIDE_INSERTION__"; 
     245                        insertedProvideMarker = true; 
     246                } 
     247        } 
     248         
     249        //Move all the dojo.provide calls to the top, and remove any matching dojo.require calls. 
     250        //Sort the provide list alphabetically to make it easy to read. Order of provide statements 
     251        //do not matter. 
     252        var provideList = depLists.provideList.sort();  
     253        var depRegExpString = ""; 
     254        for(var i = 0; i < provideList.length; i++){ 
     255                if(i != 0){ 
     256                        depRegExpString += "|"; 
     257                } 
     258                depRegExpStr