| OLD | NEW |
| 1 <!-- Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 <!-- Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 | 2 |
| 3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
| 4 found in the LICENSE file. | 4 found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 <project name="Content" default="dist" basedir="."> | 6 <project name="Content" default="dist" basedir="."> |
| 7 <description> | 7 <description> |
| 8 building content java source code with ant | 8 building content java source code with ant |
| 9 </description> | 9 </description> |
| 10 <!-- set global properties for this build --> | 10 <!-- set global properties for this build --> |
| 11 <property environment="env"/> | 11 <property environment="env"/> |
| 12 <property name="sdk.dir" location="${env.ANDROID_SDK_ROOT}"/> | 12 <property name="sdk.dir" location="${env.ANDROID_SDK_ROOT}"/> |
| 13 <property name="sdk.version" value="${env.ANDROID_SDK_VERSION}"/> | 13 <property name="sdk.version" value="${env.ANDROID_SDK_VERSION}"/> |
| 14 <property name="src" location="."/> | 14 <property name="src" location="."/> |
| 15 <property name="out.dir" location="${PRODUCT_DIR}"/> | 15 <property name="out.dir" location="${PRODUCT_DIR}/lib.java"/> |
| 16 <property name="classes.dir" location="${out.dir}/java/${PACKAGE_NAME}"/> | 16 <property name="classes.dir" location="${out.dir}/java/${PACKAGE_NAME}"/> |
| 17 <!-- TODO(tedchoc): Move out of the main out/ dir ... needs to sync with | |
| 18 java.gypi output --> | |
| 19 <property name="jar.dir" location="${out.dir}"/> | 17 <property name="jar.dir" location="${out.dir}"/> |
| 20 | 18 |
| 21 <condition property="location.base" | 19 <condition property="location.base" |
| 22 value="${sdk.dir}" | 20 value="${sdk.dir}" |
| 23 else="${sdk.dir}/platforms/android-${sdk.version}"> | 21 else="${sdk.dir}/platforms/android-${sdk.version}"> |
| 24 <isset property="env.ANDROID_BUILD_TOP"/> | 22 <isset property="env.ANDROID_BUILD_TOP"/> |
| 25 </condition> | 23 </condition> |
| 26 | 24 |
| 27 <target name="init"> | 25 <target name="init"> |
| 28 <!-- Create the time stamp --> | 26 <!-- Create the time stamp --> |
| 29 <tstamp/> | 27 <tstamp/> |
| 30 <!-- Create the build directory structure used by compile --> | 28 <!-- Create the build directory structure used by compile --> |
| 31 <mkdir dir="${out.dir}"/> | 29 <mkdir dir="${out.dir}"/> |
| 32 </target> | 30 </target> |
| 33 | 31 |
| 34 <target name="compile" depends="init" | 32 <target name="compile" depends="init" |
| 35 description="compile the source " > | 33 description="compile the source " > |
| 36 <!-- Create the classes output directory --> | 34 <!-- Create the classes output directory --> |
| 37 <mkdir dir="${classes.dir}"/> | 35 <mkdir dir="${classes.dir}"/> |
| 38 | 36 |
| 39 <!-- Compile the java code from ${src} into ${classes.dir} --> | 37 <!-- Compile the java code from ${src} into ${classes.dir} --> |
| 40 <javac srcdir="${src}" destdir="${classes.dir}"> | 38 <javac srcdir="${src}" destdir="${classes.dir}"> |
| 41 <classpath> | 39 <classpath> |
| 42 <path location="${location.base}/android.jar"/> | 40 <pathelement path="${location.base}/android.jar" /> |
| 43 <path location="${PRODUCT_DIR}/chromium_base.jar"/> | 41 <pathelement path="${jar.dir}/chromium_base.jar" /> |
| 44 </classpath> | 42 </classpath> |
| 45 </javac> | 43 </javac> |
| 46 </target> | 44 </target> |
| 47 | 45 |
| 48 <target name="dist" depends="compile" | 46 <target name="dist" depends="compile" |
| 49 description="generate the distribution" > | 47 description="generate the distribution" > |
| 50 <!-- Create the distribution directory --> | 48 <!-- Create the distribution directory --> |
| 51 <mkdir dir="${jar.dir}"/> | 49 <mkdir dir="${jar.dir}"/> |
| 52 | 50 |
| 53 <!-- Put everything in ${classes.dir} into the chromium_content.jar file --> | 51 <!-- Put everything in ${classes.dir} into the chromium_content.jar file --> |
| 54 <jar jarfile="${jar.dir}/chromium_${PACKAGE_NAME}.jar" basedir="${classes.di
r}"/> | 52 <jar jarfile="${jar.dir}/chromium_${PACKAGE_NAME}.jar" basedir="${classes.di
r}"/> |
| 55 </target> | 53 </target> |
| 56 | 54 |
| 57 <target name="clean" description="clean up" > | 55 <target name="clean" description="clean up" > |
| 58 <!-- Delete the generated content --> | 56 <!-- Delete the generated content --> |
| 59 <delete dir="${classes.dir}"/> | 57 <delete dir="${classes.dir}"/> |
| 60 <delete file="${jar.dir}/chromium_${PACKAGE_NAME}.jar"/> | 58 <delete file="${jar.dir}/chromium_${PACKAGE_NAME}.jar"/> |
| 61 </target> | 59 </target> |
| 62 </project> | 60 </project> |
| OLD | NEW |