Reland: Android: Remove last remnants of ANT (part 1)

This reverts commit 0462fc40d989e9ed29383e9f183311ea983dac20.

Reason for reland: Leaving keystore and empty/ until recipes
updated and bots build.

TBR=thakis

Bug: 375324,776328,776351
Change-Id: I8c8cfc0b94ce681772c3792799011e77d72d81d9
Reviewed-on: https://chromium-review.googlesource.com/728460
Commit-Queue: agrieve <agrieve@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#510189}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3a77fd434a9935c7e1c4e34e8aaa78aa50582d50
This commit is contained in:
Andrew Grieve 2017-10-19 20:31:40 +00:00 коммит произвёл Commit Bot
Родитель 174fcec527
Коммит 60004039f5
9 изменённых файлов: 11 добавлений и 141 удалений

Просмотреть файл

@ -1,125 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2005-2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project default="-package">
<property name="verbose" value="false" />
<property name="out.dir" location="${OUT_DIR}" />
<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">
<pathelement path="${sdk.dir}/tools/lib/ant-tasks.jar" />
</path>
<!-- Custom tasks -->
<taskdef resource="anttasks.properties" classpathref="android.antlibs" />
<condition property="build.target" value="release" else="debug">
<equals arg1="${CONFIGURATION_NAME}" arg2="Release" />
</condition>
<condition property="build.is.packaging.debug" value="true" else="false">
<equals arg1="${build.target}" arg2="debug" />
</condition>
<!-- Disables automatic signing. -->
<property name="build.is.signing.debug" value="false"/>
<!-- SDK tools assume that out.packaged.file is signed and name it "...-unaligned" -->
<property name="out.packaged.file" value="${UNSIGNED_APK_PATH}" />
<property name="native.libs.absolute.dir" location="${NATIVE_LIBS_DIR}" />
<!-- Intermediate files -->
<property name="resource.package.file.name" value="${RESOURCE_PACKAGED_APK_NAME}" />
<property name="intermediate.dex.file" location="${DEX_FILE_PATH}" />
<condition property="multidex.enabled" value="true">
<equals arg1="${MULTIDEX_ENABLED}" arg2="1"/>
</condition>
<!-- 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="${HAS_CODE}"
previousBuildType="/"
buildType="${build.is.packaging.debug}/${build.is.signing.debug}">
<dex path="${intermediate.dex.file}" />
<nativefolder path="${native.libs.absolute.dir}" />
<extra-jars/>
</apkbuilder>
</sequential>
</macrodef>
<macrodef name="multidex-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="false"
previousBuildType="/"
buildType="${build.is.packaging.debug}/${build.is.signing.debug}">
<zip path="${intermediate.dex.file}" />
<nativefolder path="${native.libs.absolute.dir}" />
<extra-jars/>
</apkbuilder>
</sequential>
</macrodef>
<!-- Packages the application. -->
<target name="-package">
<if condition="${emma.enabled}">
<then>
<package-helper>
<extra-jars>
<jarfile path="${emma.device.jar}" />
</extra-jars>
</package-helper>
</then>
<else>
<if condition="${multidex.enabled}">
<then>
<multidex-package-helper />
</then>
<else>
<package-helper />
</else>
</if>
</else>
</if>
</target>
</project>

Двоичные данные
android/chromium-debug.keystore Normal file

Двоичный файл не отображается.

2
android/empty/.keep Normal file
Просмотреть файл

@ -0,0 +1,2 @@
# This empty res folder can be passed to aapt while building Java libraries or
# APKs that don't have any resources.

Просмотреть файл

@ -1,6 +0,0 @@
This is a file that needs to live here until http://crbug.com/158155 has
been fixed.
The ant build system requires that a src folder is always present, and for
some of our targets that is not the case. Giving it an empty src-folder works
nicely though.

Просмотреть файл

@ -548,8 +548,12 @@ def main(args):
resource_names = []
for resource_dir in options.resource_dirs:
for resource_file in build_utils.FindInDirectory(resource_dir, '*'):
input_paths.append(resource_file)
depfile_deps.append(resource_file)
# Don't list the empty .keep file in depfile. Since it doesn't end up
# included in the .zip, it can lead to -w 'dupbuild=err' ninja errors
# if ever moved.
if not resource_file.endswith(os.path.join('empty', '.keep')):
input_paths.append(resource_file)
depfile_deps.append(resource_file)
resource_names.append(os.path.relpath(resource_file, resource_dir))
# Resource filenames matter to the output, so add them to strings as well.

Просмотреть файл

@ -63,8 +63,7 @@ if (is_android) {
}
if (!defined(default_android_keystore_path)) {
default_android_keystore_path =
"//build/android/ant/chromium-debug.keystore"
default_android_keystore_path = "//build/android/chromium-debug.keystore"
default_android_keystore_name = "chromiumdebugkey"
default_android_keystore_password = "chromium"
}

Просмотреть файл

@ -2803,7 +2803,7 @@ if (enable_java_templates) {
_all_resource_dirs += invoker.resource_dirs
# Speed up "gn gen" by short-circuiting the empty directory.
if (invoker.resource_dirs != [ "//build/android/ant/empty/res" ] &&
if (invoker.resource_dirs != [ "//build/android/empty" ] &&
invoker.resource_dirs != []) {
_sources_build_rel =
exec_script("//build/android/gyp/find.py",

Просмотреть файл

@ -2044,7 +2044,7 @@ if (enable_java_templates) {
srcjar_path = "${target_gen_dir}/${target_name}.srcjar"
r_text_out_path = "${target_gen_dir}/${target_name}_R.txt"
android_manifest = _android_manifest
resource_dirs = [ "//build/android/ant/empty/res" ]
resource_dirs = [ "//build/android/empty" ]
zip_path = resources_zip_path
all_resources_zip_path = _all_resources_zip_path
generate_constant_ids = true

Просмотреть файл

@ -34,10 +34,6 @@ sudo apt-get -y install lib32z1 lighttpd python-pexpect xvfb x11-utils
# See https://developer.android.com/sdk/installing/index.html?pkg=tools
sudo apt-get -y install libncurses5:i386 libstdc++6:i386 zlib1g:i386
# Required by //components/cronet/tools/generate_javadoc.py
# TODO(375324): Stop requiring ANT.
sudo apt-get -y install ant
# Required for apk-patch-size-estimator
sudo apt-get -y install bsdiff