aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
diff options
context:
space:
mode:
authorGravatar David Santiago <david.santiago@gmail.com>2015-05-04 15:11:01 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-05-04 17:52:28 +0000
commit140f0a97487602139146e9013de2a7f184e56758 (patch)
tree01cec12e703b2a62b0c64ccfc28ece5c22739437 /src/main/java/com/google/devtools/build/lib
parent1f4ce8034892aa490269aacf2fd4c74122d72920 (diff)
Move the "families" attribute to BundlingRule.
Currently the "families" attribute is defined on the ReleaseBundlingRule. Due to the relationships between the iOS rule classes, this leaves some rules that need to know the device family they are building for without that knowledge. Specifically, objc_bundle_library() can build storyboards outside of any app or extension, and thus needs to know the target device families to use during compilation. For reference, this was discussed at https://groups.google.com/d/msg/bazel-discuss/c-2nwFiqhWo/puESbFNGAYMJ This commit moves the "families" attribute from ReleaseBundlingRule to BundlingRule to accomplish this. -- Change-Id: Ia0d146e85f1c2cdb13bd74aef4a57de1ad537e0f MOS_MIGRATED_REVID=92725861
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java
index 0180fbccf6..e038039b73 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java
@@ -809,6 +809,16 @@ public class ObjcRuleClasses {
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
.add(attr("infoplist", LABEL)
.allowedFileTypes(PLIST_TYPE))
+ /* <!-- #BLAZE_RULE($objc_bundling_rule).ATTRIBUTE(families) -->
+ The device families to which this bundle or binary is targeted.
+ ${SYNOPSIS}
+
+ This is known as the <code>TARGETED_DEVICE_FAMILY</code> build setting
+ in Xcode project files. It is a list of one or more of the strings
+ <code>"iphone"</code> and <code>"ipad"</code>.
+ <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
+ .add(attr("families", STRING_LIST)
+ .value(ImmutableList.of(TargetDeviceFamily.IPHONE.getNameInRule())))
.add(attr("$momczip_deploy", LABEL).cfg(HOST)
.value(env.getLabel("//tools/objc:momczip_deploy.jar")))
.build();
@@ -914,16 +924,6 @@ public class ObjcRuleClasses {
return "example." + rule.getName();
}
}))
- /* <!-- #BLAZE_RULE($objc_release_bundling_rule).ATTRIBUTE(families) -->
- The device families to which this binary is targeted.
- ${SYNOPSIS}
-
- This is known as the <code>TARGETED_DEVICE_FAMILY</code> build setting
- in Xcode project files. It is a list of one or more of the strings
- <code>"iphone"</code> and <code>"ipad"</code>.
- <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
- .add(attr("families", STRING_LIST)
- .value(ImmutableList.of(TargetDeviceFamily.IPHONE.getNameInRule())))
.add(attr("$bundlemerge", LABEL).cfg(HOST).exec()
.value(env.getLabel("//tools/objc:bundlemerge")))
.build();