summaryrefslogtreecommitdiffstats
path: root/build/java_apk.gypi
diff options
context:
space:
mode:
authorcjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-02 01:52:33 +0000
committercjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-02 01:52:33 +0000
commit014d1ff14a94667827f6f59341a9394896f51d10 (patch)
treedf9640b8f5f6bbc5a0fab8ce88be37e74bc13df2 /build/java_apk.gypi
parent172865b8be17c5a7844efc442e997749bee82ab4 (diff)
downloadchromium_src-014d1ff14a94667827f6f59341a9394896f51d10.zip
chromium_src-014d1ff14a94667827f6f59341a9394896f51d10.tar.gz
chromium_src-014d1ff14a94667827f6f59341a9394896f51d10.tar.bz2
[Android] Add an action to check/record attached devices
When doing a gyp_managed_install, we install APKs to the attached device. Currently this can fail in many ways (no device attached, multiple devices attached, device offline, device doesn't have root, etc.). In addition, we need to detect changes to the attached device (particularly when the device is switched, when an APK is uninstalled/updated). The current approach is to check all this information in the action interacting with the device. This means that when there is some problem we print the same warning messages for every APK that is built, and, in some cases, multiple times for each APK. Also, we have to run every install/push action every build because we detect changes to the attached device in that action. This change creates a new build action, "get device configurations". This action inspects the attached devices, filters out offline devices, filters out devices without root, and then writes a configuration file with the id+metadata for the first non-filtered device. This configuration is then used by each of the build steps that interacts with the device. This consolidates all the device checking to a single place, and the build actions don't need to do any checking. In addition, to detect changes in the attached device, we only need to run this single action every build and the install/push actions will only change when the device/metadata changes. Also, with this change we can now gracefully handle the case where multiple devices are attached (currently just write the configuration for the first valid device and install to that one). Review URL: https://chromiumcodereview.appspot.com/16831013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209582 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/java_apk.gypi')
-rw-r--r--build/java_apk.gypi12
1 files changed, 6 insertions, 6 deletions
diff --git a/build/java_apk.gypi b/build/java_apk.gypi
index 6a36a94..e388690 100644
--- a/build/java_apk.gypi
+++ b/build/java_apk.gypi
@@ -246,6 +246,7 @@
},
'dependencies': [
'<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum',
+ '<(DEPTH)/build/android/setup.gyp:get_build_device_configurations',
],
'actions': [
{
@@ -258,6 +259,7 @@
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/create_device_library_links.py',
'<(apk_install_record)',
+ '<(build_device_config_path)',
'<(ordered_libraries_file)',
],
'outputs': [
@@ -265,6 +267,7 @@
],
'action': [
'python', '<(DEPTH)/build/android/gyp/create_device_library_links.py',
+ '--build-device-configuration=<(build_device_config_path)',
'--libraries-json=<(ordered_libraries_file)',
'--script-host-path=<(symlink_script_host_path)',
'--script-device-path=<(symlink_script_device_path)',
@@ -353,21 +356,18 @@
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/apk_install.py',
+ '<(build_device_config_path)',
'<(incomplete_apk_path)',
],
'outputs': [
'<(apk_install_record)',
- # If a user switches the connected device, the APK may need to be
- # installed even if there have been no changes. To ensure that the
- # APK on the device is always up-to-date, this step should always
- # be triggered.
- '<(apk_install_record).fake',
],
'action': [
'python', '<(DEPTH)/build/android/gyp/apk_install.py',
'--android-sdk-tools=<(android_sdk_tools)',
'--apk-path=<(incomplete_apk_path)',
- '--install-record=<(apk_install_record)'
+ '--build-device-configuration=<(build_device_config_path)',
+ '--install-record=<(apk_install_record)',
],
},
],