Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <project name="Base" default="dist" basedir="."> | 1 <project name="Base" default="dist" basedir="."> |
| 2 <description> | 2 <description> |
| 3 building base java source code with ant | 3 building base java source code with ant |
| 4 </description> | 4 </description> |
| 5 <!-- Set global properties for this build --> | 5 <!-- Set global properties for this build --> |
| 6 <property environment="env"/> | 6 <property environment="env"/> |
| 7 <property name="sdk.dir" location="${env.ANDROID_SDK_ROOT}"/> | 7 <property name="sdk.dir" location="${env.ANDROID_SDK_ROOT}"/> |
| 8 <property name="sdk.version" value="${env.ANDROID_SDK_VERSION}"/> | 8 <property name="sdk.version" value="${env.ANDROID_SDK_VERSION}"/> |
| 9 <property name="src" location="."/> | 9 <property name="src" location="."/> |
| 10 <property name="build" location="build"/> | |
| 11 <property name="dist" location="dist"/> | 10 <property name="dist" location="dist"/> |
| 11 <property name="out.dir" location="${PRODUCT_DIR}"/> | |
| 12 <!-- TODO(jrg): establish a standard for the intermediate java | |
| 13 directories. Settle on a standard once ant/jar build files | |
| 14 like this are androidified --> | |
| 15 <property name="dest.dir" location="${PRODUCT_DIR}/base_java"/> | |
|
bulach
2012/04/12 15:51:42
hmm, not too keen on base_java.. how about either:
John Grabowski
2012/04/13 01:11:37
went with java/base to closer reflect other use ca
| |
| 12 | 16 |
| 13 <target name="init"> | 17 <target name="init"> |
| 14 <!-- Create the time stamp --> | 18 <!-- Create the time stamp --> |
| 15 <tstamp/> | 19 <tstamp/> |
| 16 <!-- Create the build directory structure used by compile --> | 20 <!-- Create the build directory structure used by compile --> |
| 17 <mkdir dir="${build}"/> | 21 <mkdir dir="${out.dir}"/> |
| 22 <mkdir dir="${dest.dir}"/> | |
| 18 </target> | 23 </target> |
| 19 | 24 |
| 20 <target name="compile" depends="init" | 25 <target name="compile" depends="init" |
| 21 description="compile the source " > | 26 description="compile the source " > |
| 22 <!-- Compile the java code from ${src} into ${build} --> | 27 <!-- Compile the java code from ${src} into ${build} --> |
| 23 <javac srcdir="${src}" destdir="${build}"> | 28 <!-- TODO(jrg): adapting this to a proper android antfile will |
| 29 remove warnings like this: | |
| 30 base.xml:23: warning: 'includeantruntime' was not set, | |
| 31 defaulting to build.sysclasspath=last; | |
| 32 set to false for repeatable builds | |
| 33 --> | |
| 34 <javac srcdir="${src}" destdir="${dest.dir}"> | |
| 24 <classpath> | 35 <classpath> |
| 25 <path location="${sdk.dir}/platforms/android-${sdk.version}/android.jar" /> | 36 <path location="${sdk.dir}/platforms/android-${sdk.version}/android.jar" /> |
| 26 </classpath> | 37 </classpath> |
| 27 </javac> | 38 </javac> |
| 28 </target> | 39 </target> |
| 29 | 40 |
| 30 <target name="dist" depends="compile" | 41 <target name="dist" depends="compile" |
| 31 description="generate the distribution" > | 42 description="generate the distribution" > |
| 32 <!-- Create the distribution directory --> | 43 <!-- Create the distribution directory --> |
| 33 <mkdir dir="${dist}/lib"/> | 44 <mkdir dir="${dist}/lib"/> |
| 34 | 45 |
| 35 <!-- Put everything in ${build} into the chromium_base.jar file --> | 46 <jar jarfile="${out.dir}/chromium_base.jar" basedir="${dest.dir}"/> |
| 36 <jar jarfile="${dist}/lib/chromium_base.jar" basedir="${build}"/> | |
| 37 </target> | 47 </target> |
| 38 | 48 |
| 39 <target name="clean" | 49 <target name="clean" |
| 40 description="clean up" > | 50 description="clean up" > |
| 41 <!-- Delete the ${build} and ${dist} directory trees --> | 51 <!-- Delete the appropriate directory trees --> |
| 42 <delete dir="${build}"/> | 52 <delete dir="${dest.dir}"/> |
| 43 <delete dir="${dist}"/> | 53 <delete dir="${dist}"/> |
| 44 </target> | 54 </target> |
| 45 </project> | 55 </project> |
| OLD | NEW |