public class AndroidBinary extends AbstractBuildRule implements SupportsInputBasedRuleKey, HasDeclaredAndExtraDeps, HasClasspathDeps, HasClasspathEntries, HasRuntimeDeps, HasInstallableApk, HasInstallHelpers
android_binary( name = 'messenger', manifest = 'AndroidManifest.xml', deps = [ '//src/com/facebook/messenger:messenger_library', ], )
HasInstallableApk.ApkInfo
equals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hasBuildSteps, hashCode, injectFields, toString, updateBuildRuleResolver
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isSupported
compareTo, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, hasBuildSteps, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString, updateBuildRuleResolver
getDependencies, getSourcePathOutputs
getType
getBuildTarget, getProjectFilesystem
public 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 SortedSet<BuildRule> getDeclaredDeps()
getDeclaredDeps
in interface HasDeclaredAndExtraDeps
public SortedSet<BuildRule> deprecatedGetExtraDeps()
deprecatedGetExtraDeps
in interface HasDeclaredAndExtraDeps
public com.google.common.collect.ImmutableSortedSet<BuildRule> getTargetGraphOnlyDeps()
getTargetGraphOnlyDeps
in interface HasDeclaredAndExtraDeps
public java.util.function.Supplier<com.google.common.collect.ImmutableSet<JavaLibrary>> getRulesToExcludeFromDex()
public com.google.common.collect.ImmutableSet<BuildTarget> getBuildTargetsToExcludeFromDex()
public Optional<SourcePath> getProguardConfig()
public boolean getSkipProguard()
public com.facebook.buck.android.ResourcesFilter.ResourceCompressionMode getResourceCompressionMode()
public com.google.common.collect.ImmutableSet<TargetCpuType> getCpuFilters()
public FilterResourcesSteps.ResourceFilter getResourceFilter()
public int getOptimizationPasses()
public ManifestEntries getManifestEntries()
public HasInstallableApk.ApkInfo getApkInfo()
getApkInfo
in interface HasInstallableApk
public java.util.stream.Stream<BuildTarget> getInstallHelpers()
getInstallHelpers
in interface HasInstallHelpers
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 boolean inputBasedRuleKeyIsEnabled()
inputBasedRuleKeyIsEnabled
in interface SupportsInputBasedRuleKey
public com.google.common.collect.ImmutableList<? extends Step> getBuildSteps(BuildContext context, BuildableContext buildableContext)
getBuildSteps
in interface BuildRule
public SourcePath getSourcePathToOutput()
getSourcePathToOutput
in interface BuildRule
public AndroidPackageableCollection getAndroidPackageableCollection()
public Keystore getKeystore()
public com.google.common.collect.ImmutableSet<SourcePath> getTransitiveClasspaths()
getTransitiveClasspaths
in interface HasClasspathEntries
javac
's -classpath
flag
in order to build a jar associated with this rule.public com.google.common.collect.ImmutableSet<JavaLibrary> getTransitiveClasspathDeps()
getTransitiveClasspathDeps
in interface HasClasspathEntries
public com.google.common.collect.ImmutableSet<SourcePath> getImmediateClasspaths()
HasClasspathEntries
Used to generate the value of HasClasspathEntries.getTransitiveClasspaths()
.
getImmediateClasspaths
in interface HasClasspathEntries
public com.google.common.collect.ImmutableSet<SourcePath> getOutputClasspaths()
getOutputClasspaths
in interface HasClasspathEntries
javac
's
-classpath
flag in order to compile rules that depend on this rule. This is a
superset of getImmediateClasspaths
which also contains the classpath entries of any
exported deps.public java.util.stream.Stream<BuildTarget> getRuntimeDeps(BuildRuleResolver buildRuleResolver)
getRuntimeDeps
in interface HasRuntimeDeps
public Set<BuildRule> getDepsForTransitiveClasspathEntries()
getDepsForTransitiveClasspathEntries
in interface HasClasspathDeps