public class ResourcesFilter extends AbstractBuildRule implements FilteredResourcesProvider, InitializableFromDisk<ResourcesFilter.BuildOutput>
Clients of this Buildable may need to know:
strings.xml
files identified by the resource filter.
Modifier and Type | Class and Description |
---|---|
static class |
ResourcesFilter.BuildOutput |
Constructor and Description |
---|
ResourcesFilter(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
com.google.common.collect.ImmutableSortedSet<BuildRule> resourceRules,
com.google.common.collect.ImmutableCollection<BuildRule> rulesWithResourceDirectories,
SourcePathRuleFinder ruleFinder,
com.google.common.collect.ImmutableList<SourcePath> resDirectories,
com.google.common.collect.ImmutableSet<SourcePath> whitelistedStringDirs,
com.google.common.collect.ImmutableSet<String> locales,
Optional<String> localizedStringFileName,
com.facebook.buck.android.ResourcesFilter.ResourceCompressionMode resourceCompressionMode,
FilterResourcesSteps.ResourceFilter resourceFilter,
Optional<Arg> postFilterResourcesCmd) |
Modifier and Type | Method and Description |
---|---|
SortedSet<BuildRule> |
getBuildDeps() |
BuildOutputInitializer<ResourcesFilter.BuildOutput> |
getBuildOutputInitializer() |
com.google.common.collect.ImmutableList<Step> |
getBuildSteps(BuildContext context,
BuildableContext buildableContext) |
Optional<SourcePath> |
getOverrideSymbolsPath() |
com.google.common.collect.ImmutableList<SourcePath> |
getResDirectories() |
Optional<BuildRule> |
getResourceFilterRule() |
SourcePath |
getSourcePathToOutput() |
com.google.common.collect.ImmutableList<Path> |
getStringFiles() |
boolean |
hasResources() |
ResourcesFilter.BuildOutput |
initializeFromDisk(SourcePathResolverAdapter pathResolver) |
equals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hasBuildSteps, hashCode, injectFields, isCacheable, toString, updateBuildRuleResolver
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getRelativeResDirectories
invalidateInitializeFromDiskState
compareTo, getFullyQualifiedName, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution
public ResourcesFilter(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, com.google.common.collect.ImmutableSortedSet<BuildRule> resourceRules, com.google.common.collect.ImmutableCollection<BuildRule> rulesWithResourceDirectories, SourcePathRuleFinder ruleFinder, com.google.common.collect.ImmutableList<SourcePath> resDirectories, com.google.common.collect.ImmutableSet<SourcePath> whitelistedStringDirs, com.google.common.collect.ImmutableSet<String> locales, Optional<String> localizedStringFileName, com.facebook.buck.android.ResourcesFilter.ResourceCompressionMode resourceCompressionMode, FilterResourcesSteps.ResourceFilter resourceFilter, Optional<Arg> postFilterResourcesCmd)
public com.google.common.collect.ImmutableList<SourcePath> getResDirectories()
getResDirectories
in interface FilteredResourcesProvider
public com.google.common.collect.ImmutableList<Path> getStringFiles()
getStringFiles
in interface FilteredResourcesProvider
strings.xml
files excluding whitelisted strings. Empty unless
ResourceCompressionMode.isStoreStringsAsAssets
is true.public Optional<BuildRule> getResourceFilterRule()
getResourceFilterRule
in interface FilteredResourcesProvider
public boolean hasResources()
hasResources
in interface FilteredResourcesProvider
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 com.google.common.collect.ImmutableList<Step> getBuildSteps(BuildContext context, BuildableContext buildableContext)
getBuildSteps
in interface BuildRule
public Optional<SourcePath> getOverrideSymbolsPath()
getOverrideSymbolsPath
in interface FilteredResourcesProvider
public ResourcesFilter.BuildOutput initializeFromDisk(SourcePathResolverAdapter pathResolver) throws IOException
initializeFromDisk
in interface InitializableFromDisk<ResourcesFilter.BuildOutput>
IOException
public BuildOutputInitializer<ResourcesFilter.BuildOutput> getBuildOutputInitializer()
getBuildOutputInitializer
in interface InitializableFromDisk<ResourcesFilter.BuildOutput>
@Nullable public SourcePath getSourcePathToOutput()
getSourcePathToOutput
in interface BuildRule