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

Unified Diff: build/android/ant/apk-package.xml

Issue 22870021: [Android] Makes GYP changes for EMMA coverage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverts accidental change in common.gypi, moves emma_device_jar to gyp Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/dex_action.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..69f55015521e567812525c6d94dd0df92a491c3f 100644
--- a/build/android/ant/apk-package.xml
+++ b/build/android/ant/apk-package.xml
@@ -21,6 +21,11 @@
<property name="out.absolute.dir" location="${out.dir}" />
<property name="sdk.dir" location="${ANDROID_SDK_ROOT}"/>
+ <property name="emma.device.jar" location="${EMMA_DEVICE_JAR}" />
+
+ <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">
@@ -54,21 +59,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="${emma.device.jar}" />
+ </extra-jars>
+ </package-helper>
+ </then>
+ <else>
+ <package-helper />
+ </else>
+ </if>
</target>
</project>
« no previous file with comments | « no previous file | build/android/dex_action.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698