diff options
author | yfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-06 23:23:51 +0000 |
---|---|---|
committer | yfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-06 23:23:51 +0000 |
commit | 300800480f12dc97c8e9d90dd101fabd29203115 (patch) | |
tree | 21cfcb39e090675b55c3c512da10ee721bd11817 /base | |
parent | 4f3db5b5a785511a73282af279d3f30c975944a9 (diff) | |
download | chromium_src-300800480f12dc97c8e9d90dd101fabd29203115.zip chromium_src-300800480f12dc97c8e9d90dd101fabd29203115.tar.gz chromium_src-300800480f12dc97c8e9d90dd101fabd29203115.tar.bz2 |
[Android] Add chrome_java target for building Java code in the chromium layer.
Also includes a refactoring of the Ant xml scripts to use a common template (contributed by shashishekhar@chromium.org). As part of this, I also continued Torne's effort of removing our reliance on environment variables. Unfortunately this currently means that you have to specify 5 gyp flags:
ANDROID_SDK, ANDROID_SDK_ROOT, ANDROID_SDK_TOOLS, ANDROID_SDK_VERSION, ANDROID_TOOLCHAIN.
This'll get better as we make further use of the checked in sdk both upstream and downstream. The problem stems from the android tree and released sdk having different configurations.
Review URL: https://chromiumcodereview.appspot.com/10830012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150172 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/android/java/base.xml | 55 |
1 files changed, 9 insertions, 46 deletions
diff --git a/base/android/java/base.xml b/base/android/java/base.xml index 8698341..e315875 100644 --- a/base/android/java/base.xml +++ b/base/android/java/base.xml @@ -1,52 +1,15 @@ +<!-- + Copyright (c) 2012 The Chromium Authors. All rights reserved. + Use of this source code is governed by a BSD-style license that can be + found in the LICENSE file. +--> <project name="Base" default="dist" basedir="."> <description> building base java source code with ant </description> - <!-- Set global properties for this build --> - <property name="src" location="src"/> - <property name="dist" location="dist"/> - <property name="out.dir" location="${PRODUCT_DIR}/lib.java"/> - <!-- TODO(jrg): establish a standard for the intermediate java - directories. Settle on a standard once ant/jar build files - like this are androidified --> - <property name="dest.dir" location="${PRODUCT_DIR}/java/base"/> + <import file="../../../build/android/ant/chromium-jars.xml" /> - <target name="init"> - <!-- Create the time stamp --> - <tstamp/> - <!-- Create the build directory structure used by compile --> - <mkdir dir="${out.dir}"/> - <mkdir dir="${dest.dir}"/> - </target> - - <target name="compile" depends="init" - description="compile the source " > - <!-- Compile the java code from ${src} into ${build} --> - <!-- TODO(jrg): adapting this to a proper android antfile will - remove warnings like this: - base.xml:23: warning: 'includeantruntime' was not set, - defaulting to build.sysclasspath=last; - set to false for repeatable builds - --> - <javac srcdir="${src}" destdir="${dest.dir}" debug="true" includeantruntime="false"> - <classpath> - <path location="${ANDROID_SDK}/android.jar"/> - </classpath> - </javac> - </target> - - <target name="dist" depends="compile" - description="generate the distribution" > - <!-- Create the distribution directory --> - <mkdir dir="${out.dir}"/> - - <jar jarfile="${out.dir}/chromium_base.jar" basedir="${dest.dir}"/> - </target> - - <target name="clean" - description="clean up" > - <!-- Delete the appropriate directory trees --> - <delete dir="${dest.dir}"/> - <delete dir="${dist}"/> - </target> + <path id="javac.custom.classpath"> + <pathelement location="${ANDROID_SDK}/android.jar" /> + </path> </project> |