| OLD | NEW |
| 1 <!-- Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 <!-- |
| 2 | 2 Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 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 <import file="../../../../build/android/ant/chromium-jars.xml" /> |
| 11 <property name="src" location="src"/> | |
| 12 <property name="out.dir" location="${PRODUCT_DIR}/lib.java"/> | |
| 13 <property name="classes.dir" location="${PRODUCT_DIR}/java/${PACKAGE_NAME}"/> | |
| 14 <property name="jar.dir" location="${out.dir}"/> | |
| 15 | 11 |
| 16 <target name="init"> | 12 <path id="javac.custom.classpath"> |
| 17 <!-- Create the time stamp --> | 13 <pathelement location="${ANDROID_SDK}/android.jar" /> |
| 18 <tstamp/> | 14 <pathelement location="${lib.dir}/chromium_base.jar" /> |
| 19 <!-- Create the build directory structure used by compile --> | 15 <pathelement location="${lib.dir}/chromium_net.jar" /> |
| 20 <mkdir dir="${out.dir}"/> | 16 </path> |
| 21 </target> | 17 <!-- Override javac path to include jars in lib.java directory --> |
| 22 | 18 <property-value name="javac.srcdir" value="${src}:${lib.dir}" /> |
| 23 <target name="compile" depends="init" | |
| 24 description="compile the source " > | |
| 25 <!-- Create the classes output directory --> | |
| 26 <mkdir dir="${classes.dir}"/> | |
| 27 | |
| 28 <!-- Compile the java code from ${src} into ${classes.dir} --> | |
| 29 <!-- Gyp target should have compiled aidl files into java source files in | |
| 30 lib.jar (see content.gyp:common_aidl). --> | |
| 31 <javac srcdir="${src}:${out.dir}" destdir="${classes.dir}" debug="true" incl
udeantruntime="false"> | |
| 32 <classpath> | |
| 33 <pathelement path="${ANDROID_SDK}/android.jar" /> | |
| 34 <pathelement path="${jar.dir}/chromium_base.jar" /> | |
| 35 <pathelement path="${jar.dir}/chromium_net.jar" /> | |
| 36 </classpath> | |
| 37 </javac> | |
| 38 </target> | |
| 39 | |
| 40 <target name="dist" depends="compile" | |
| 41 description="generate the distribution" > | |
| 42 <!-- Create the distribution directory --> | |
| 43 <mkdir dir="${jar.dir}"/> | |
| 44 | |
| 45 <!-- Put everything in ${classes.dir} into the chromium_content.jar file --> | |
| 46 <jar jarfile="${jar.dir}/chromium_${PACKAGE_NAME}.jar" basedir="${classes.di
r}"/> | |
| 47 </target> | |
| 48 | |
| 49 <target name="clean" description="clean up" > | |
| 50 <!-- Delete the generated content --> | |
| 51 <delete dir="${classes.dir}"/> | |
| 52 <delete file="${jar.dir}/chromium_${PACKAGE_NAME}.jar"/> | |
| 53 </target> | |
| 54 </project> | 19 </project> |
| OLD | NEW |