blob: 0079d0b7e14c24ad3ee08fa6d249fb7e2fe2f075 [file] [log] [blame]
Siva Velusamy6ca42e82011-12-08 14:25:37 -08001<project name="com.android.eclipse.rcp.build" default="build">
2 <!-- Root of Android Source Tree -->
3 <property name="ANDROID_SRC" location="../../../../" />
4
5 <!-- Host Eclipse used for building the RCP -->
6 <property name="basebuilder" value="${ANDROID_SRC}/prebuilts/tools/build/basebuilder/org.eclipse.releng.basebuilder/" />
7
8 <!-- Source for target prebuilts -->
9 <property name="targetSrcDir" value="${ANDROID_SRC}/prebuilts/tools/build/target-platform/" />
10
11 <!-- Location where build happens and resulting binaries are generated -->
12 <property name="outDir" value="${ANDROID_SRC}/out/host/eclipse/rcp/" />
13
14 <!-- Location where the target platform is created -->
15 <property name="targetDir" value="${outDir}/target" />
16
17 <!-- Location where the target platform is created -->
18 <property name="buildDir" value="${outDir}/build" />
19
20 <!-- Location of the sources -->
21 <property name="srcDir" value="${ANDROID_SRC}/sdk/eclipse/" />
22
23 <!-- locate launcher plugin inside eclipse -->
24 <path id="equinox.launcher.path">
25 <fileset dir="${basebuilder}/plugins">
26 <include name="org.eclipse.equinox.launcher_*.jar" />
27 </fileset>
28 </path>
29 <property name="equinox.launcher" refid="equinox.launcher.path" />
30
31 <!-- locate pde build plugin inside eclipse -->
32 <path id="pde.build.dir.path">
33 <dirset dir="${basebuilder}/plugins">
34 <include name="org.eclipse.pde.build_*" />
35 </dirset>
36 </path>
37 <property name="pde.build.dir" refid="pde.build.dir.path" />
38
39 <!-- create the build directory, copy plugins and features into it -->
40 <target name="copy_srcs">
41 <mkdir dir="${buildDir}" />
42 <copy todir="${buildDir}">
43 <fileset dir="${srcDir}/">
44 <include name="plugins/**" />
45 <include name="features/**" />
46 </fileset>
47 </copy>
48 </target>
49
50 <!-- create target platform -->
51 <target name="create-target">
52 <mkdir dir="${targetDir}" />
53 <mkdir dir="${targetDir}/deltapack" />
54 <mkdir dir="${targetDir}/repos" />
55
56 <unzip src="${targetSrcDir}/eclipse-3.6.2-delta-pack.zip" dest="${targetDir}/deltapack" />
57 <unzip src="${targetSrcDir}/org.eclipse.platform-3.6.2.zip" dest="${targetDir}/repos/platform" />
58 <unzip src="${targetSrcDir}/org.eclipse.jdt-3.6.2.zip" dest="${targetDir}/repos/jdt" />
59 </target>
60
61 <!-- Launch pde build -->
62 <target name="pde-build">
63 <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true">
64 <arg value="-application" />
65 <arg value="org.eclipse.ant.core.antRunner" />
66 <arg value="-buildfile" />
67 <arg value="${pde.build.dir}/scripts/productBuild/productBuild.xml" />
68 <arg value="-data" />
69 <arg value="${buildDir}/workspace" />
70 <arg value="-Dtimestamp=${timestamp}" />
71 <arg value="-DeclipseLocation=${baseBuilder}" />
72 <arg value="-DbuildDirectory=${buildDir}" />
73 <arg value="-DbaseLocation=${targetDir}/deltapack/eclipse" />
74 <arg value="-DrepoBaseLocation=${targetDir}/repos/" />
75 <arg value="-DtransformedRepoLocation=${targetDir}/transformedRepos/" />
76 <classpath>
77 <pathelement location="${equinox.launcher}" />
78 </classpath>
79 </java>
80 </target>
81
82 <target name="clean">
83 <delete dir="${outDir}" />
84 <delete dir="${targetDir}" />
85 </target>
86
87 <target name="build" depends="clean, copy_srcs, create-target, pde-build" />
88</project>
89