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, getTargetGraphOnlyDepsequals, getBuildTarget, getDependencies, getProjectFilesystem, getSourcePathOutputs, getType, hasBuildSteps, hashCode, injectFields, isCacheable, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcompareTo, getBuildDeps, getBuildTarget, getFullyQualifiedName, getProjectFilesystem, hasBuildSteps, isCacheable, outputFileCanBeCopied, shouldRespectInputSizeLimitForRemoteExecution, toStringgetDependencies, getSourcePathOutputsgetTypepublic 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 BuildRulepublic SourcePath getSourcePathToOutput()
getSourcePathToOutput in interface BuildRulepublic Tool getExecutableCommand(OutputLabel outputLabel)
BinaryBuildRulegetExecutableCommand in interface BinaryBuildRuleoutputLabel - associated with the executablepublic com.google.common.collect.ImmutableMap<String,SourcePath> getNativeLibraries()
public void updateBuildRuleResolver(BuildRuleResolver ruleResolver)
BuildRuleBuild 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 BuildRuleupdateBuildRuleResolver in class AbstractBuildRulepublic 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.