aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-03-29 01:03:01 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-03-29 10:54:32 +0000
commit797bd3c0c62ae982ea5390e45e4c97b28e5b50e5 (patch)
tree46a777f7ab6a19946c02a2e3f81d91b35e4d14ef /src/main/java/com/google/devtools/build/lib/rules/objc
parentc4a0edbd00da4fd2a1eabd6371a30542a48f7fe6 (diff)
Restrict file types used for "entitlements" attribute to [".entitlements", ".plist"].
RELNOTES: Restrict file types used for "entitlements" attribute to [".entitlements", ".plist"] -- MOS_MIGRATED_REVID=118416261
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java9
1 files changed, 7 insertions, 2 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 f815ffa788..82050986b7 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
@@ -327,6 +327,9 @@ public class ObjcRuleClasses {
// TODO(bazel-team): Restrict this to actual header files only.
static final FileTypeSet HDRS_TYPE = FileTypeSet.ANY_FILE;
+ static final FileTypeSet ENTITLEMENTS_TYPE =
+ FileTypeSet.of(FileType.of(".entitlements", ".plist"));
+
/**
* Coverage note files which contain information to reconstruct the basic block graphs and assign
* source line numbers to blocks.
@@ -832,7 +835,8 @@ public class ObjcRuleClasses {
<a href="https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html">their definitions in Apple's documentation</a>:
$(AppIdentifierPrefix) and $(CFBundleIdentifier).
<!-- #END_BLAZE_RULE.ATTRIBUTE -->*/
- .add(attr(ENTITLEMENTS_ATTR, LABEL).legacyAllowAnyFileType())
+ .add(attr(ENTITLEMENTS_ATTR, LABEL)
+ .allowedFileTypes(ENTITLEMENTS_TYPE))
.add(
attr(EXTRA_ENTITLEMENTS_ATTR, LABEL)
.singleArtifact()
@@ -845,7 +849,8 @@ public class ObjcRuleClasses {
.getFragment(ObjcConfiguration.class)
.getExtraEntitlements();
}
- }))
+ })
+ .allowedFileTypes(FileType.of(".entitlements", ".plist")))
/* <!-- #BLAZE_RULE($objc_release_bundling_rule).ATTRIBUTE(provisioning_profile) -->
The provisioning profile (.mobileprovision file) to use when bundling
the application.