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.ApkInfoequals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hasBuildSteps, hashCode, injectFields, toString, updateBuildRuleResolverclone, finalize, getClass, notify, notifyAll, wait, wait, waitisSupportedcompareTo, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, hasBuildSteps, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString, updateBuildRuleResolvergetDependencies, getSourcePathOutputsgetTypegetBuildTarget, getProjectFilesystempublic SortedSet<BuildRule> getBuildDeps()
getBuildDeps in interface BuildRuledeps 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 HasDeclaredAndExtraDepspublic SortedSet<BuildRule> deprecatedGetExtraDeps()
deprecatedGetExtraDeps in interface HasDeclaredAndExtraDepspublic com.google.common.collect.ImmutableSortedSet<BuildRule> getTargetGraphOnlyDeps()
getTargetGraphOnlyDeps in interface HasDeclaredAndExtraDepspublic 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 HasInstallableApkpublic java.util.stream.Stream<BuildTarget> getInstallHelpers()
getInstallHelpers in interface HasInstallHelperspublic boolean isCacheable()
BuildRuleBuildRule 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 BuildEngineActionisCacheable in interface BuildRuleisCacheable in class AbstractBuildRulepublic boolean inputBasedRuleKeyIsEnabled()
inputBasedRuleKeyIsEnabled in interface SupportsInputBasedRuleKeypublic com.google.common.collect.ImmutableList<? extends Step> getBuildSteps(BuildContext context, BuildableContext buildableContext)
getBuildSteps in interface BuildRulepublic SourcePath getSourcePathToOutput()
getSourcePathToOutput in interface BuildRulepublic Keystore getKeystore()
public com.google.common.collect.ImmutableSet<SourcePath> getTransitiveClasspaths()
getTransitiveClasspaths in interface HasClasspathEntriesjavac's -classpath flag
in order to build a jar associated with this rule.public com.google.common.collect.ImmutableSet<JavaLibrary> getTransitiveClasspathDeps()
getTransitiveClasspathDeps in interface HasClasspathEntriespublic com.google.common.collect.ImmutableSet<SourcePath> getImmediateClasspaths()
HasClasspathEntriesUsed to generate the value of HasClasspathEntries.getTransitiveClasspaths().
getImmediateClasspaths in interface HasClasspathEntriespublic com.google.common.collect.ImmutableSet<SourcePath> getOutputClasspaths()
getOutputClasspaths in interface HasClasspathEntriesjavac'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