public class AppleBundle extends AbstractBuildRule implements NativeTestable, BuildRuleWithBinary, HasRuntimeDeps, BinaryBuildRule
Modifier and Type | Field and Description |
---|---|
static String |
CODE_SIGN_ENTITLEMENTS |
Modifier and Type | Method and Description |
---|---|
void |
addSwiftStdlibStepIfNeeded(SourcePathResolverAdapter resolver,
Path destinationPath,
Optional<java.util.function.Supplier<CodeSignIdentity>> codeSignIdentitySupplier,
com.google.common.collect.ImmutableList.Builder<Step> stepsBuilder,
boolean isForPackaging)
A wrapper around AppleResourceProcessing.addSwiftStdlibStepIfNeeded
|
Optional<AppleDsym> |
getAppleDsym() |
Optional<BuildRule> |
getBinary() |
BuildRule |
getBinaryBuildRule() |
static String |
getBinaryName(BuildTarget buildTarget,
Optional<String> productName) |
SortedSet<BuildRule> |
getBuildDeps() |
com.google.common.collect.ImmutableList<Step> |
getBuildSteps(BuildContext context,
BuildableContext buildableContext) |
static Path |
getBundleRoot(ProjectFilesystem filesystem,
BuildTarget buildTarget,
String binaryName,
String extension) |
Tool |
getExecutableCommand(OutputLabel outputLabel)
Command to execute the output of this rule.
|
String |
getExtension() |
Path |
getInfoPlistPath() |
Boolean |
getIsAppClip() |
String |
getPlatformName() |
CxxPreprocessorInput |
getPrivateCxxPreprocessorInput(CxxPlatform cxxPlatform,
ActionGraphBuilder graphBuilder)
Return the
CxxPreprocessorInput to expose private headers of this rule. |
java.util.stream.Stream<BuildTarget> |
getRuntimeDeps(BuildRuleResolver buildRuleResolver) |
SourcePath |
getSourcePathToOutput() |
Path |
getUnzippedOutputFilePathToBinary() |
boolean |
isCacheable()
Whether this
BuildRule can be cached. |
boolean |
isLegacyWatchApp() |
boolean |
isTestedBy(BuildTarget testRule)
Return true if this rule is tested by
testTarget , false otherwise. |
void |
updateBuildRuleResolver(BuildRuleResolver ruleResolver)
Updates the BuildRuleResolver and associated objects for this build rule.
|
static com.google.common.collect.ImmutableMap<String,String> |
withDefaults(com.google.common.collect.ImmutableMap<String,String> map,
com.google.common.collect.ImmutableMap<String,String> defaults) |
equals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hasBuildSteps, hashCode, injectFields, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, hasBuildSteps, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString
getDependencies, getSourcePathOutputs
getType
public static final String CODE_SIGN_ENTITLEMENTS
public static String getBinaryName(BuildTarget buildTarget, Optional<String> productName)
public static Path getBundleRoot(ProjectFilesystem filesystem, BuildTarget buildTarget, String binaryName, String extension)
public String getExtension()
public SourcePath getSourcePathToOutput()
getSourcePathToOutput
in interface BuildRule
public Path getInfoPlistPath()
public Path getUnzippedOutputFilePathToBinary()
public String getPlatformName()
public boolean isLegacyWatchApp()
public com.google.common.collect.ImmutableList<Step> getBuildSteps(BuildContext context, BuildableContext buildableContext)
getBuildSteps
in interface BuildRule
public void addSwiftStdlibStepIfNeeded(SourcePathResolverAdapter resolver, Path destinationPath, Optional<java.util.function.Supplier<CodeSignIdentity>> codeSignIdentitySupplier, com.google.common.collect.ImmutableList.Builder<Step> stepsBuilder, boolean isForPackaging)
public static com.google.common.collect.ImmutableMap<String,String> withDefaults(com.google.common.collect.ImmutableMap<String,String> map, com.google.common.collect.ImmutableMap<String,String> defaults)
public Boolean getIsAppClip()
public boolean isTestedBy(BuildTarget testRule)
NativeTestable
testTarget
, false otherwise.isTestedBy
in interface NativeTestable
public CxxPreprocessorInput getPrivateCxxPreprocessorInput(CxxPlatform cxxPlatform, ActionGraphBuilder graphBuilder)
NativeTestable
CxxPreprocessorInput
to expose private headers of this rule. This is used to
propagate private headers to the test testing this object. For convenience, tests can see
private headers visible in the rule being tested.getPrivateCxxPreprocessorInput
in interface NativeTestable
public BuildRule getBinaryBuildRule()
getBinaryBuildRule
in interface BuildRuleWithBinary
public java.util.stream.Stream<BuildTarget> getRuntimeDeps(BuildRuleResolver buildRuleResolver)
getRuntimeDeps
in interface HasRuntimeDeps
public boolean isCacheable()
BuildRule
BuildRule
can be cached.
Uncached build rules are never written out to cache, never read from cache, and does not count in cache statistics. This rule is useful for artifacts which cannot be easily normalized.
Uncached rules are not always rebuilt, however, as long as the existing on-disk
representation is up to date. This means that these rules can take advantage of SupportsInputBasedRuleKey
to prevent rebuilding.
isCacheable
in interface BuildEngineAction
isCacheable
in interface BuildRule
isCacheable
in class AbstractBuildRule
public Tool getExecutableCommand(OutputLabel outputLabel)
BinaryBuildRule
getExecutableCommand
in interface BinaryBuildRule
outputLabel
- associated with the executablepublic SortedSet<BuildRule> getBuildDeps()
getBuildDeps
in interface BuildRule
deps
argument for this build rule in the build file in which it was defined.
However, there are special cases where other arguments pull in implicit dependencies
(e.g., the keystore
argument in android_binary
). In these cases, the
implicit dependencies are also included in the set returned by this method. The value of
the original deps
argument, as defined in the build file, must be accessed via a
custom getter provided by the build rule.
public void updateBuildRuleResolver(BuildRuleResolver ruleResolver)
BuildRule
Build rules sometimes hold field references to build rule resolvers. If this build rule is to be cached, it must update its BuildRuleResolver when a new action graph is constructed to avoid leaking the entire action graph it was originally associated with.
updateBuildRuleResolver
in interface BuildRule
updateBuildRuleResolver
in class AbstractBuildRule