public abstract class UnusedDependenciesFinder extends Object implements Step
It uses class usage map produced during compilation and compares it to the outputs of the dependencies specified in Java libraries. The entries from classpath not used during compilation are resolved to the corresponding targets and reported back to the user either as an error (which halt the build) or as a warning.
Constructor and Description |
---|
UnusedDependenciesFinder() |
Modifier and Type | Method and Description |
---|---|
StepExecutionResult |
execute(ExecutionContext context) |
abstract Optional<String> |
getBuildozerPath() |
abstract BuildTarget |
getBuildTarget() |
abstract Path |
getDepFileRelativePath() |
abstract com.google.common.collect.ImmutableList<com.facebook.buck.jvm.java.UnusedDependenciesFinder.DependencyAndExportedDeps> |
getDeps() |
String |
getDescription(ExecutionContext context) |
abstract ProjectFilesystem |
getProjectFilesystem() |
abstract com.google.common.collect.ImmutableList<com.facebook.buck.jvm.java.UnusedDependenciesFinder.DependencyAndExportedDeps> |
getProvidedDeps() |
String |
getShortName() |
abstract SourcePathResolverAdapter |
getSourcePathResolver() |
abstract JavaBuckConfig.UnusedDependenciesAction |
getUnusedDependenciesAction() |
abstract boolean |
isOnlyPrintCommands() |
public abstract BuildTarget getBuildTarget()
public abstract ProjectFilesystem getProjectFilesystem()
public abstract Path getDepFileRelativePath()
public abstract com.google.common.collect.ImmutableList<com.facebook.buck.jvm.java.UnusedDependenciesFinder.DependencyAndExportedDeps> getDeps()
public abstract com.google.common.collect.ImmutableList<com.facebook.buck.jvm.java.UnusedDependenciesFinder.DependencyAndExportedDeps> getProvidedDeps()
public abstract SourcePathResolverAdapter getSourcePathResolver()
public abstract JavaBuckConfig.UnusedDependenciesAction getUnusedDependenciesAction()
public abstract boolean isOnlyPrintCommands()
public StepExecutionResult execute(ExecutionContext context) throws IOException
execute
in interface Step
IOException
public String getShortName()
getShortName
in interface Step
public String getDescription(ExecutionContext context)
getDescription
in interface Step