From 0462fc40d989e9ed29383e9f183311ea983dac20 Mon Sep 17 00:00:00 2001 From: Egor Pasko Date: Thu, 19 Oct 2017 11:57:05 +0000 Subject: [PATCH] Revert "Android: Remove last remnants of ANT" This reverts commit 38636aa257a86a0464b0c5805575e998511404ae. Reason for revert: downstream failure: unable to find chromium-debug.keystore (internal bug: http://crbug.com/776328) Original change's description: > Android: Remove last remnants of ANT > > It had a good run. > > Bug: 375324 > Change-Id: I1db1d501f58d3d3ac8731bc36e8ca550da24adf9 > Reviewed-on: https://chromium-review.googlesource.com/722521 > Reviewed-by: Nico Weber > Commit-Queue: agrieve > Cr-Commit-Position: refs/heads/master@{#509785} TBR=thakis@chromium.org,agrieve@chromium.org Change-Id: I7323c95dcdd47145166d6bbd61345cc17db2e7d7 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 375324 Reviewed-on: https://chromium-review.googlesource.com/727902 Reviewed-by: Egor Pasko Commit-Queue: Egor Pasko Cr-Commit-Position: refs/heads/master@{#510056} --- build/android/ant/apk-package.xml | 125 ++++++++++++++++++ .../android/{ => ant}/chromium-debug.keystore | Bin build/android/{empty => ant/empty/res}/.keep | 0 build/android/empty/src/.keep | 6 + build/config/android/config.gni | 3 +- build/config/android/internal_rules.gni | 2 +- build/config/android/rules.gni | 2 +- build/install-build-deps-android.sh | 4 + 8 files changed, 139 insertions(+), 3 deletions(-) create mode 100644 build/android/ant/apk-package.xml rename build/android/{ => ant}/chromium-debug.keystore (100%) rename build/android/{empty => ant/empty/res}/.keep (100%) create mode 100644 build/android/empty/src/.keep diff --git a/build/android/ant/apk-package.xml b/build/android/ant/apk-package.xml new file mode 100644 index 00000000000000..cb7956091810c8 --- /dev/null +++ b/build/android/ant/apk-package.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/android/chromium-debug.keystore b/build/android/ant/chromium-debug.keystore similarity index 100% rename from build/android/chromium-debug.keystore rename to build/android/ant/chromium-debug.keystore diff --git a/build/android/empty/.keep b/build/android/ant/empty/res/.keep similarity index 100% rename from build/android/empty/.keep rename to build/android/ant/empty/res/.keep diff --git a/build/android/empty/src/.keep b/build/android/empty/src/.keep new file mode 100644 index 00000000000000..0f710b673dd786 --- /dev/null +++ b/build/android/empty/src/.keep @@ -0,0 +1,6 @@ +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. diff --git a/build/config/android/config.gni b/build/config/android/config.gni index 8e0f2b5cdd286f..d136e4b709872d 100644 --- a/build/config/android/config.gni +++ b/build/config/android/config.gni @@ -63,7 +63,8 @@ if (is_android) { } if (!defined(default_android_keystore_path)) { - default_android_keystore_path = "//build/android/chromium-debug.keystore" + default_android_keystore_path = + "//build/android/ant/chromium-debug.keystore" default_android_keystore_name = "chromiumdebugkey" default_android_keystore_password = "chromium" } diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni index 0a861ddc7dc7ea..12a9b98e7514da 100644 --- a/build/config/android/internal_rules.gni +++ b/build/config/android/internal_rules.gni @@ -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/empty" ] && + if (invoker.resource_dirs != [ "//build/android/ant/empty/res" ] && invoker.resource_dirs != []) { _sources_build_rel = exec_script("//build/android/gyp/find.py", diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni index 3b24c6e3659af0..98ee8ebc396550 100644 --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni @@ -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/empty" ] + resource_dirs = [ "//build/android/ant/empty/res" ] zip_path = resources_zip_path all_resources_zip_path = _all_resources_zip_path generate_constant_ids = true diff --git a/build/install-build-deps-android.sh b/build/install-build-deps-android.sh index 15fea8517ed9c5..06f79aee998438 100755 --- a/build/install-build-deps-android.sh +++ b/build/install-build-deps-android.sh @@ -34,6 +34,10 @@ 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