diff options
author | 2017-06-07 14:07:25 -0400 | |
---|---|---|
committer | 2017-06-08 10:52:30 -0400 | |
commit | 3e90a89530f4eb69b0440c1cca3778eb1df7a37b (patch) | |
tree | b99863754eafc37d1260733042a4c6574becf3cc /src/main/java/com | |
parent | 8af9dc526050d84856ebd4624c37d8cbb4ec7847 (diff) |
Deprecate ios_device and ios_test.
RELNOTES: ios_device and ios_test are deprecated. Please use the new testing
rules in https://github.com/bazelbuild/rules_apple instead.
PiperOrigin-RevId: 158290414
Diffstat (limited to 'src/main/java/com')
5 files changed, 18 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleSkylarkCommon.java b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleSkylarkCommon.java index 0eb412a38c..5385f69110 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleSkylarkCommon.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleSkylarkCommon.java @@ -202,8 +202,9 @@ public class AppleSkylarkCommon { @SkylarkCallable( name = IosDeviceProvider.SKYLARK_NAME, doc = - "Returns the provider constructor for IosDeviceProvider. Use this as a key to access the " - + "attributes exposed by ios_device.", + "[NOTE: This is deprecated and will be removed in the future. Use the new Skylark testing " + + "rules instead.] Returns the provider constructor for IosDeviceProvider. Use this as " + + "a key to access the attributes exposed by ios_device.", structField = true ) public ClassObjectConstructor getIosDeviceProviderConstructor() { diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosDevice.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosDevice.java index eae5dbf4a3..3d17996932 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosDevice.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosDevice.java @@ -36,6 +36,10 @@ public final class IosDevice implements RuleConfiguredTargetFactory { @Override public ConfiguredTarget create(RuleContext context) throws InterruptedException, RuleErrorException { + context.ruleWarning( + "This rule is deprecated. Please use the new Apple build rules " + + "(https://github.com/bazelbuild/rules_apple) to build Apple targets."); + AppleConfiguration appleConfiguration = context.getFragment(AppleConfiguration.class); String iosVersionAttribute = context.attributes().get(IosDeviceRule.IOS_VERSION_ATTR_NAME, STRING); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosDeviceRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosDeviceRule.java index 0ee0d04a69..4a20d4a41b 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosDeviceRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosDeviceRule.java @@ -76,6 +76,10 @@ public final class IosDeviceRule implements RuleDefinition { /*<!-- #BLAZE_RULE (NAME = ios_device, TYPE = BINARY, FAMILY = Objective-C) --> +<p><strong>This rule is deprecated.</strong> Please use the new Apple build rules +(<a href="https://github.com/bazelbuild/rules_apple">https://github.com/bazelbuild/rules_apple</a>) +to build Apple targets.</p> + <p>This rule defines an iOS device profile that defines a simulator against which to run tests.</p> diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java index fcd8420eda..e21a117d57 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosTest.java @@ -84,6 +84,9 @@ public final class IosTest implements RuleConfiguredTargetFactory { @Override public final ConfiguredTarget create(RuleContext ruleContext) throws InterruptedException, RuleErrorException { + ruleContext.ruleWarning( + "This rule is deprecated. Please use the new Apple build rules " + + "(https://github.com/bazelbuild/rules_apple) to build Apple targets."); Iterable<ObjcProtoProvider> objcProtoProviders = ruleContext.getPrerequisites("deps", Mode.TARGET, ObjcProtoProvider.class); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosTestRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosTestRule.java index f837b132ab..55bfea69c0 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosTestRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosTestRule.java @@ -181,6 +181,10 @@ public class IosTestRule implements RuleDefinition { /*<!-- #BLAZE_RULE (NAME = ios_test, TYPE = TEST, FAMILY = Objective-C) --> +<p><strong>This rule is deprecated.</strong> Please use the new Apple build rules +(<a href="https://github.com/bazelbuild/rules_apple">https://github.com/bazelbuild/rules_apple</a>) +to build Apple targets.</p> + <p>This rule provides a way to build iOS unit tests written in KIF, GTM and XCTest test frameworks on both iOS simulator and real devices. </p> |