diff options
3 files changed, 13 insertions, 16 deletions
diff --git a/examples/objc/BUILD b/examples/objc/BUILD index 66a8fa0e00..d6c833dffe 100644 --- a/examples/objc/BUILD +++ b/examples/objc/BUILD @@ -15,8 +15,11 @@ ios_application( name = "PrenotCalculator", binary = ":PrenotCalculator_binary", + bundles = [":PrenotCalculatorResources"], + datamodels = glob(["PrenotCalculator/DataModel.xcdatamodeld/**"]), infoplist = "PrenotCalculator/PrenotCalculator-Info.plist", visibility = ["//visibility:public"], + xibs = ["PrenotCalculator/CalculatorViewController.xib"], ) objc_binary( @@ -35,13 +38,8 @@ objc_binary( ["**/*.h"], exclude = ["PrenotCalculator/Expression.h"], ), - bundles = [":PrenotCalculatorResources"], sdk_frameworks = ["CoreData"], - xibs = ["PrenotCalculator/CalculatorViewController.xib"], - deps = [ - ":CoreDataResources", - ":ExpressionPrebuilt", - ], + deps = [":ExpressionPrebuilt"], ) # A prebuilt library that contains multiple architectures. @@ -77,11 +75,6 @@ objc_bundle_library( resources = glob(["PrenotCalculator/Resources/**"]), ) -objc_library( - name = "CoreDataResources", - datamodels = glob(["PrenotCalculator/DataModel.xcdatamodeld/**"]), -) - filegroup( name = "srcs", srcs = glob([ 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 9549ad1b21..cc21048f40 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 @@ -73,9 +73,9 @@ public class ObjcBinaryRule implements RuleDefinition { <p>This rule produces one or more Objective-C libraries for bundling in an <code>ios_application</code>.</p> -<p>Any application-related attributes (infoplist, app_icon, ...) on this rule are deprecated and -you should define them on <code>ios_application</code> instead. They will be removed from -<code>objc_binary</code> soon.</p> +<p>Any application-related attributes (infoplist, app_icon, resources, xibs, datamodels...) on this +rule are deprecated and you should define them on <code>ios_application</code> instead. They will be +removed from <code>objc_binary</code> soon.</p> <p>Until the migration to <code>ios_application</code> is complete, this rule requires at least one source file to be defined in either <code>srcs</code> or <code>non_arc_srcs</code></p>. 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 aa280a2c3d..9935b2a0cd 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 @@ -827,8 +827,12 @@ public class ObjcRuleClasses { return RuleDefinition.Metadata.builder() .name("$objc_bundling_rule") .type(RuleClassType.ABSTRACT) - .ancestors(OptionsRule.class, ResourceToolsRule.class, XcrunRule.class, - AppleToolchain.RequiresXcodeConfigRule.class) + .ancestors( + AppleToolchain.RequiresXcodeConfigRule.class, + OptionsRule.class, + ResourcesRule.class, + ResourceToolsRule.class, + XcrunRule.class) .build(); } } |