public abstract class BaseIjModuleRule<T extends BuildRuleArg> extends Object implements IjModuleRule<T>
Modifier and Type | Field and Description |
---|---|
protected IjModuleFactoryResolver |
moduleFactoryResolver |
protected IjProjectConfig |
projectConfig |
protected ProjectFilesystem |
projectFilesystem |
Modifier | Constructor and Description |
---|---|
protected |
BaseIjModuleRule(ProjectFilesystem projectFilesystem,
IjModuleFactoryResolver moduleFactoryResolver,
IjProjectConfig projectConfig) |
Modifier and Type | Method and Description |
---|---|
protected void |
addDepsAndSources(TargetNode<T> targetNode,
boolean wantsPackagePrefix,
ModuleBuildContext context) |
protected void |
addDepsAndSources(TargetNode<T> targetNode,
boolean wantsPackagePrefix,
ModuleBuildContext context,
com.google.common.collect.ImmutableSet<Path> resourcePaths) |
protected void |
addDepsAndTestSources(TargetNode<T> targetNode,
boolean wantsPackagePrefix,
ModuleBuildContext context) |
protected void |
addDepsAndTestSources(TargetNode<T> targetNode,
boolean wantsPackagePrefix,
ModuleBuildContext context,
com.google.common.collect.ImmutableSet<Path> resourcePaths) |
protected void |
addResourceFolders(IjResourceFolderType ijResourceFolderType,
com.google.common.collect.ImmutableCollection<Path> resourcePaths,
Path resourcesRoot,
ModuleBuildContext context) |
protected void |
addResourceFolders(ResourceFolderFactory factory,
com.google.common.collect.ImmutableMultimap<Path,Path> foldersToInputsIndex,
Path resourcesRoot,
ModuleBuildContext context) |
protected void |
addSourceFolders(IJFolderFactory factory,
com.google.common.collect.ImmutableMultimap<Path,Path> foldersToInputsIndex,
boolean wantsPackagePrefix,
ModuleBuildContext context)
Add the set of input paths to the
IjModule.Builder as source folders. |
void |
applyDuringAggregation(AggregationContext context,
TargetNode<T> targetNode) |
protected com.google.common.collect.ImmutableSet<Path> |
getResourcePaths(Collection<SourcePath> resources) |
protected com.google.common.collect.ImmutableSet<Path> |
getResourcePaths(Collection<SourcePath> resources,
Path resourcesRoot) |
protected com.google.common.collect.ImmutableMultimap<Path,Path> |
getResourcesRootsToResources(JavaPackageFinder packageFinder,
com.google.common.collect.ImmutableSet<Path> resourcePaths) |
protected static com.google.common.collect.ImmutableMultimap<Path,Path> |
getSourceFoldersToInputsIndex(com.google.common.collect.ImmutableCollection<Path> paths)
Calculate the set of directories containing inputs to the target.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply, detectModuleType, getDescriptionClass
protected final ProjectFilesystem projectFilesystem
protected final IjModuleFactoryResolver moduleFactoryResolver
protected final IjProjectConfig projectConfig
protected BaseIjModuleRule(ProjectFilesystem projectFilesystem, IjModuleFactoryResolver moduleFactoryResolver, IjProjectConfig projectConfig)
protected static com.google.common.collect.ImmutableMultimap<Path,Path> getSourceFoldersToInputsIndex(com.google.common.collect.ImmutableCollection<Path> paths)
paths
- inputs to a given target.protected void addSourceFolders(IJFolderFactory factory, com.google.common.collect.ImmutableMultimap<Path,Path> foldersToInputsIndex, boolean wantsPackagePrefix, ModuleBuildContext context)
IjModule.Builder
as source folders.foldersToInputsIndex
- mapping of source folders to their inputs.wantsPackagePrefix
- whether folders should be annotated with a package prefix. This only
makes sense when the source folder is Java source code.context
- the module to add the folders to.protected void addResourceFolders(ResourceFolderFactory factory, com.google.common.collect.ImmutableMultimap<Path,Path> foldersToInputsIndex, Path resourcesRoot, ModuleBuildContext context)
protected void addDepsAndSources(TargetNode<T> targetNode, boolean wantsPackagePrefix, ModuleBuildContext context, com.google.common.collect.ImmutableSet<Path> resourcePaths)
protected void addDepsAndSources(TargetNode<T> targetNode, boolean wantsPackagePrefix, ModuleBuildContext context)
protected void addDepsAndTestSources(TargetNode<T> targetNode, boolean wantsPackagePrefix, ModuleBuildContext context, com.google.common.collect.ImmutableSet<Path> resourcePaths)
protected void addDepsAndTestSources(TargetNode<T> targetNode, boolean wantsPackagePrefix, ModuleBuildContext context)
protected com.google.common.collect.ImmutableSet<Path> getResourcePaths(Collection<SourcePath> resources)
protected com.google.common.collect.ImmutableSet<Path> getResourcePaths(Collection<SourcePath> resources, Path resourcesRoot)
protected com.google.common.collect.ImmutableMultimap<Path,Path> getResourcesRootsToResources(JavaPackageFinder packageFinder, com.google.common.collect.ImmutableSet<Path> resourcePaths)
protected void addResourceFolders(IjResourceFolderType ijResourceFolderType, com.google.common.collect.ImmutableCollection<Path> resourcePaths, Path resourcesRoot, ModuleBuildContext context)
public void applyDuringAggregation(AggregationContext context, TargetNode<T> targetNode)
applyDuringAggregation
in interface IjModuleRule<T extends BuildRuleArg>