diff options
-rw-r--r-- | build/android/ant/common.xml | 92 | ||||
-rw-r--r-- | build/android/ant/sdk-targets.xml | 278 | ||||
-rw-r--r-- | build/apk_test.gypi | 47 | ||||
-rw-r--r-- | testing/android/README.chromium | 5 | ||||
-rwxr-xr-x | testing/android/generate_native_test.py | 202 | ||||
-rw-r--r-- | testing/android/native_test_apk.xml | 87 | ||||
-rw-r--r-- | testing/android/res/values/strings.xml | 11 |
7 files changed, 4 insertions, 718 deletions
diff --git a/build/android/ant/common.xml b/build/android/ant/common.xml deleted file mode 100644 index 8559949..0000000 --- a/build/android/ant/common.xml +++ /dev/null @@ -1,92 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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="chrome_common_defines"> - <!-- Common build properties for Chrome for android. --> - - <!-- - Macro for checking that a property is correctly set. Performs checks for: - 1. Property is set and not null. - 2. String value of property does not contains any '$' signs. - --> - <macrodef name="check-property-value"> - <attribute name="property"/> - <sequential> - <fail message ="Property @{property} is not set."> - <condition> - <or> - <not><isset property="@{property}"/></not> - <length string="${@{property}}" trim="true" when="less" length="1"/> - </or> - </condition> - </fail> - <!-- - Check for $ signs. This catches errors when properties are initialized from environment - variables. E.g. if we have <property name="foo" value="${env.bar}" /> but env.bar is - not set then foo will have the literal value of '${env.bar}'. - --> - <fail message="Value checked failed for property: @{property} : ${@{property}}. - Property value contains an uninitialized environment variable."> - <condition> - <contains string="${@{property}}" substring="$"/> - </condition> - </fail> - </sequential> - </macrodef> - - <!-- - A safe setter for location properties. Checks that a location is not - empty and actually exists. For specifying output directories, location - check can be disabled by specifying check-exists="false". - --> - <macrodef name="property-location"> - <attribute name="name"/> - <attribute name="location"/> - <attribute name="check-exists" default="true"/> - <sequential> - <property name="@{name}" location="@{location}"/> - <check-property-value property="@{name}"/> - <fail message="Location specified for @{name} : @{location} does not exist."> - <condition> - <and> - <equals arg1="@{check-exists}" arg2="true"/> - <not><available file="@{location}"/></not> - </and> - </condition> - </fail> - </sequential> - </macrodef> - - <!-- A safe setter for property values --> - <macrodef name="property-value"> - <attribute name="name"/> - <attribute name="value"/> - <sequential> - <property name="@{name}" value="@{value}"/> - <check-property-value property="@{name}"/> - </sequential> - </macrodef> - - <!-- Common environment properties. --> - <property-location name="sdk.dir" location="${ANDROID_SDK_ROOT}"/> - <property-value name="target" value="android-${ANDROID_SDK_VERSION}"/> - <property name="source.dir" location="src"/> - <property-location name="android.gdbserver" location="${ANDROID_GDBSERVER}"/> - <!-- - Common directories used by SDK Build, when making changes here - make sure to update gyp files and test scripts constants in - build/android/pylib/constants.py - --> - <!-- Common directory for chromium_*.jars. --> - <property-location name="lib.java.dir" location="${PRODUCT_DIR}/lib.java"/> - <!-- Common directory for test jars. --> - <property-location name="test.lib.java.dir" - location="${PRODUCT_DIR}/test.lib.java"/> - <!-- Common directory for apks. --> - <property-location name="apks.dir" location="${PRODUCT_DIR}/apks"/> - <!-- Don't worry about computing deps in ant. They're managed in gyp. --> - <property name="dont.do.deps" value="true"/> -</project> diff --git a/build/android/ant/sdk-targets.xml b/build/android/ant/sdk-targets.xml deleted file mode 100644 index 3ad77e2..0000000 --- a/build/android/ant/sdk-targets.xml +++ /dev/null @@ -1,278 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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="chrome_sdk_overrides" > - <!-- - Redefinition of targets used by SDK tools. - Supported version: SDK tools revision 20. - - SDK tools do not allow easy way of extending classpaths - for aidl and javac. This file defines targets which can be used to - override targets used by tools. - --> - <target name="-pre-compile"> - <!-- - Remove all .class files from the output directory. This prevents inclusion of incorrect .class - files in the final apk. For example, if a .java file was deleted, the apk should not contain - the .class files for that .java from previous builds. - --> - <delete> - <fileset dir="${out.classes.absolute.dir}" includes="**/*.class"/> - </delete> - </target> - - <!-- - Override the -compile target. - This target requires 'javac.custom.classpath' to be set to reference - of classpath to be used for javac. Also accepts custom path for - sources: 'javac.custom.sourcepath'. - --> - <target - name="-compile" - depends="-build-setup, -pre-build, -code-gen, -pre-compile"> - <do-only-if-manifest-hasCode elseText="hasCode = false. Skipping..." > - <!-- If javac.srcdirs.additional isn't set, set it to an empty path. --> - <if> - <condition> - <not> - <isreference refid="javac.srcdirs.additional"/> - </not> - </condition> - <then> - <path id="javac.srcdirs.additional"/> - </then> - </if> - <javac - bootclasspathref="project.target.class.path" - classpathref="javac.custom.classpath" - debug="true" - destdir="${out.classes.absolute.dir}" - encoding="${java.encoding}" - extdirs="" - fork="${need.javac.fork}" - includeantruntime="false" - source="${java.source}" - target="${java.target}" - verbose="${verbose}"> - <src path="${source.absolute.dir}"/> - <src path="${gen.absolute.dir}"/> - <src> - <path refid="javac.srcdirs.additional"/> - </src> - <compilerarg value="-Xlint:unchecked"/> - <compilerarg line="${java.compilerargs}"/> - </javac> - <!-- - If the project is instrumented, then instrument the classes - TODO(shashishekhar): Add option to override emma filter. - --> - <if condition="${build.is.instrumented}"> - <then> - <echo level="info"> - Instrumenting classes from ${out.absolute.dir}/classes... - </echo> - <!-- build the default filter to remove R, Manifest, BuildConfig --> - <getemmafilter - appPackage="${project.app.package}" - filterOut="emma.default.filter" - libraryPackagesRefId="project.library.packages"/> - <!-- - Define where the .em file is output. - This may have been setup already if this is a library. - --> - <property name="emma.coverage.absolute.file" - location="${out.absolute.dir}/coverage.em"/> - <!-- It only instruments class files, not any external libs --> - - <emma enabled="true"> - <instr - instrpath="${out.absolute.dir}/classes" - metadatafile="${emma.coverage.absolute.file}" - mode="overwrite" - outdir="${out.absolute.dir}/classes" - verbosity="${verbosity}"> - <filter excludes="${emma.default.filter}"/> - <filter value="${emma.filter}"/> - </instr> - </emma> - </then> - </if> - <!-- - If the project needs a test jar then generate a jar containing - all compiled classes and referenced jars. - project.is.testapp is set by Android's ant build system based on the - target's manifest. It is true only for instrumentation apks. - --> - <if condition="${project.is.testapp}"> - <then> - <property-location name="create.test.jar.file" - location="${CHROMIUM_SRC}/build/android/ant/create-test-jar.js"/> - <script language="javascript" src="${create.test.jar.file}"/> - </then> - </if> - - </do-only-if-manifest-hasCode> - </target> - - <!-- - For debug builds, the Android SDK tools create a key in ~/.android and sign the build with it. - This has caused all kinds of issues. Instead, the debug build should be signed with a key in - build/android/ant. The SDK tools do not provide any support for overriding that behavior and so - instead one must use the hack below. - --> - - <!-- Disables automatic signing. --> - <property name="build.is.signing.debug" value="false"/> - - <!-- TODO(cjhopman): Remove this property when all gyp files define the CHROMIUM_SRC property. --> - <property name="CHROMIUM_SRC" value="${PRODUCT_DIR}/../.." /> - - <property name="key.store" value="${CHROMIUM_SRC}/build/android/ant/chromium-debug.keystore"/> - <property name="key.store.password" value="chromium"/> - <property name="key.alias" value="chromiumdebugkey"/> - <property name="key.alias.password" value="chromium"/> - - <!-- SDK tools assume that out.packaged.file is signed and name it "...-unaligned" --> - <property name="out.packaged.file" - value="${apks.dir}/${ant.project.name}-unsigned.apk" /> - <property name="out.unaligned.file" - value="${apks.dir}/${ant.project.name}-unaligned.apk" /> - - <!-- By default, the SDK tools build only aligns the APK in the -do-debug target. --> - <target name="-do-debug" - depends="-set-debug-mode, -debug-obfuscation-check, -package, -post-package"> - <!-- only create apk if *not* a library project --> - <do-only-if-not-library elseText="Library project: do not create apk..." > - <sequential> - <!-- Signs the APK --> - <echo level="info">Signing final apk...</echo> - <signapk - input="${out.packaged.file}" - output="${out.unaligned.file}" - keystore="${key.store}" - storepass="${key.store.password}" - alias="${key.alias}" - keypass="${key.alias.password}"/> - - <!-- Zip aligns the APK --> - <zipalign-helper - in.package="${out.unaligned.file}" - out.package="${out.final.file}" /> - <echo level="info">Release Package: ${out.final.file}</echo> - </sequential> - </do-only-if-not-library> - <record-build-info /> - </target> - - <path id="native.libs.gdbserver"> - <fileset file="${android.gdbserver}"/> - </path> - - <target name="-post-compile"> - <!-- - Copy gdbserver to main libs directory if building a non-instrumentation debug apk. - --> - <if> - <condition> - <and> - <equals arg1="${build.target}" arg2="debug"/> - <isfalse value="${project.is.testapp}"/> - </and> - </condition> - <then> - <copy todir="${out.dir}/libs/${target.abi}"> - <path refid="native.libs.gdbserver"/> - </copy> - </then> - </if> - - <!-- Package all the compiled .class files into a .jar. --> - <jar - jarfile="${lib.java.dir}/${JAR_NAME}" - basedir="${out.classes.absolute.dir}" - /> - </target> - - <!-- - Override obfuscate target to pass javac.custom.classpath to Proguard. SDK tools do not provide - any way to pass custom class paths to Proguard. - --> - <target name="-obfuscate"> - <if condition="${proguard.enabled}"> - <then> - <property name="obfuscate.absolute.dir" location="${out.absolute.dir}/proguard"/> - <property name="preobfuscate.jar.file" value="${obfuscate.absolute.dir}/original.jar"/> - <property name="obfuscated.jar.file" value="${obfuscate.absolute.dir}/obfuscated.jar"/> - <!-- input for dex will be proguard's output --> - <property name="out.dex.input.absolute.dir" value="${obfuscated.jar.file}"/> - - <!-- Add Proguard Tasks --> - <property name="proguard.jar" location="${android.tools.dir}/proguard/lib/proguard.jar"/> - <taskdef name="proguard" classname="proguard.ant.ProGuardTask" classpath="${proguard.jar}"/> - - <!-- Set the android classpath Path object into a single property. It'll be - all the jar files separated by a platform path-separator. - Each path must be quoted if it contains spaces. - --> - <pathconvert property="project.target.classpath.value" refid="project.target.class.path"> - <firstmatchmapper> - <regexpmapper from='^([^ ]*)( .*)$$' to='"\1\2"'/> - <identitymapper/> - </firstmatchmapper> - </pathconvert> - - <!-- Build a path object with all the jar files that must be obfuscated. - This include the project compiled source code and any 3rd party jar - files. --> - <path id="project.all.classes.path"> - <pathelement location="${preobfuscate.jar.file}"/> - <path refid="project.all.jars.path"/> - <!-- Pass javac.custom.classpath for apks. --> - <path refid="javac.custom.classpath"/> - </path> - <!-- Set the project jar files Path object into a single property. It'll be - all the jar files separated by a platform path-separator. - Each path must be quoted if it contains spaces. - --> - <pathconvert property="project.all.classes.value" refid="project.all.classes.path"> - <firstmatchmapper> - <regexpmapper from='^([^ ]*)( .*)$$' to='"\1\2"'/> - <identitymapper/> - </firstmatchmapper> - </pathconvert> - - <!-- Turn the path property ${proguard.config} from an A:B:C property - into a series of includes: -include A -include B -include C - suitable for processing by the ProGuard task. Note - this does - not include the leading '-include "' or the closing '"'; those - are added under the <proguard> call below. - --> - <path id="proguard.configpath"> - <pathelement path="${proguard.config}"/> - </path> - <pathconvert pathsep='" -include "' property="proguard.configcmd" - refid="proguard.configpath"/> - - <mkdir dir="${obfuscate.absolute.dir}"/> - <delete file="${preobfuscate.jar.file}"/> - <delete file="${obfuscated.jar.file}"/> - <jar basedir="${out.classes.absolute.dir}" - destfile="${preobfuscate.jar.file}"/> - <proguard> - -include "${proguard.configcmd}" - -include "${out.absolute.dir}/proguard.txt" - -injars ${project.all.classes.value} - -outjars "${obfuscated.jar.file}" - -libraryjars ${project.target.classpath.value} - -dump "${obfuscate.absolute.dir}/dump.txt" - -printseeds "${obfuscate.absolute.dir}/seeds.txt" - -printusage "${obfuscate.absolute.dir}/usage.txt" - -printmapping "${obfuscate.absolute.dir}/mapping.txt" - </proguard> - </then> - </if> - </target> -</project> diff --git a/build/apk_test.gypi b/build/apk_test.gypi index 6ef92b8..f0101d0 100644 --- a/build/apk_test.gypi +++ b/build/apk_test.gypi @@ -23,10 +23,6 @@ '<(DEPTH)/base/base.gyp:base_java', '<(DEPTH)/tools/android/android_tools.gyp:android_tools', ], - 'variables': { - 'generator_intermediate_dir': '<(PRODUCT_DIR)/<(test_suite_name)_apk/generated/', - 'generate_native_test_stamp': '<(generator_intermediate_dir)/generate_native_test.stamp', - }, 'conditions': [ ['OS == "android" and gtest_target_type == "shared_library"', { 'variables': { @@ -34,49 +30,10 @@ 'apk_name': '<(test_suite_name)', 'intermediate_dir': '<(PRODUCT_DIR)/<(test_suite_name)_apk', 'final_apk_path': '<(intermediate_dir)/<(test_suite_name)-debug.apk', - 'java_in_dir': '<(DEPTH)/build/android/empty', - 'android_manifest_path': '<(generator_intermediate_dir)/AndroidManifest.xml', + 'java_in_dir': '<(DEPTH)/testing/android/java', + 'android_manifest_path': '<(DEPTH)/testing/android/AndroidManifest.xml', 'native_lib_target': 'lib<(test_suite_name)', - 'generated_src_dirs': [ - '<(generator_intermediate_dir)/java', - ], - 'additional_input_paths': [ - '<(generate_native_test_stamp)', - ], - 'additional_res_dirs': [ - '<(generator_intermediate_dir)/res', - ], }, - 'actions': [ - { - 'action_name': 'apk_<(test_suite_name)', - 'message': 'Building <(test_suite_name) test apk.', - 'inputs': [ - '<(DEPTH)/testing/android/AndroidManifest.xml', - '<(DEPTH)/testing/android/generate_native_test.py', - '<(input_shlib_path)', - '>@(input_jars_paths)', - '<!@(find <(DEPTH)/testing/android/java)', - ], - 'outputs': [ - '<(generate_native_test_stamp)', - '<(android_manifest_path)', - ], - 'action': [ - '<(DEPTH)/testing/android/generate_native_test.py', - '--native_library', - '<(input_shlib_path)', - '--output', - '<(generator_intermediate_dir)', - '--strip-binary=<(android_strip)', - '--app_abi', - '<(android_app_abi)', - '--stamp-file', - '<(generate_native_test_stamp)', - '--no-compile', - ], - }, - ], 'includes': [ 'java_apk.gypi' ], }], # 'OS == "android" and gtest_target_type == "shared_library" ], # conditions diff --git a/testing/android/README.chromium b/testing/android/README.chromium index 37186a2..c00255a 100644 --- a/testing/android/README.chromium +++ b/testing/android/README.chromium @@ -1,3 +1,2 @@ -apk-based runner for Chromium unit test bundles. Many of these files -are templates for generating an apk specific to a test bundle. -See generate_native_test.py or discuss with OWNERS. +apk-based runner for Chromium unit test bundles. This is a simple wrapper APK +that should include a single gtest native library. diff --git a/testing/android/generate_native_test.py b/testing/android/generate_native_test.py deleted file mode 100755 index af5bd8c..0000000 --- a/testing/android/generate_native_test.py +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env python -# -# 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. - -# On Android we build unit test bundles as shared libraries. To run -# tests, we launch a special "test runner" apk which loads the library -# then jumps into it. Since java is required for many tests -# (e.g. PathUtils.java), a "pure native" test bundle is inadequate. -# -# This script, generate_native_test.py, is used to generate the source -# for an apk that wraps a unit test shared library bundle. That -# allows us to have a single boiler-plate application be used across -# all unit test bundles. - -import logging -import optparse -import os -import re -import subprocess -import sys - -# cmd_helper.py is under ../../build/android/ -sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', - '..', 'build', 'android'))) -from pylib import cmd_helper # pylint: disable=F0401 - - -class NativeTestApkGenerator(object): - """Generate a native test apk source tree. - - TODO(jrg): develop this more so the activity name is replaced as - well. That will allow multiple test runners to be installed at the - same time. (The complication is that it involves renaming a java - class, which implies regeneration of a jni header, and on and on...) - """ - - # Files or directories we need to copy to create a complete apk test shell. - _SOURCE_FILES = ['AndroidManifest.xml', - 'native_test_apk.xml', - 'res', # res/values/strings.xml - 'java', # .../ChromeNativeTestActivity.java - ] - - # Files in the destion directory that have a "replaceme" string - # which should be replaced by the basename of the shared library. - # Note we also update the filename if 'replaceme' is itself found in - # the filename. - _REPLACEME_FILES = ['AndroidManifest.xml', - 'native_test_apk.xml', - 'res/values/strings.xml'] - - def __init__(self, native_library, strip_binary, output_directory, - target_abi): - self._native_library = native_library - self._strip_binary = strip_binary - self._output_directory = os.path.abspath(output_directory) - self._target_abi = target_abi - self._root_name = None - if self._native_library: - self._root_name = self._LibraryRoot() - logging.info('root name: %s', self._root_name) - - def _LibraryRoot(self): - """Return a root name for a shared library. - - The root name should be suitable for substitution in apk files - like the manifest. For example, blah/foo/libbase_unittests.so - becomes base_unittests. - """ - rootfinder = re.match('.?lib(.+).so', - os.path.basename(self._native_library)) - if rootfinder: - return rootfinder.group(1) - else: - return None - - def _CopyTemplateFilesAndClearDir(self): - """Copy files needed to build a new apk. - - Uses rsync to avoid unnecessary io. This call also clears outstanding - files in the directory. - """ - srcdir = os.path.abspath(os.path.dirname(__file__)) - destdir = self._output_directory - if not os.path.exists(destdir): - os.makedirs(destdir) - elif not '/out/' in destdir: - raise Exception('Unbelievable output directory; bailing for safety') - logging.info('rsync %s --> %s', self._SOURCE_FILES, destdir) - logging.info(cmd_helper.GetCmdOutput( - ['rsync', '-aRv', '--delete', '--exclude', '.svn'] + - self._SOURCE_FILES + [destdir], cwd=srcdir)) - - def _ReplaceStrings(self): - """Replace 'replaceme' strings in generated files with a root libname. - - If we have no root libname (e.g. no shlib was specified), do nothing. - """ - if not self._root_name: - return - logging.info('Replacing "replaceme" with ' + self._root_name) - for f in self._REPLACEME_FILES: - dest = os.path.join(self._output_directory, f) - contents = open(dest).read() - contents = contents.replace('replaceme', self._root_name) - dest = dest.replace('replaceme', self._root_name) # update the filename! - open(dest, 'w').write(contents) - - def _CopyLibrary(self): - """Copy the shlib into the apk source tree (if relevant).""" - if self._native_library: - destdir = os.path.join(self._output_directory, 'libs/' + self._target_abi) - if not os.path.exists(destdir): - os.makedirs(destdir) - dest = os.path.join(destdir, os.path.basename(self._native_library)) - logging.info('strip %s --> %s', self._native_library, dest) - cmd_helper.RunCmd( - [self._strip_binary, '--strip-unneeded', self._native_library, '-o', - dest]) - - def CreateBundle(self): - """Create the apk bundle source and assemble components.""" - self._CopyTemplateFilesAndClearDir() - self._ReplaceStrings() - self._CopyLibrary() - - def Compile(self, ant_args): - """Build the generated apk with ant. - - Args: - ant_args: extra args to pass to ant - """ - cmd = ['ant'] - if ant_args: - cmd.extend(ant_args) - cmd.append("-DAPP_ABI=" + self._target_abi) - cmd.extend(['-buildfile', - os.path.join(self._output_directory, 'native_test_apk.xml')]) - logging.info(cmd) - p = subprocess.Popen(cmd, stderr=subprocess.STDOUT) - (stdout, _) = p.communicate() - logging.info(stdout) - if p.returncode != 0: - logging.error('Ant return code %d', p.returncode) - sys.exit(p.returncode) - -def main(argv): - parser = optparse.OptionParser() - parser.add_option('--verbose', - help='Be verbose') - parser.add_option('--native_library', - help='Full name of native shared library test bundle') - parser.add_option('--jars', - help='Space separated list of jars to be included') - parser.add_option('--output', - help='Output directory for generated files.') - parser.add_option('--app_abi', default='armeabi', - help='ABI for native shared library') - parser.add_option('--strip-binary', - help='Binary to use for stripping the native libraries.') - parser.add_option('--ant-args', action='append', - help='extra args for ant') - parser.add_option('--stamp-file', - help='Path to file to touch on success.') - parser.add_option('--no-compile', action='store_true', - help='Use this flag to disable ant compilation.') - - options, _ = parser.parse_args(argv) - - # It is not an error to specify no native library; the apk should - # still be generated and build. It will, however, print - # NATIVE_LOADER_FAILED when run. - if not options.output: - raise Exception('No output directory specified for generated files') - - if options.verbose: - logging.basicConfig(level=logging.DEBUG, format=' %(message)s') - - if not options.strip_binary: - options.strip_binary = os.getenv('STRIP') - if not options.strip_binary: - raise Exception('No tool for stripping the libraries has been supplied') - - ntag = NativeTestApkGenerator(native_library=options.native_library, - strip_binary=options.strip_binary, - output_directory=options.output, - target_abi=options.app_abi) - - ntag.CreateBundle() - if not options.no_compile: - ntag.Compile(options.ant_args) - - if options.stamp_file: - with file(options.stamp_file, 'a'): - os.utime(options.stamp_file, None) - - logging.info('COMPLETE.') - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/testing/android/native_test_apk.xml b/testing/android/native_test_apk.xml deleted file mode 100644 index 24e5bf5..0000000 --- a/testing/android/native_test_apk.xml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -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="replaceme" default="debug" basedir="."> - - <description> - Building native test runner ChromeNativeTests_replaceme.apk - </description> - - <!-- - TODO(beverloo): Remove this property when all gyp files (also those in - WebKit) define the CHROMIUM_SRC property. This works because properties - in ant files are immutable. - --> - <property name="CHROMIUM_SRC" value="${PRODUCT_DIR}/../.." /> - - <import file="${CHROMIUM_SRC}/build/android/ant/common.xml"/> - - <!-- - TODO(yfriedman): Remove the need to specify this. We should generate the packages in a way such - that it's not required. - --> - <property name="source.absolute.dir" value="java/src"/> - <path id="javac.custom.classpath"> - <pathelement location="${ANDROID_SDK}/android.jar" /> - </path> - <property name="target.abi" value="${APP_ABI}"/> - - <path id="native.libs.gdbserver"> - <fileset file="${android.gdbserver}"/> - </path> - - <!-- We expect PRODUCT_DIR to be set like the gyp var - (e.g. $ROOT/out/Debug) --> - <fail message="PRODUCT_DIR env var not set?"> - <condition> - <not> - <isset property="PRODUCT_DIR"/> - </not> - </condition> - </fail> - - <property name="out.dir" location="${PRODUCT_DIR}/replaceme_apk"/> - - <property name="resource.absolute.dir" value="res"/> - <property name="gen.absolute.dir" value="${out.dir}/gen"/> - - <path id="out.dex.jar.input.ref"> - <filelist files="${INPUT_JARS_PATHS}"/> - </path> - <condition property="java.compilerargs" - value="-classpath ${toString:out.dex.jar.input.ref}"> - <not> - <equals arg1="${toString:out.dex.jar.input.ref}" arg2=""/> - </not> - </condition> - <property name="native.libs.absolute.dir" location="${out.dir}/libs" /> - - <!-- Copy the below manifest file to a new directory because the project - base directory and output directory are the same and manifest merge - task takes the same file as source and target when doing copying. - Otherwise it'll generate an empty manifest file. --> - <copy file="AndroidManifest.xml" todir="${out.dir}/manifest"/> - <property name="manifest.abs.file" location="${out.dir}/manifest/AndroidManifest.xml"/> - - <target name="-post-compile"> - <!-- copy gdbserver to main libs directory if building debug. --> - <if> - <condition> - <equals arg1="${build.target}" arg2="debug" /> - </condition> - <then> - <copy todir="${out.dir}/libs/${target.abi}"> - <path refid="native.libs.gdbserver"/> - </copy> - </then> - </if> - </target> - - <import file="${CHROMIUM_SRC}/build/android/ant/sdk-targets.xml"/> - <import file="${sdk.dir}/tools/ant/build.xml" /> - -</project> diff --git a/testing/android/res/values/strings.xml b/testing/android/res/values/strings.xml deleted file mode 100644 index 1597eb69..0000000 --- a/testing/android/res/values/strings.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -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. ---> -<resources> - <!-- argument to pass to System.loadLibrary(). E.g. base_unittests - for loading libbase_unittests.so. --> - <string name="native_library">replaceme</string> -</resources> |