1 <project name="Build specific targets and properties" default="noDefault"> 2 3 <!-- ===================================================================== --> 4 <!-- Run a given ${target} on all elements being built --> 5 <!-- Add on <ant> task for each top level element being built. --> 6 <!-- ===================================================================== --> 7 <available property="allElementsFile" file="${builder}/allElements.xml" value="${builder}/allElements.xml" /> 8 <property name="allElementsFile" location="${eclipse.pdebuild.templates}/headless-build/allElements.xml" /> 9 10 <import file="${allElementsFile}" /> 11 <target name="allElements"> 12 <antcall target="allElementsDelegator" /> 13 </target> 14 15 <!-- ===================================================================== --> 16 <!-- ===================================================================== --> 17 <target name="getBaseComponents" depends="checkLocalBase" unless="skipBase"> 18 <get src="${eclipseBaseURL}" dest="${buildDirectory}/../temp-base.zip" /> 19 <unzip dest="${base}" overwrite="true" src="${buildDirectory}/../temp-base.zip" /> 20 </target> 21 22 <target name="checkLocalBase"> 23 <available file="${base}" property="skipBase" /> 24 </target> 25 26 <!-- ===================================================================== --> 27 <!-- Check out map files from correct repository --> 28 <!-- Replace values for mapsCheckoutTag as desired. --> 29 <!-- ===================================================================== --> 30 <target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps"> 31 <property name="mapsCheckoutTag" value="HEAD" /> 32 <cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" /> 33 </target> 34 35 <target name="checkLocalMaps"> 36 <available property="skipMaps" file="${buildDirectory}/maps" /> 37 </target> 38 39 <target name="tagMapFiles" if="tagMaps"> 40 <cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" /> 41 </target> 42 43 <!-- ===================================================================== --> 44 45 <target name="clean" unless="noclean"> 46 <antcall target="allElements"> 47 <param name="target" value="cleanElement" /> 48 </antcall> 49 </target> 50 51 <target name="gatherLogs"> 52 <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" /> 53 <antcall target="allElements"> 54 <param name="target" value="gatherLogs" /> 55 </antcall> 56 <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true"> 57 <fileset dir="${buildDirectory}/features"> 58 <include name="**/*.log.zip" /> 59 </fileset> 60 </unzip> 61 </target> 62 63 <!-- ===================================================================== --> 64 <!-- Steps to do before setup --> 65 <!-- ===================================================================== --> 66 <target name="preSetup"> 67 68 <copy todir="${buildDirectory}"> 69 <fileset dir="${SOURCE_DIR}/" includes="**/preflighting*/**" /> 70 </copy> 71 <echo message="0=${timestamp}" file="${buildDirectory}/plugins/preflighting.core/about.mappings" /> 72 <echoxml file="${buildDirectory}/site.xml"> 73 <site> 74 <feature url="features/${appValidatorFeatureName}.${appValidatorFeatureVersion}.jar" id="${appValidatorFeatureName}" version="${appValidatorFeatureVersion}"> 75 <category name="MOTODEVStudioforAndroid" /> 76 </feature> 77 <category-def name="MOTODEVStudioforAndroid" label="MOTODEV Studio for Android" /> 78 </site> 79 </echoxml> 80 </target> 81 82 <!-- ===================================================================== --> 83 <!-- Steps to do after setup but before starting the build proper --> 84 <!-- ===================================================================== --> 85 <target name="postSetup"> 86 <antcall target="getBaseComponents" /> 87 </target> 88 89 <!-- ===================================================================== --> 90 <!-- Steps to do before fetching the build elements --> 91 <!-- ===================================================================== --> 92 <target name="preFetch"> 93 </target> 94 95 <!-- ===================================================================== --> 96 <!-- Steps to do after fetching the build elements --> 97 <!-- ===================================================================== --> 98 <target name="postFetch"> 99 </target> 100 101 <!-- ===================================================================== --> 102 <!-- Steps to do before the repositories are being processed --> 103 <!-- ===================================================================== --> 104 <target name="preProcessRepos"> 105 </target> 106 107 <!-- ===================================================================== --> 108 <!-- Steps to do after the repositories have been processed --> 109 <!-- ===================================================================== --> 110 <target name="postProcessRepos"> 111 112 </target> 113 114 <!-- ===================================================================== --> 115 <!-- Steps to do before generating the build scripts. --> 116 <!-- ===================================================================== --> 117 <target name="preGenerate"> 118 <mkdir dir="${buildDirectory}/tmp/plugins" /> 119 <copy todir="${buildDirectory}/tmp/plugins"> 120 <fileset dir="${GIT_REPOSITORY_PATH}/android/docs/manuals/" includes="*.jar" /> 121 </copy> 122 <delete> 123 <fileset dir="${transformedRepoLocation}" includes="com.motorola*helpbase*" /> 124 </delete> 125 <p2.generator append="true" source="${buildDirectory}/tmp/" artifactrepository="file:${transformedRepoLocation}" metadatarepository="file:${transformedRepoLocation}" publishartifacts="true" /> 126 </target> 127 128 <!-- ===================================================================== --> 129 <!-- Steps to do after generating the build scripts. --> 130 <!-- ===================================================================== --> 131 <target name="postGenerate"> 132 <antcall target="clean" /> 133 </target> 134 135 <!-- ===================================================================== --> 136 <!-- Steps to do before running the build.xmls for the elements being built. --> 137 <!-- ===================================================================== --> 138 <target name="preProcess"> 139 </target> 140 141 <!-- ===================================================================== --> 142 <!-- Steps to do after running the build.xmls for the elements being built. --> 143 <!-- ===================================================================== --> 144 <target name="postProcess"> 145 </target> 146 147 <!-- ===================================================================== --> 148 <!-- Steps to do before running assemble. --> 149 <!-- ===================================================================== --> 150 <target name="preAssemble"> 151 <copy todir="${transformedRepoLocation}/plugins" failonerror="false" overwrite="true"> 152 <fileset dir="${BASE_REPOSITORIES_DIR}/REPO_ADT/plugins/" includes="*.jar" /> 153 </copy> 154 <copy todir="${transformedRepoLocation}/features" failonerror="false" overwrite="true"> 155 <fileset dir="${BASE_REPOSITORIES_DIR}/REPO_ADT/features/" includes="*.jar" /> 156 </copy> 157 </target> 158 159 <!-- ===================================================================== --> 160 <!-- Steps to do after running assemble. --> 161 <!-- ===================================================================== --> 162 <target name="postAssemble"> 163 </target> 164 165 <!-- ===================================================================== --> 166 <!-- Steps to do before running package. --> 167 <!-- ===================================================================== --> 168 <target name="prePackage"> 169 </target> 170 171 <!-- ===================================================================== --> 172 <!-- Steps to do after running package. --> 173 <!-- ===================================================================== --> 174 <target name="postPackage"> 175 </target> 176 177 <!-- ===================================================================== --> 178 <!-- Steps to do after the build is done. --> 179 <!-- ===================================================================== --> 180 <target name="postBuild"> 181 <antcall target="renameOutputs" /> 182 <antcall target="copyResults" /> 183 </target> 184 185 <target name="renameOutputs"> 186 <move file="${buildDirectory}/${buildLabel}/${buildId}-linux.gtk.x86.zip" tofile="${buildDirectory}/${buildLabel}/${buildId}-linux.gtk.x86.tar.gz" /> 187 <move file="${buildDirectory}/${buildLabel}/${buildId}-linux.gtk.x86_64.zip" tofile="${buildDirectory}/${buildLabel}/${buildId}-linux.gtk.x86_64.tar.gz" /> 188 <move file="${buildDirectory}/${buildLabel}/${buildId}-macosx.cocoa.x86.zip" tofile="${buildDirectory}/${buildLabel}/${buildId}-macosx.cocoa.x86.tar.gz" /> 189 <move file="${buildDirectory}/${buildLabel}/${buildId}-macosx.cocoa.x86_64.zip" tofile="${buildDirectory}/${buildLabel}/${buildId}-macosx.cocoa.x86_64.tar.gz" /> 190 </target> 191 192 <target name="copyResults" if="outputDirectory"> 193 <copy todir="${outputDirectory}"> 194 <fileset dir="${buildDirectory}/${buildLabel}" includes="**" excludes="compilelogs/" /> 195 </copy> 196 </target> 197 198 <!-- ===================================================================== --> 199 <!-- Steps to do to test the build results --> 200 <!-- ===================================================================== --> 201 <target name="test"> 202 </target> 203 204 <!-- ===================================================================== --> 205 <!-- Steps to do to publish the build results --> 206 <!-- ===================================================================== --> 207 <target name="publish"> 208 </target> 209 210 <!-- ===================================================================== --> 211 <!-- Default target --> 212 <!-- ===================================================================== --> 213 <target name="noDefault"> 214 <echo message="You must specify a target when invoking this file" /> 215 </target> 216 217 </project> 218