Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Side by Side Diff: build/android/ant/common.xml

Issue 10830012: [Android] Add chrome_java target for building Java code in the chromium layer. (Closed) Base URL: http://git.chromium.org/chromium/src.git@reland
Patch Set: formatting Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
6 -->
7 <project name="chrome_common_defines">
8 <!-- Common build properties for Chrome for android. -->
9
10 <!--
11 Macro for checking that a property is correctly set. Performs checks for:
12 1. Property is set and not null.
13 2. String value of property does not contains any '$' signs.
14 -->
15 <macrodef name="check-property-value">
16 <attribute name="property"/>
17 <sequential>
18 <fail message ="Property @{property} is not set.">
19 <condition>
20 <or>
21 <not><isset property="@{property}"/></not>
22 <length string="${@{property}}" trim="true" when="less" length="1"/>
23 </or>
24 </condition>
25 </fail>
26 <!--
27 Check for $ signs. This catches errors when properties are initialized f rom environment
28 variables. E.g. if we have <property name="foo" value="${env.bar}" /> bu t env.bar is
29 not set then foo will have the literal value of '${env.bar}'.
30 -->
31 <fail message="Value checked failed for property: @{property} : ${@{proper ty}}.
32 Property value contains an uninitialized environment variable.">
33 <condition>
34 <contains string="${@{property}}" substring="$"/>
35 </condition>
36 </fail>
37 </sequential>
38 </macrodef>
39
40 <!--
41 A safe setter for location properties. Checks that a location is not
42 empty and actually exists. For specifying output directories, location
43 check can be disabled by specifying check-exists="false".
44 -->
45 <macrodef name="property-location">
46 <attribute name="name"/>
47 <attribute name="location"/>
48 <attribute name="check-exists" default="true"/>
49 <sequential>
50 <property name="@{name}" location="@{location}"/>
51 <check-property-value property="@{name}"/>
52 <fail message="Location specified for @{name} : @{location} does not exist .">
53 <condition>
54 <and>
55 <equals arg1="@{check-exists}" arg2="true"/>
56 <not><available type="dir" file="@{location}"/></not>
57 </and>
58 </condition>
59 </fail>
60 </sequential>
61 </macrodef>
62
63 <!-- A safe setter for property values -->
64 <macrodef name="property-value">
65 <attribute name="name"/>
66 <attribute name="value"/>
67 <sequential>
68 <property name="@{name}" value="@{value}"/>
69 <check-property-value property="@{name}"/>
70 </sequential>
71 </macrodef>
72
73 <!-- Common environment properties. -->
74 <property environment="env"/>
75 <property-location name="sdk.dir" location="${env.ANDROID_SDK_ROOT}"/>
76 <property-location name="toolchain.dir" location="${env.ANDROID_TOOLCHAIN}"/>
77 <property name="source.dir" location="src"/>
78 <property-value name="target" value="android-${env.ANDROID_SDK_VERSION}"/>
79 <property-value name="sdk.version" value="${env.ANDROID_SDK_VERSION}"/>
80
81 <!--
82 Set path depending on the type of repository. If ANDROID_BUILD_TOP is
83 set then build using the provided location. Otherwise, assume the build
84 is using the released SDK and set the path accordingly.
85 -->
86 <condition property="location.base" value="${sdk.dir}"
87 else="${sdk.dir}/platforms/android-${sdk.version}">
88 <isset property="env.ANDROID_BUILD_TOP"/>
89 </condition>
90 </project>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698