diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android/AndroidDeviceRule.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/AndroidDeviceRule.java | 86 |
1 files changed, 55 insertions, 31 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidDeviceRule.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidDeviceRule.java index 23f2efb350..a033c67cfb 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidDeviceRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidDeviceRule.java @@ -27,9 +27,7 @@ import com.google.devtools.build.lib.analysis.whitelisting.Whitelist; import com.google.devtools.build.lib.packages.RuleClass; import com.google.devtools.build.lib.rules.java.JavaSemantics; -/** - * Rule definition for android_device. - */ +/** Rule definition for android_device. */ public final class AndroidDeviceRule implements RuleDefinition { @Override public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment env) { @@ -97,38 +95,64 @@ public final class AndroidDeviceRule implements RuleDefinition { a specific device). The properties in this file will override read only properties typically set by the emulator such as ro.product.model. <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ - .add(attr("default_properties", LABEL).cfg(HOST) - .allowedFileTypes(JavaSemantics.PROPERTIES)) + .add(attr("default_properties", LABEL).cfg(HOST).allowedFileTypes(JavaSemantics.PROPERTIES)) /* <!-- #BLAZE_RULE(android_device).ATTRIBUTE(platform_apks) --> A list of apks to be installed on the device at boot time. <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ .add(attr("platform_apks", LABEL_LIST).legacyAllowAnyFileType()) - .add(attr("$adb_static", LABEL).cfg(HOST).value( - env.getToolsLabel("//tools/android:adb_static"))) - .add(attr("$adb", LABEL).cfg(HOST).value( - env.getToolsLabel("//tools/android:adb"))) - .add(attr("$emulator_arm", LABEL).cfg(HOST).value( - env.getToolsLabel("//tools/android/emulator:emulator_arm"))) - .add(attr("$emulator_x86", LABEL).cfg(HOST).value( - env.getToolsLabel("//tools/android/emulator:emulator_x86"))) - .add(attr("$emulator_x86_bios", LABEL).cfg(HOST).value( - env.getToolsLabel("//tools/android/emulator:emulator_x86_bios"))) - .add(attr("$mksd", LABEL).cfg(HOST).exec().value( - env.getToolsLabel("//tools/android/emulator:mksd"))) - .add(attr("$empty_snapshot_fs", LABEL).cfg(HOST).value( - env.getToolsLabel("//tools/android/emulator:empty_snapshot_fs"))) - .add(attr("$xvfb_support", LABEL).cfg(HOST).value( - env.getToolsLabel("//tools/android/emulator:xvfb_support"))) - .add(attr("$unified_launcher", LABEL).cfg(HOST).exec().value( - env.getToolsLabel("//tools/android/emulator:unified_launcher"))) - .add(attr("$android_runtest", LABEL).cfg(HOST).exec().value( - env.getToolsLabel("//tools/android:android_runtest"))) - .add(attr("$testing_shbase", LABEL).cfg(HOST).value( - env.getToolsLabel("//tools/android/emulator:shbase"))) - .add(attr("$sdk_path", LABEL).cfg(HOST).exec().value( - env.getToolsLabel("//tools/android/emulator:sdk_path"))) - .add(attr("$is_executable", BOOLEAN).value(true) - .nonconfigurable("Called from RunCommand.isExecutable, which takes a Target")) + .add( + attr("$adb_static", LABEL) + .cfg(HOST) + .value(env.getToolsLabel("//tools/android:adb_static"))) + .add(attr("$adb", LABEL).cfg(HOST).value(env.getToolsLabel("//tools/android:adb"))) + .add( + attr("$emulator_arm", LABEL) + .cfg(HOST) + .value(env.getToolsLabel("//tools/android/emulator:emulator_arm"))) + .add( + attr("$emulator_x86", LABEL) + .cfg(HOST) + .value(env.getToolsLabel("//tools/android/emulator:emulator_x86"))) + .add( + attr("$emulator_x86_bios", LABEL) + .cfg(HOST) + .value(env.getToolsLabel("//tools/android/emulator:emulator_x86_bios"))) + .add( + attr("$mksd", LABEL) + .cfg(HOST) + .exec() + .value(env.getToolsLabel("//tools/android/emulator:mksd"))) + .add( + attr("$empty_snapshot_fs", LABEL) + .cfg(HOST) + .value(env.getToolsLabel("//tools/android/emulator:empty_snapshot_fs"))) + .add( + attr("$xvfb_support", LABEL) + .cfg(HOST) + .value(env.getToolsLabel("//tools/android/emulator:xvfb_support"))) + .add( + attr("$unified_launcher", LABEL) + .cfg(HOST) + .exec() + .value(env.getToolsLabel("//tools/android/emulator:unified_launcher"))) + .add( + attr("$android_runtest", LABEL) + .cfg(HOST) + .exec() + .value(env.getToolsLabel("//tools/android:android_runtest"))) + .add( + attr("$testing_shbase", LABEL) + .cfg(HOST) + .value(env.getToolsLabel("//tools/android/emulator:shbase"))) + .add( + attr("$sdk_path", LABEL) + .cfg(HOST) + .exec() + .value(env.getToolsLabel("//tools/android/emulator:sdk_path"))) + .add( + attr("$is_executable", BOOLEAN) + .value(true) + .nonconfigurable("Called from RunCommand.isExecutable, which takes a Target")) .add( Whitelist.getAttributeFromWhitelistName(AndroidDevice.WHITELIST_NAME) .value(env.getToolsLabel("//tools/android:android_device_whitelist"))) |