diff options
author | 2017-04-05 16:07:51 +0000 | |
---|---|---|
committer | 2017-04-06 11:00:09 +0200 | |
commit | 416f0e96805d741843dd4a761346203153c7d5a1 (patch) | |
tree | de816aea11475aa4718e39d99633327e5c45acad /src/main/java/com/google/devtools/build/lib/rules | |
parent | 8c41633a8700cbadd2ef219879cba305b576070e (diff) |
Deprecate native Apple bundling rules.
PiperOrigin-RevId: 152264528
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules')
27 files changed, 178 insertions, 11 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch1Extension.java b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch1Extension.java index f91b8ced5f..622668122e 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch1Extension.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch1Extension.java @@ -41,7 +41,11 @@ import com.google.devtools.build.lib.syntax.Type; /** * Implementation for {@code apple_watch1_extension}. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class AppleWatch1Extension implements RuleConfiguredTargetFactory { static final SplitTransition<BuildOptions> MINIMUM_OS_AND_SPLIT_ARCH_TRANSITION = @@ -55,6 +59,10 @@ public class AppleWatch1Extension implements RuleConfiguredTargetFactory { @Override public 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."); + ObjcProvider.Builder extensionObjcProviderBuilder = new ObjcProvider.Builder(); XcodeProvider.Builder applicationXcodeProviderBuilder = new XcodeProvider.Builder(); XcodeProvider.Builder extensionXcodeProviderBuilder = new XcodeProvider.Builder(); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch1ExtensionRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch1ExtensionRule.java index 7ad047c878..e87b51558c 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch1ExtensionRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch1ExtensionRule.java @@ -31,7 +31,11 @@ import com.google.devtools.build.lib.rules.apple.AppleConfiguration; /** * Rule definition for apple_watch1_extension. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class AppleWatch1ExtensionRule implements RuleDefinition { private static final ImmutableSet<String> ALLOWED_DEPS_RULE_CLASSES = @@ -105,6 +109,10 @@ public class AppleWatch1ExtensionRule implements RuleDefinition { /*<!-- #BLAZE_RULE (NAME = apple_watch1_extension, 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 produces an extension bundle for apple watch OS 1 which also contains the watch application bundle</p> diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch2Extension.java b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch2Extension.java index bf0b2d951c..5ca8317bbc 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch2Extension.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch2Extension.java @@ -41,7 +41,13 @@ import com.google.devtools.build.lib.rules.test.InstrumentedFilesCollector; import com.google.devtools.build.lib.rules.test.InstrumentedFilesProvider; import com.google.devtools.build.lib.syntax.Type; -/** Implementation for {@code apple_watch2_extension}. */ +/** + * Implementation for {@code apple_watch2_extension}. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. + */ +@Deprecated public class AppleWatch2Extension implements RuleConfiguredTargetFactory { /** Template for the containing application folder. */ @@ -50,6 +56,10 @@ public class AppleWatch2Extension implements RuleConfiguredTargetFactory { @Override public 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."); + validateAttributesAndConfiguration(ruleContext); ObjcProvider.Builder exposedObjcProviderBuilder = new ObjcProvider.Builder(); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch2ExtensionRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch2ExtensionRule.java index 1ec4130e39..2d0f05e351 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch2ExtensionRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatch2ExtensionRule.java @@ -24,7 +24,13 @@ import com.google.devtools.build.lib.packages.RuleClass; import com.google.devtools.build.lib.packages.RuleClass.Builder; import com.google.devtools.build.lib.rules.apple.AppleConfiguration; -/** Rule definition for apple_watch2_extension. */ +/** + * Rule definition for apple_watch2_extension. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. + */ +@Deprecated public class AppleWatch2ExtensionRule implements RuleDefinition { @Override @@ -61,6 +67,10 @@ public class AppleWatch2ExtensionRule implements RuleDefinition { /*<!-- #BLAZE_RULE (NAME = apple_watch2_extension, 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 produces an extension bundle for apple watch OS 2.</p> <p>It requires attributes set for both the watchOS2 application and watchOS2 extension that will be diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatchExtensionBinary.java b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatchExtensionBinary.java index 675c82a0d7..0914d95685 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatchExtensionBinary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatchExtensionBinary.java @@ -19,7 +19,11 @@ import com.google.devtools.build.lib.rules.objc.CompilationSupport.ExtraLinkArgs /** * Implementation for the "apple_watch_extension_binary" rule. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class AppleWatchExtensionBinary extends BinaryLinkingTargetFactory { public AppleWatchExtensionBinary() { diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatchExtensionBinaryRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatchExtensionBinaryRule.java index bb268b5b7a..e32262693d 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatchExtensionBinaryRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/AppleWatchExtensionBinaryRule.java @@ -24,7 +24,11 @@ import com.google.devtools.build.lib.rules.cpp.CppConfiguration; /** * Rule definition for apple_watch_extension_binary. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class AppleWatchExtensionBinaryRule implements RuleDefinition { @Override public RuleClass build(Builder builder, RuleDefinitionEnvironment env) { @@ -55,6 +59,10 @@ public class AppleWatchExtensionBinaryRule implements RuleDefinition { /*<!-- #BLAZE_RULE (NAME = apple_watch_extension_binary, 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 produces a binary for watch extension by linking one or more Objective-C libraries.</p> diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/BinaryLinkingTargetFactory.java b/src/main/java/com/google/devtools/build/lib/rules/objc/BinaryLinkingTargetFactory.java index ed41efc127..f275290f0f 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/BinaryLinkingTargetFactory.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/BinaryLinkingTargetFactory.java @@ -37,7 +37,13 @@ import com.google.devtools.build.lib.rules.objc.ObjcCommon.ResourceAttributes; import com.google.devtools.build.lib.rules.objc.ReleaseBundlingSupport.LinkedBinary; import com.google.devtools.build.lib.rules.test.InstrumentedFilesProvider; -/** Implementation for rules that link binaries. */ +/** + * Implementation for rules that link binaries. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. + */ +@Deprecated abstract class BinaryLinkingTargetFactory implements RuleConfiguredTargetFactory { /** * Indicates whether this binary generates an application bundle. If so, it causes the {@code @@ -72,6 +78,10 @@ abstract class BinaryLinkingTargetFactory 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."); + ProtobufSupport protoSupport = new ProtobufSupport(ruleContext).registerGenerationActions().registerCompilationActions(); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplication.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplication.java index 506c5088d4..b5ebb904f3 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplication.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplication.java @@ -33,7 +33,11 @@ import com.google.devtools.build.lib.rules.objc.ReleaseBundlingSupport.SplitArch /** * Implementation for {@code ios_application}. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class IosApplication extends ReleaseBundlingTargetFactory { /** diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplicationRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplicationRule.java index e299f3aacf..b55405ef4c 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplicationRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplicationRule.java @@ -31,7 +31,11 @@ import com.google.devtools.build.lib.rules.objc.ObjcRuleClasses.IpaRule; /** * Rule definition for ios_application. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class IosApplicationRule implements RuleDefinition { @Override @@ -95,6 +99,10 @@ public class IosApplicationRule implements RuleDefinition { /*<!-- #BLAZE_RULE (NAME = ios_application, 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 produces an application bundle for iOS.</p> <p>When running an iOS application using the <code>run</code> command, environment variables that are prefixed with <code>IOS_</code> will be passed to the launched application, with the prefix diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtension.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtension.java index 184dcdced5..9f7d45b0c5 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtension.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtension.java @@ -34,7 +34,11 @@ import java.io.Serializable; /** * Implementation for {@code ios_extension}. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class IosExtension extends ReleaseBundlingTargetFactory { // Apple only accepts extensions starting at 8.0. diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtensionBinary.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtensionBinary.java index 02b96ae7b1..52e69a0b07 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtensionBinary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtensionBinary.java @@ -19,7 +19,11 @@ import com.google.devtools.build.lib.rules.objc.CompilationSupport.ExtraLinkArgs /** * Implementation for the "ios_extension_binary" rule. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class IosExtensionBinary extends BinaryLinkingTargetFactory { public IosExtensionBinary() { super(HasReleaseBundlingSupport.NO, XcodeProductType.LIBRARY_STATIC); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtensionBinaryRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtensionBinaryRule.java index b4a8afa798..3a0fefd8a3 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtensionBinaryRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtensionBinaryRule.java @@ -24,7 +24,11 @@ import com.google.devtools.build.lib.rules.cpp.CppConfiguration; /** * Rule definition for ios_extension_binary. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class IosExtensionBinaryRule implements RuleDefinition { @Override public RuleClass build(Builder builder, RuleDefinitionEnvironment env) { @@ -55,6 +59,10 @@ public class IosExtensionBinaryRule implements RuleDefinition { /*<!-- #BLAZE_RULE (NAME = ios_extension_binary, 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 produces a binary for an iOS app extension by linking one or more Objective-C libraries.</p> diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtensionRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtensionRule.java index 1ff2ec4c22..8cb676ea47 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtensionRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosExtensionRule.java @@ -28,7 +28,11 @@ import com.google.devtools.build.lib.rules.objc.ObjcRuleClasses.IpaRule; /** * Rule definition for ios_extension. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class IosExtensionRule implements RuleDefinition { @Override public RuleClass build(Builder builder, RuleDefinitionEnvironment env) { @@ -72,6 +76,10 @@ public class IosExtensionRule implements RuleDefinition { /*<!-- #BLAZE_RULE (NAME = ios_extension, 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 produces a bundled binary for an iOS app extension from a compiled binary and bundle metadata.</p> diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosFramework.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosFramework.java index 60bfec11ba..3e295fffba 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosFramework.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosFramework.java @@ -41,7 +41,11 @@ import com.google.devtools.build.lib.vfs.PathFragment; /** * Implementation for {@code ios_framework}. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class IosFramework extends ReleaseBundlingTargetFactory { @VisibleForTesting diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosFrameworkBinary.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosFrameworkBinary.java index e9d21f2f97..a306498f96 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosFrameworkBinary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosFrameworkBinary.java @@ -20,7 +20,11 @@ import com.google.devtools.build.lib.rules.objc.CompilationSupport.ExtraLinkArgs /** * Implementation for the "ios_framework_binary" rule. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class IosFrameworkBinary extends BinaryLinkingTargetFactory { public IosFrameworkBinary() { super(HasReleaseBundlingSupport.NO, XcodeProductType.LIBRARY_STATIC); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosFrameworkBinaryRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosFrameworkBinaryRule.java index 6f19e712d2..690cbd3328 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosFrameworkBinaryRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosFrameworkBinaryRule.java @@ -24,7 +24,11 @@ import com.google.devtools.build.lib.rules.cpp.CppConfiguration; /** * Rule definition for ios_framework_binary. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class IosFrameworkBinaryRule implements RuleDefinition { @Override @@ -57,6 +61,10 @@ public class IosFrameworkBinaryRule implements RuleDefinition { /*<!-- #BLAZE_RULE (NAME = ios_framework_binary, 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 produces a dynamic library for a framework by linking one or more Objective-C libraries.</p> diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosFrameworkRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosFrameworkRule.java index 7d01aff897..3265c6e6ec 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosFrameworkRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosFrameworkRule.java @@ -28,7 +28,11 @@ import com.google.devtools.build.lib.rules.apple.AppleConfiguration; /** * Rule definition for ios_framework. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class IosFrameworkRule implements RuleDefinition { @Override @@ -69,6 +73,10 @@ public class IosFrameworkRule implements RuleDefinition { /*<!-- #BLAZE_RULE (NAME = ios_framework, 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 produces a bundled binary for a framework from a compiled binary and bundle metadata. It is still highly experimental and has significant outstanding issues.</p> diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinary.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinary.java index 02771efc62..487970454d 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinary.java @@ -14,7 +14,13 @@ package com.google.devtools.build.lib.rules.objc; -/** Implementation for the "objc_binary" rule. */ +/** + * Implementation for the "objc_binary" rule. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. + */ +@Deprecated public class ObjcBinary extends BinaryLinkingTargetFactory { public ObjcBinary() { super( diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinaryRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinaryRule.java index c660f04923..93be8eb94b 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinaryRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBinaryRule.java @@ -30,8 +30,12 @@ import com.google.devtools.build.lib.rules.cpp.CppConfiguration; /** * Rule definition for objc_binary. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ // TODO(bazel-team): Remove bundling functionality (dependency on ApplicationRule, IPA output). +@Deprecated public class ObjcBinaryRule implements RuleDefinition { @Override @@ -82,6 +86,10 @@ public class ObjcBinaryRule implements RuleDefinition { /*<!-- #BLAZE_RULE (NAME = objc_binary, 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 produces one or more Objective-C libraries for bundling in an <code>ios_application</code>.</p> diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBuildInfoFactory.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBuildInfoFactory.java index 4397dd9ef8..0c58fd4d41 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBuildInfoFactory.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcBuildInfoFactory.java @@ -24,7 +24,11 @@ import com.google.devtools.build.lib.cmdline.RepositoryName; /** * Objc build info creation - passes on BuildInfo output file for consumption from Objc rules. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class ObjcBuildInfoFactory implements BuildInfoFactory { public static final BuildInfoKey KEY = new BuildInfoKey("ObjC"); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundling.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundling.java index b8d8d3361e..3b5c6ba263 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundling.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundling.java @@ -35,15 +35,18 @@ import com.google.devtools.build.lib.rules.objc.TargetDeviceFamily.InvalidFamily import com.google.devtools.build.lib.rules.objc.TargetDeviceFamily.RepeatedFamilyNameException; import com.google.devtools.build.lib.syntax.Type; import com.google.devtools.build.lib.util.Preconditions; - import java.util.List; /** - * Contains information regarding the creation of a released bundle such as an application - * or extension. The information which generally includes app icons, launch image, targeted devices - * and other data for potential signing is used to create a releasable bundle out of the bundle - * created using {@link Bundling} object. + * Contains information regarding the creation of a released bundle such as an application or + * extension. The information which generally includes app icons, launch image, targeted devices and + * other data for potential signing is used to create a releasable bundle out of the bundle created + * using {@link Bundling} object. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated @Immutable final class ReleaseBundling { static final class Builder { diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java index fc2a6ad46d..52e117246f 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingSupport.java @@ -76,7 +76,11 @@ import javax.annotation.Nullable; * <p>Contains actions, validation logic and provider value generation. * * <p>Methods on this class can be called in any order without impacting the result. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public final class ReleaseBundlingSupport { /** diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingTargetFactory.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingTargetFactory.java index 5af53b3587..39b5992f45 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingTargetFactory.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ReleaseBundlingTargetFactory.java @@ -34,7 +34,11 @@ import javax.annotation.Nullable; /** * Base class for rules that bundle releases. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public abstract class ReleaseBundlingTargetFactory implements RuleConfiguredTargetFactory { private final String bundleDirFormat; @@ -65,6 +69,10 @@ public abstract class ReleaseBundlingTargetFactory implements RuleConfiguredTarg @Override public 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."); + validateAttributes(ruleContext); ObjcCommon common = common(ruleContext); diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/Watch2ExtensionSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/Watch2ExtensionSupport.java index 12c0819451..fe247a19cf 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/Watch2ExtensionSupport.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/Watch2ExtensionSupport.java @@ -46,7 +46,11 @@ import javax.annotation.Nullable; * Contains support methods to build watch extension bundle - does normal bundle processing - * compiling and linking the binary, resources, plists and creates a final (signed if necessary) * bundle. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class Watch2ExtensionSupport { private final RuleContext ruleContext; diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/WatchApplicationSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/WatchApplicationSupport.java index 9eefef687f..6b7db2dc70 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/WatchApplicationSupport.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/WatchApplicationSupport.java @@ -60,7 +60,11 @@ import javax.annotation.Nullable; /** * Contains support methods to build watch application bundle - does normal bundle processing - * resources, plists and creates a final (signed if necessary) bundle. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated final class WatchApplicationSupport { private final RuleContext ruleContext; diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/WatchExtensionSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/WatchExtensionSupport.java index f4243f8bb1..afc177a797 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/WatchExtensionSupport.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/WatchExtensionSupport.java @@ -55,9 +55,13 @@ import javax.annotation.Nullable; /** * Contains support methods to build WatchOS1 extension bundles - does normal bundle processing - - * compiling and linking the binary, resources, plists and creates a final - * (signed if necessary) bundle. + * compiling and linking the binary, resources, plists and creates a final (signed if necessary) + * bundle. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ +@Deprecated public class WatchExtensionSupport { private final RuleContext ruleContext; diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/WatchUtils.java b/src/main/java/com/google/devtools/build/lib/rules/objc/WatchUtils.java index 1ef83b2521..08d99e49b8 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/WatchUtils.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/WatchUtils.java @@ -30,9 +30,13 @@ import com.google.devtools.build.xcode.xcodegen.proto.XcodeGenProtos.XcodeprojBu /** * Contains support methods for common processing and generating of watch extension and application * bundles. + * + * @deprecated The native bundling rules have been deprecated. This class will be removed in the + * future. */ // TODO(b/30503590): Refactor this into a support class -- such classes are better than this static // utility. +@Deprecated final class WatchUtils { @VisibleForTesting |