Chromium Code Reviews| Index: build/android/ant/apk-package.xml |
| diff --git a/build/android/ant/apk-package.xml b/build/android/ant/apk-package.xml |
| index eeb156c94f0e82169fd32ea548e5d2a4074b4b3e..5949063a62049e35b4cbe4b417b7bb59db14ad97 100644 |
| --- a/build/android/ant/apk-package.xml |
| +++ b/build/android/ant/apk-package.xml |
| @@ -22,6 +22,10 @@ |
| <property name="sdk.dir" location="${ANDROID_SDK_ROOT}"/> |
| + <condition property="emma.enabled" value="true" else="false"> |
| + <equals arg1="${EMMA_INSTRUMENT}" arg2="1"/> |
| + </condition> |
| + |
| <!-- jar file from where the tasks are loaded --> |
| <path id="android.antlibs"> |
| <pathelement path="${sdk.dir}/tools/lib/ant-tasks.jar" /> |
| @@ -54,21 +58,43 @@ |
| <property name="source.dir" value="${SOURCE_DIR}" /> |
| <property name="source.absolute.dir" location="${source.dir}" /> |
| + <!-- Macro that enables passing a variable list of external jar files |
| + to ApkBuilder. --> |
| + <macrodef name="package-helper"> |
| + <element name="extra-jars" optional="yes" /> |
| + <sequential> |
| + <apkbuilder |
| + outfolder="${out.absolute.dir}" |
| + resourcefile="${resource.package.file.name}" |
| + apkfilepath="${out.packaged.file}" |
| + debugpackaging="${build.is.packaging.debug}" |
| + debugsigning="${build.is.signing.debug}" |
| + verbose="${verbose}" |
| + hascode="true" |
| + previousBuildType="/" |
| + buildType="${build.is.packaging.debug}/${build.is.signing.debug}"> |
| + <dex path="${intermediate.dex.file}"/> |
| + <sourcefolder path="${source.absolute.dir}"/> |
| + <nativefolder path="${native.libs.absolute.dir}" /> |
| + <extra-jars/> |
| + </apkbuilder> |
| + </sequential> |
| + </macrodef> |
| + |
| + |
| <!-- Packages the application. --> |
| <target name="-package"> |
| - <apkbuilder |
| - outfolder="${out.absolute.dir}" |
| - resourcefile="${resource.package.file.name}" |
| - apkfilepath="${out.packaged.file}" |
| - debugpackaging="${build.is.packaging.debug}" |
| - debugsigning="${build.is.signing.debug}" |
| - verbose="${verbose}" |
| - hascode="true" |
| - previousBuildType="/" |
| - buildType="${build.is.packaging.debug}/${build.is.signing.debug}"> |
| - <dex path="${intermediate.dex.file}"/> |
| - <sourcefolder path="${source.absolute.dir}"/> |
| - <nativefolder path="${native.libs.absolute.dir}" /> |
| - </apkbuilder> |
| + <if condition="${emma.enabled}"> |
| + <then> |
| + <package-helper> |
| + <extra-jars> |
| + <jarfile path="${sdk.dir}/tools/lib/emma_device.jar" /> |
|
cjhopman
2013/08/21 18:32:14
Nit: Pass this path from gyp, too.
gkanwar1
2013/08/21 18:50:39
Done.
|
| + </extra-jars> |
| + </package-helper> |
| + </then> |
| + <else> |
| + <package-helper /> |
| + </else> |
| + </if> |
| </target> |
| </project> |