public class JarFattener extends AbstractBuildRuleWithDeclaredAndExtraDeps implements BinaryBuildRule, HasClasspathEntries
Modifier and Type | Field and Description |
---|---|
static String |
FAT_JAR_MAIN_SRC_RESOURCE |
static com.google.common.collect.ImmutableList<String> |
FAT_JAR_SRC_RESOURCES |
Constructor and Description |
---|
JarFattener(BuildTarget buildTarget,
ProjectFilesystem projectFilesystem,
BuildRuleParams params,
Javac javac,
JavacOptions javacOptions,
SourcePath innerJar,
JavaBinary innerJarRule,
com.google.common.collect.ImmutableMap<String,SourcePath> nativeLibraries,
Tool javaRuntimeLauncher) |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableList<Step> |
getBuildSteps(BuildContext context,
BuildableContext buildableContext) |
Tool |
getExecutableCommand(OutputLabel outputLabel)
Command to execute the output of this rule.
|
com.google.common.collect.ImmutableSet<SourcePath> |
getImmediateClasspaths()
Returns the classpaths for only this rule, not its deps.
|
com.google.common.collect.ImmutableMap<String,SourcePath> |
getNativeLibraries() |
com.google.common.collect.ImmutableSet<SourcePath> |
getOutputClasspaths() |
SourcePath |
getSourcePathToOutput() |
com.google.common.collect.ImmutableSet<JavaLibrary> |
getTransitiveClasspathDeps() |
com.google.common.collect.ImmutableSet<SourcePath> |
getTransitiveClasspaths() |
void |
updateBuildRuleResolver(BuildRuleResolver ruleResolver)
Updates the BuildRuleResolver and associated objects for this build rule.
|
deprecatedGetExtraDeps, getBuildDeps, getDeclaredDeps, getTargetGraphOnlyDeps
equals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hasBuildSteps, hashCode, injectFields, isCacheable, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo, getBuildDeps, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, hasBuildSteps, isCacheable, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toString
getDependencies, getSourcePathOutputs
getType
public static final com.google.common.collect.ImmutableList<String> FAT_JAR_SRC_RESOURCES
public static final String FAT_JAR_MAIN_SRC_RESOURCE
public JarFattener(BuildTarget buildTarget, ProjectFilesystem projectFilesystem, BuildRuleParams params, Javac javac, JavacOptions javacOptions, SourcePath innerJar, JavaBinary innerJarRule, com.google.common.collect.ImmutableMap<String,SourcePath> nativeLibraries, Tool javaRuntimeLauncher)
public com.google.common.collect.ImmutableList<Step> getBuildSteps(BuildContext context, BuildableContext buildableContext)
getBuildSteps
in interface BuildRule
public SourcePath getSourcePathToOutput()
getSourcePathToOutput
in interface BuildRule
public Tool getExecutableCommand(OutputLabel outputLabel)
BinaryBuildRule
getExecutableCommand
in interface BinaryBuildRule
outputLabel
- associated with the executablepublic com.google.common.collect.ImmutableMap<String,SourcePath> getNativeLibraries()
public void updateBuildRuleResolver(BuildRuleResolver ruleResolver)
BuildRule
Build rules sometimes hold field references to build rule resolvers. If this build rule is to be cached, it must update its BuildRuleResolver when a new action graph is constructed to avoid leaking the entire action graph it was originally associated with.
updateBuildRuleResolver
in interface BuildRule
updateBuildRuleResolver
in class AbstractBuildRule
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.