Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 1 | <project name="com.android.eclipse.rcp.build" default="build"> |
| 2 | <!-- Root of Android Source Tree --> |
Raphael Moll | 5abe8b2 | 2012-03-30 15:50:45 -0700 | [diff] [blame] | 3 | <property name="ANDROID_SRC" location="../../" /> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 4 | |
| 5 | <!-- Host Eclipse used for building the RCP --> |
Siva Velusamy | 0735459 | 2012-04-19 14:37:23 -0700 | [diff] [blame] | 6 | <property name="basebuilder" value="${ANDROID_SRC}/external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/" /> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 7 | |
| 8 | <!-- Source for target prebuilts --> |
Siva Velusamy | 4ae83cc | 2012-01-12 14:37:19 -0800 | [diff] [blame] | 9 | <property name="targetSrcDir" value="${ANDROID_SRC}/prebuilts/eclipse/" /> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 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 | |
Siva Velusamy | e63fabc | 2012-01-26 15:48:45 -0800 | [diff] [blame] | 23 | <!-- Identify configurations to build --> |
| 24 | <condition property="buildconfigs" value="linux,gtk,x86 & linux,gtk,x86_64"> |
| 25 | <equals arg1="${buildFor}" arg2="linux" /> |
| 26 | </condition> |
| 27 | <condition property="buildconfigs" value="macosx,cocoa,x86_64"> |
| 28 | <equals arg1="${buildFor}" arg2="darwin" /> |
| 29 | </condition> |
| 30 | <condition property="buildconfigs" value="win32,win32,x86 & win32,win32,x86_64"> |
| 31 | <equals arg1="${buildFor}" arg2="windows" /> |
| 32 | </condition> |
| 33 | |
| 34 | <!-- if no platforms are provided, then build for all platforms --> |
| 35 | <property name="buildconfigs" value="linux,gtk,x86 & linux,gtk,x86_64 & win32,win32,x86 & win32,win32,x86_64 & macosx,cocoa,x86_64" /> |
| 36 | |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 37 | <!-- locate launcher plugin inside eclipse --> |
Siva Velusamy | e63fabc | 2012-01-26 15:48:45 -0800 | [diff] [blame] | 38 | <path id="equinox.launcher.path"> |
| 39 | <fileset dir="${basebuilder}/plugins"> |
| 40 | <include name="org.eclipse.equinox.launcher_*.jar" /> |
| 41 | </fileset> |
| 42 | </path> |
| 43 | <property name="equinox.launcher" refid="equinox.launcher.path" /> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 44 | |
| 45 | <!-- locate pde build plugin inside eclipse --> |
Siva Velusamy | e63fabc | 2012-01-26 15:48:45 -0800 | [diff] [blame] | 46 | <path id="pde.build.dir.path"> |
| 47 | <dirset dir="${basebuilder}/plugins"> |
| 48 | <include name="org.eclipse.pde.build_*" /> |
| 49 | </dirset> |
| 50 | </path> |
| 51 | <property name="pde.build.dir" refid="pde.build.dir.path" /> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 52 | |
| 53 | <!-- create the build directory, copy plugins and features into it --> |
Siva Velusamy | e63fabc | 2012-01-26 15:48:45 -0800 | [diff] [blame] | 54 | <target name="copy_srcs"> |
| 55 | <mkdir dir="${buildDir}" /> |
Siva Velusamy | c1c5b54 | 2012-05-07 17:02:34 -0700 | [diff] [blame] | 56 | <copy todir="${buildDir}" preservelastmodified="true"> |
Siva Velusamy | e63fabc | 2012-01-26 15:48:45 -0800 | [diff] [blame] | 57 | <fileset dir="${srcDir}/"> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 58 | <include name="plugins/**" /> |
| 59 | <include name="features/**" /> |
Siva Velusamy | c1c5b54 | 2012-05-07 17:02:34 -0700 | [diff] [blame] | 60 | <exclude name="plugins/*/bin/**" /> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 61 | </fileset> |
Siva Velusamy | e63fabc | 2012-01-26 15:48:45 -0800 | [diff] [blame] | 62 | </copy> |
| 63 | </target> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 64 | |
| 65 | <!-- create target platform --> |
| 66 | <target name="create-target"> |
Siva Velusamy | e63fabc | 2012-01-26 15:48:45 -0800 | [diff] [blame] | 67 | <mkdir dir="${targetDir}" /> |
| 68 | <mkdir dir="${targetDir}/deltapack" /> |
| 69 | <mkdir dir="${targetDir}/repos" /> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 70 | |
Siva Velusamy | 0735459 | 2012-04-19 14:37:23 -0700 | [diff] [blame] | 71 | <unzip src="${targetSrcDir}/deltapack/eclipse-3.7.2-delta-pack.zip" dest="${targetDir}/deltapack" overwrite="false" /> |
| 72 | <unzip src="${targetSrcDir}/platform/org.eclipse.platform-3.7.2.zip" dest="${targetDir}/repos/platform" overwrite="false" /> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 73 | </target> |
Siva Velusamy | e63fabc | 2012-01-26 15:48:45 -0800 | [diff] [blame] | 74 | |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 75 | <!-- Launch pde build --> |
Siva Velusamy | e63fabc | 2012-01-26 15:48:45 -0800 | [diff] [blame] | 76 | <target name="pde-build" depends="copy_srcs, create-target"> |
| 77 | <java classname="org.eclipse.equinox.launcher.Main" fork="true" failonerror="true"> |
| 78 | <arg value="-application" /> |
| 79 | <arg value="org.eclipse.ant.core.antRunner" /> |
| 80 | <arg value="-buildfile" /> |
| 81 | <arg value="${pde.build.dir}/scripts/productBuild/productBuild.xml" /> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 82 | <arg value="-data" /> |
| 83 | <arg value="${buildDir}/workspace" /> |
Raphael Moll | 5abe8b2 | 2012-03-30 15:50:45 -0700 | [diff] [blame] | 84 | <arg value="-configuration" /> |
| 85 | <arg value="${buildDir}/configuration" /> |
Siva Velusamy | e63fabc | 2012-01-26 15:48:45 -0800 | [diff] [blame] | 86 | <arg value="-Dtimestamp=${timestamp}" /> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 87 | <arg value="-DeclipseLocation=${baseBuilder}" /> |
| 88 | <arg value="-DbuildDirectory=${buildDir}" /> |
| 89 | <arg value="-DbaseLocation=${targetDir}/deltapack/eclipse" /> |
| 90 | <arg value="-DrepoBaseLocation=${targetDir}/repos/" /> |
| 91 | <arg value="-DtransformedRepoLocation=${targetDir}/transformedRepos/" /> |
Siva Velusamy | e63fabc | 2012-01-26 15:48:45 -0800 | [diff] [blame] | 92 | <arg value="-Dconfigs=${buildconfigs}" /> |
| 93 | <classpath> |
| 94 | <pathelement location="${equinox.launcher}" /> |
| 95 | </classpath> |
| 96 | </java> |
| 97 | </target> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 98 | |
Siva Velusamy | e63fabc | 2012-01-26 15:48:45 -0800 | [diff] [blame] | 99 | <target name="clean"> |
| 100 | <delete dir="${outDir}" /> |
| 101 | <delete dir="${targetDir}" /> |
| 102 | </target> |
| 103 | |
| 104 | <target name="build" depends="pde-build" /> |
Siva Velusamy | 6ca42e8 | 2011-12-08 14:25:37 -0800 | [diff] [blame] | 105 | </project> |