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 <fileset dir="${SOURCE_DIR}/" includes="**/common*/**" /> 71 <fileset dir="${SOURCE_DIR}/" includes="**/logger*/**" /> 72 </copy> 73 <echo message="0=${timestamp}" file="${buildDirectory}/plugins/preflighting.core/about.mappings" /> 74 <echo message="0=${timestamp}" file="${buildDirectory}/plugins/preflighting.ui/about.mappings" /> 75 <echoxml file="${buildDirectory}/site.xml"> 76 <site> 77 <feature url="features/${appValidatorFeatureName}.${appValidatorFeatureVersion}.jar" id="${appValidatorFeatureName}" version="${appValidatorFeatureVersion}"> 78 <category name="MOTODEVStudioforAndroid" /> 79 </feature> 80 <feature url="features/${appValidatorUIFeatureName}.${appValidatorUIFeatureVersion}.jar" id="${appValidatorUIFeatureName}" version="${appValidatorUIFeatureVersion}"> 81 <category name="MOTODEVStudioforAndroid" /> 82 </feature> 83 <feature url="features/${appValidatorSDKFeatureName}.${appValidatorSDKFeatureVersion}.jar" id="${appValidatorSDKFeatureName}" version="${appValidatorSDKFeatureVersion}"> 84 <category name="MOTODEVStudioforAndroid" /> 85 </feature> 86 <category-def name="MOTODEVStudioforAndroid" label="MOTODEV Studio for Android" /> 87 </site> 88 </echoxml> 89 </target> 90 91 <!-- ===================================================================== --> 92 <!-- Steps to do after setup but before starting the build proper --> 93 <!-- ===================================================================== --> 94 <target name="postSetup"> 95 <antcall target="getBaseComponents" /> 96 </target> 97 98 <!-- ===================================================================== --> 99 <!-- Steps to do before fetching the build elements --> 100 <!-- ===================================================================== --> 101 <target name="preFetch"> 102 </target> 103 104 <!-- ===================================================================== --> 105 <!-- Steps to do after fetching the build elements --> 106 <!-- ===================================================================== --> 107 <target name="postFetch"> 108 </target> 109 110 <!-- ===================================================================== --> 111 <!-- Steps to do before the repositories are being processed --> 112 <!-- ===================================================================== --> 113 <target name="preProcessRepos"> 114 </target> 115 116 <!-- ===================================================================== --> 117 <!-- Steps to do after the repositories have been processed --> 118 <!-- ===================================================================== --> 119 <target name="postProcessRepos"> 120 121 </target> 122 123 <!-- ===================================================================== --> 124 <!-- Steps to do before generating the build scripts. --> 125 <!-- ===================================================================== --> 126 <target name="preGenerate"> 127 <ant antfile="${MAKEFILE}/preflighting/javadoc.xml" target="javadoc"> 128 <property name="sourceCodeDirectories" value="${appValidatorSourceCodeDirectories}" /> 129 <property name="excludePackages" value="${appValidatorExcludedPackages}" /> 130 <property name="javadocOutputDirectory" value="${javadocOutputDirectory}" /> 131 <property name="javaAPIPackageLocationDirectory" value="${MAKEFILE}/preflighting/" /> 132 <property name="javaAPIURLDirectory" value="${appValidatorJavaAPIURLDirectory}" /> 133 </ant> 134 <copy todir="${appValidatorJavadocOutputDirectory}" > 135 <fileset dir="${javadocOutputDirectory}" /> 136 </copy> 137 <mkdir dir="${buildDirectory}/tmp/plugins" /> 138 <copy todir="${buildDirectory}/tmp/plugins"> 139 <fileset dir="${GIT_REPOSITORY_PATH}/android/docs/manuals/" includes="*.jar" /> 140 </copy> 141 <delete> 142 <fileset dir="${transformedRepoLocation}" includes="com.motorola*helpbase*" /> 143 </delete> 144 <p2.generator append="true" source="${buildDirectory}/tmp/" artifactrepository="file:${transformedRepoLocation}" metadatarepository="file:${transformedRepoLocation}" publishartifacts="true" /> 145 </target> 146 147 <!-- ===================================================================== --> 148 <!-- Steps to do after generating the build scripts. --> 149 <!-- ===================================================================== --> 150 <target name="postGenerate"> 151 <antcall target="clean" /> 152 </target> 153 154 <!-- ===================================================================== --> 155 <!-- Steps to do before running the build.xmls for the elements being built. --> 156 <!-- ===================================================================== --> 157 <target name="preProcess"> 158 </target> 159 160 <!-- ===================================================================== --> 161 <!-- Steps to do after running the build.xmls for the elements being built. --> 162 <!-- ===================================================================== --> 163 <target name="postProcess"> 164 </target> 165 166 <!-- ===================================================================== --> 167 <!-- Steps to do before running assemble. --> 168 <!-- ===================================================================== --> 169 <target name="preAssemble"> 170 <copy todir="${transformedRepoLocation}/plugins" failonerror="false" overwrite="true"> 171 <fileset dir="${BASE_REPOSITORIES_DIR}/REPO_ADT/plugins/" includes="*.jar" /> 172 </copy> 173 <copy todir="${transformedRepoLocation}/features" failonerror="false" overwrite="true"> 174 <fileset dir="${BASE_REPOSITORIES_DIR}/REPO_ADT/features/" includes="*.jar" /> 175 </copy> 176 </target> 177 178 <!-- ===================================================================== --> 179 <!-- Steps to do after running assemble. --> 180 <!-- ===================================================================== --> 181 <target name="postAssemble"> 182 </target> 183 184 <!-- ===================================================================== --> 185 <!-- Steps to do before running package. --> 186 <!-- ===================================================================== --> 187 <target name="prePackage"> 188 </target> 189 190 <!-- ===================================================================== --> 191 <!-- Steps to do after running package. --> 192 <!-- ===================================================================== --> 193 <target name="postPackage"> 194 </target> 195 196 <!-- ===================================================================== --> 197 <!-- Steps to do after the build is done. --> 198 <!-- ===================================================================== --> 199 <target name="postBuild"> 200 <antcall target="gatherLogs" /> 201 <p2.mirror destination="file:${outputDirectory}"> 202 <slicingoptions followstrict="true" /> 203 <source> 204 <repository location="${p2.build.repo}" /> 205 </source> 206 <iu id="com.motorolamobility.preflighting.ui.feature.feature.group" /> 207 <iu id="com.motorolamobility.preflighting.sdk.feature.feature.group" /> 208 <iu id="com.motorolamobility.preflighting.feature.feature.group" /> 209 </p2.mirror> 210 <!-- antcall target="signStudio" / --> 211 <!-- run the category publisher.. there is no ant task to execute it --> 212 <java failonerror="true" jar="${eclipse.builder.path}/plugins/${eclipse.builder.launcher}" fork="true"> 213 <arg value="-application" /> 214 <arg value="org.eclipse.equinox.p2.publisher.CategoryPublisher" /> 215 <arg value="-metadataRepository" /> 216 <arg value="file:${outputDirectory}" /> 217 <arg value="-categoryDefinition" /> 218 <arg value="file:${buildDirectory}/site.xml" /> 219 </java> 220 </target> 221 222 <!-- target name="signStudio" if="motodev.keypass"> 223 <p2.process.artifacts repositorypath="file:${outputDirectory}"> 224 <sign keystore="${motodev.keystore}" alias="motodev" keypass="${motodev.keypass}" storepass="${motodev.storepass}" /> 225 </p2.process.artifacts> 226 </target --> 227 228 <!-- ===================================================================== --> 229 <!-- Steps to do to test the build results --> 230 <!-- ===================================================================== --> 231 <target name="test"> 232 <echo level="info" message="PreFlighting Custom Targets Test"/> 233 </target> 234 235 <!-- ===================================================================== --> 236 <!-- Steps to do to publish the build results --> 237 <!-- ===================================================================== --> 238 <target name="publish"> 239 </target> 240 241 <!-- ===================================================================== --> 242 <!-- Default target --> 243 <!-- ===================================================================== --> 244 <target name="noDefault"> 245 <echo message="You must specify a target when invoking this file" /> 246 </target> 247 248 </project> 249