Skip to content

Commit

Permalink
Automatic code cleanup.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 610002527
Change-Id: Idb019124e006d649eaa64473184b2101c5ccc23f
  • Loading branch information
Googler authored and copybara-github committed Feb 24, 2024
1 parent 3ebf7da commit 9ca9a24
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,4 @@

package com.google.devtools.build.lib.rules.objc;

import com.google.devtools.build.lib.testutil.Scratch;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;

/**
* This exists for convenience for any rule type requires the exact same attributes as
* {@code objc_binary}. If some rule ever changes to require more or fewer attributes, it is OK
* to stop using this class.
*/
final class BinaryRuleType extends RuleType {
BinaryRuleType(String ruleTypeName) {
super(ruleTypeName);
}

@Override
Iterable<String> requiredAttributes(
Scratch scratch, String packageName, Set<String> alreadyAdded) throws IOException {
List<String> attributes = new ArrayList<>();
if (!alreadyAdded.contains("srcs") && !alreadyAdded.contains("non_arc_srcs")) {
scratch.file(packageName + "/a.m");
scratch.file(packageName + "/private.h");
attributes.add("srcs = ['a.m', 'private.h']");
}
return attributes;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,6 @@ final String getRuleTypeName() {
return ruleTypeName;
}

/**
* Returns whether this type exports companion library target in Xcode.
*/
final boolean exportsXcodeCompanionTarget() {
return ruleTypeName.equals("objc_binary");
}

/**
* Returns the bundle extension for the bundles generated by the rule.
*/
final String bundleExtension() {
return ruleTypeName.equals("ios_test") ? "xctest" : "app";
}

/**
* Returns names and values, and otherwise prepares, extra attributes required for this rule type
* to be without error. For instance, if this rule type requires 'srcs' and 'infoplist'
Expand Down

0 comments on commit 9ca9a24

Please sign in to comment.