public class AndroidBundle extends AbstractBuildRule implements SupportsInputBasedRuleKey, HasDeclaredAndExtraDeps, HasClasspathEntries, HasRuntimeDeps, HasInstallableApk, HasInstallHelpers
android_bundle( name = 'messenger', manifest = 'AndroidManifest.xml', deps = [ '//src/com/facebook/messenger:messenger_library', ], )Configuration for dynamic feature (enable use_split_dex, use_dynamic_feature and application_module_configs flags) :
A new configuration application_modules_with_manifest is defined to decouple the manifest behaviour from the resources. This approach is aligned with dynamic features heuristics where base manifest has complete information of the feature manifest
android_bundle( name = 'messenger', manifest = 'AndroidManifest.xml', deps = [ '//src/com/facebook/messenger:messenger_library', ], use_split_dex = True, use_dynamic_feature = True, application_module_configs = { "feature1":['//feature1:module_root'], }, application_modules_with_manifest = [ "feature1", ] )
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 Optional<SourcePath> getProguardConfig()
public boolean getSkipProguard()
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 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