From 1c080335c2c177d2d6c7469fa1fb4ed7c20831dd Mon Sep 17 00:00:00 2001 From: "cjhopman@chromium.org" Date: Wed, 10 Apr 2013 23:10:17 +0000 Subject: [Android] Split Ant -package and -package-resources Splits apk-package.xml into apk-package.xml and apk-package-resources.xml and adds a new gyp action for package-resources. This continues the simplification of gyp actions (i.e. each individual action should be simple). Also, allows more accurate specification of inputs for -package-resources vs -package (and allows -package-resources to be done in parallel with javac/dex/etc.). BUG=158821 Review URL: https://chromiumcodereview.appspot.com/13811027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193491 0039d316-1c4b-4281-b951-d872f2087c98 --- build/android/ant/apk-package-resources.xml | 133 ++++++++++++++++++++++++++++ build/android/ant/apk-package.xml | 97 +------------------- build/java_apk.gypi | 60 ++++++++++--- 3 files changed, 184 insertions(+), 106 deletions(-) create mode 100644 build/android/ant/apk-package-resources.xml (limited to 'build') diff --git a/build/android/ant/apk-package-resources.xml b/build/android/ant/apk-package-resources.xml new file mode 100644 index 0000000..cbce1de --- /dev/null +++ b/build/android/ant/apk-package-resources.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/android/ant/apk-package.xml b/build/android/ant/apk-package.xml index 6540d99..b70b6c3 100644 --- a/build/android/ant/apk-package.xml +++ b/build/android/ant/apk-package.xml @@ -18,18 +18,9 @@ - - - - - - - - - @@ -52,103 +43,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + @(library_manifest_paths)' - '>@(codegen_input_paths)', '>@(additional_input_paths)', + '>@(codegen_input_paths)', + '>@(library_manifest_paths)', + '>@(resource_input_paths)', ], 'outputs': [ '<(codegen_stamp)', @@ -523,16 +525,17 @@ ] }, { - 'action_name': 'ant_package_<(_target_name)', - 'message': 'Packaging <(_target_name).', + 'action_name': 'ant package resources', + 'message': 'Packaging resources for <(_target_name) APK.', 'inputs': [ - '<(DEPTH)/build/android/ant/apk-package.xml', + '<(DEPTH)/build/android/ant/apk-package-resources.xml', '<(DEPTH)/build/android/gyp/util/build_utils.py', '<(DEPTH)/build/android/gyp/ant.py', - '<(dex_path)', + '<(android_manifest_path)', '<(codegen_stamp)', - '<(obfuscate_stamp)', - '>@(package_input_paths)', + + '>@(library_manifest_paths)', + '>@(additional_input_paths)', ], 'conditions': [ ['is_test_apk == 1', { @@ -543,7 +546,7 @@ }], ], 'outputs': [ - '<(unsigned_apk_path)', + '<(package_resources_stamp)', ], 'action': [ 'python', '<(DEPTH)/build/android/gyp/ant.py', @@ -553,15 +556,50 @@ '-DADDITIONAL_R_TEXT_FILES=>(additional_R_text_files)', '-DANDROID_SDK_JAR=<(android_sdk_jar)', '-DANDROID_SDK_ROOT=<(android_sdk_root)', - '-DANDROID_SDK_VERSION=<(android_sdk_version)', '-DAPK_NAME=<(apk_name)', '-DAPP_MANIFEST_VERSION_CODE=<(app_manifest_version_code)', '-DAPP_MANIFEST_VERSION_NAME=<(app_manifest_version_name)', '-DASSET_DIR=<(asset_location)', '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', - '-DNATIVE_LIBS_DIR=<(apk_package_native_libs_dir)', '-DOUT_DIR=<(intermediate_dir)', '-DRESOURCE_DIR=<(resource_dir)', + + '-DSTAMP=<(package_resources_stamp)', + + '-Dbasedir=.', + '-buildfile', + '<(DEPTH)/build/android/ant/apk-package-resources.xml', + + # Add list of inputs to the command line, so if inputs change + # (e.g. if a Java file is removed), the command will be re-run. + # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. + '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', + ] + }, + { + 'action_name': 'ant_package_<(_target_name)', + 'message': 'Packaging <(_target_name).', + 'inputs': [ + '<(DEPTH)/build/android/ant/apk-package.xml', + '<(DEPTH)/build/android/gyp/util/build_utils.py', + '<(DEPTH)/build/android/gyp/ant.py', + '<(dex_path)', + '<(codegen_stamp)', + '<(obfuscate_stamp)', + '<(package_resources_stamp)', + '>@(package_input_paths)', + ], + 'outputs': [ + '<(unsigned_apk_path)', + ], + 'action': [ + 'python', '<(DEPTH)/build/android/gyp/ant.py', + '-quiet', + '-DANDROID_SDK_ROOT=<(android_sdk_root)', + '-DAPK_NAME=<(apk_name)', + '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', + '-DNATIVE_LIBS_DIR=<(apk_package_native_libs_dir)', + '-DOUT_DIR=<(intermediate_dir)', '-DSOURCE_DIR=<(source_dir)', '-DUNSIGNED_APK_PATH=<(unsigned_apk_path)', -- cgit v1.1