Revert 156233 - Make apks be built in a consistent way
This broke non-incremental Android builds. Simplify apk targets by doing most of the work in build/java_apk.gypi (like jars are done with build/java.gypi). The apk targets still use their own ant build files, but everything else is more consistent between them. BUG= Review URL: https://chromiumcodereview.appspot.com/10914130 TBR=cjhopman@chromium.org Review URL: https://chromiumcodereview.appspot.com/10916264 git-svn-id: http://src.chromium.org/svn/trunk/src/build@156308 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
23f809c286
Коммит
043bf26e1c
|
@ -1,75 +0,0 @@
|
|||
# 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.
|
||||
|
||||
# This file is meant to be included into a target to provide a rule
|
||||
# to build Android APKs in a consistent manner.
|
||||
#
|
||||
# To use this, create a gyp target with the following form:
|
||||
# {
|
||||
# 'target_name': 'my_package_apk',
|
||||
# 'type': 'none',
|
||||
# 'variables': {
|
||||
# 'package_name': 'my_package',
|
||||
# 'apk_name': 'MyPackage',
|
||||
# 'java_in_dir': 'path/to/package/root',
|
||||
# 'resource_dir': 'path/to/package/root/res',
|
||||
# },
|
||||
# 'includes': ['path/to/this/gypi/file'],
|
||||
# }
|
||||
#
|
||||
# Note that this assumes that there's an ant buildfile <package_name>_apk.xml in
|
||||
# java_in_dir. So, if you have package_name="content_shell" and
|
||||
# java_in_dir="content/shell/android/java" you should have a directory structure
|
||||
# like:
|
||||
#
|
||||
# content/shell/android/java/content_shell_apk.xml
|
||||
# content/shell/android/java/src/chromium/base/Foo.java
|
||||
# content/shell/android/java/src/chromium/base/Bar.java
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'input_jars_paths': [],
|
||||
'native_libs_paths': [],
|
||||
'additional_src_dirs': [],
|
||||
'additional_input_paths': [],
|
||||
},
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'ant_<(package_name)_apk',
|
||||
'message': 'Building <(package_name) apk.',
|
||||
'inputs': [
|
||||
'<(java_in_dir)/<(package_name)_apk.xml',
|
||||
'<(java_in_dir)/AndroidManifest.xml',
|
||||
'<(DEPTH)/build/android/ant/common.xml',
|
||||
'<(DEPTH)/build/android/ant/sdk-targets.xml',
|
||||
'<!@(find <(java_in_dir) -name "*.java")',
|
||||
'<!@(find <(resource_dir) -name "*")',
|
||||
'>@(input_jars_paths)',
|
||||
'>@(native_libs_paths)',
|
||||
'>@(additional_input_paths)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(PRODUCT_DIR)/<(package_name)/<(apk_name)-debug.apk',
|
||||
],
|
||||
'action': [
|
||||
'ant',
|
||||
'-DPRODUCT_DIR=<(ant_build_out)',
|
||||
'-DAPP_ABI=<(android_app_abi)',
|
||||
'-DANDROID_GDBSERVER=<(android_gdbserver)',
|
||||
'-DANDROID_SDK=<(android_sdk)',
|
||||
'-DANDROID_SDK_ROOT=<(android_sdk_root)',
|
||||
'-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
|
||||
'-DANDROID_SDK_VERSION=<(android_sdk_version)',
|
||||
'-DANDROID_TOOLCHAIN=<(android_toolchain)',
|
||||
'-DPACKAGE_NAME=<(package_name)',
|
||||
'-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)',
|
||||
'-DINPUT_JARS_PATHS=>(input_jars_paths)',
|
||||
'-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)',
|
||||
'-DRESOURCE_DIR=<(resource_dir)',
|
||||
'-buildfile',
|
||||
'<(java_in_dir)/<(package_name)_apk.xml'
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
Загрузка…
Ссылка в новой задаче