public class DependencyHandler
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DependencyHandler.DependencyDirType |
static class |
DependencyHandler.GetResult |
static class |
DependencyHandler.GetTask |
| Modifier and Type | Field and Description |
|---|---|
protected static java.nio.file.DirectoryStream.Filter<java.nio.file.Path> |
GO_FILENAME_FILTER |
protected static java.util.regex.Pattern |
IS_EXTERNAL_DEPENDENCY_PATTERN |
| Constructor and Description |
|---|
DependencyHandler(org.gradle.internal.logging.progress.ProgressLoggerFactory progressLoggerFactory,
Settings settings) |
DependencyHandler(org.gradle.internal.service.ServiceRegistry serviceRegistry,
Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Collection<GolangDependency> |
allProjectDependencies() |
protected void |
appendDependenciesOf(org.gradle.api.artifacts.Configuration configuration,
java.util.Collection<GolangDependency> to) |
protected void |
appendDependenciesOf(java.lang.String configurationName,
java.util.Collection<GolangDependency> to) |
protected void |
appendFilesFor(java.lang.Iterable<java.nio.file.Path> roots,
GolangDependency dependency,
java.util.Set<java.nio.file.Path> to) |
protected void |
appendFilesFor(java.nio.file.Path root,
GolangDependency dependency,
java.util.Set<java.nio.file.Path> to) |
protected java.util.Map<java.nio.file.Path,DependencyHandler.DependencyDirType> |
collectDirectoriesToKnownDependencyOf(java.nio.file.Path root,
java.util.Set<java.lang.String> knownDependencyIds) |
protected java.util.Collection<java.nio.file.Path> |
collectUnknownDependencyDirectories(java.nio.file.Path root,
java.util.Set<java.lang.String> knownDependencyIds) |
protected boolean |
containsGoSources(java.nio.file.Path candidate) |
java.util.Collection<java.nio.file.Path> |
deleteAllCachedDependenciesIfRequired() |
java.util.Collection<java.nio.file.Path> |
deleteUnknownDependenciesIfRequired() |
protected java.util.Collection<GolangDependency> |
dependencies(DependencyHandler.GetTask task) |
protected java.util.Collection<java.nio.file.Path> |
doDeleteAllCachedDependenciesIfRequired(java.nio.file.Path root) |
protected java.util.Collection<java.nio.file.Path> |
doDeleteUnknownDependencies(java.nio.file.Path root,
java.util.Set<java.lang.String> knownDependencyIds) |
protected java.util.Collection<java.nio.file.Path> |
doDeleteUnknownDependenciesIfRequired(java.nio.file.Path root,
java.util.Set<java.lang.String> knownDependencyIds) |
protected java.util.Set<java.nio.file.Path> |
filesFor(GolangDependency dependency) |
java.util.Map<GolangDependency,DependencyHandler.GetResult> |
get(DependencyHandler.GetTask task) |
protected boolean |
isChildOfWithInfoFile(java.nio.file.Path directory,
java.nio.file.Path root,
java.util.Map<java.nio.file.Path,DependencyHandler.DependencyDirType> directories) |
protected boolean |
isKnownDependencyDirectory(java.nio.file.Path directory,
java.nio.file.Path root,
java.util.Set<java.lang.String> knownDependencyIds) |
protected boolean |
isPartOfProjectSources(java.lang.String packageName) |
protected java.util.Set<GolangDependency> |
resolveDependenciesOf(GolangDependency dependency) |
protected GolangDependency |
resolveDependenciesPackage(java.lang.String packageName) |
protected GolangDependency |
resolveGopathPackage(java.lang.String packageName) |
protected GolangDependency |
resolveGorootPackage(java.lang.String packageName) |
protected GolangDependency |
resolvePackage(GolangDependency demandedBy,
java.lang.String packageName) |
protected GolangDependency |
resolveVendorPackage(GolangDependency demandedBy,
java.lang.String packageName) |
protected java.nio.file.Path |
selectTargetDirectoryFor(DependencyHandler.GetTask task) |
protected java.nio.file.Path |
selectTargetDirectoryFor(java.lang.String configuration) |
protected static final java.util.regex.Pattern IS_EXTERNAL_DEPENDENCY_PATTERN
protected static final java.nio.file.DirectoryStream.Filter<java.nio.file.Path> GO_FILENAME_FILTER
public DependencyHandler(@Nonnull
org.gradle.internal.service.ServiceRegistry serviceRegistry,
@Nonnull
Settings settings)
public DependencyHandler(@Nonnull
org.gradle.internal.logging.progress.ProgressLoggerFactory progressLoggerFactory,
@Nonnull
Settings settings)
@Nonnull public java.util.Map<GolangDependency,DependencyHandler.GetResult> get(@Nonnull DependencyHandler.GetTask task) throws java.lang.Exception
java.lang.Exceptionprotected boolean isPartOfProjectSources(@Nonnull
java.lang.String packageName)
throws java.lang.Exception
java.lang.Exception@Nonnull
protected java.nio.file.Path selectTargetDirectoryFor(@Nonnull
DependencyHandler.GetTask task)
throws java.lang.Exception
java.lang.Exception@Nonnull
protected java.nio.file.Path selectTargetDirectoryFor(@Nullable
java.lang.String configuration)
throws java.lang.Exception
java.lang.Exception@Nonnull protected java.util.Set<GolangDependency> resolveDependenciesOf(@Nonnull GolangDependency dependency) throws java.lang.Exception
java.lang.Exception@Nonnull protected GolangDependency resolvePackage(@Nonnull GolangDependency demandedBy, @Nonnull java.lang.String packageName) throws java.lang.Exception
java.lang.Exception@Nullable protected GolangDependency resolveVendorPackage(@Nonnull GolangDependency demandedBy, @Nonnull java.lang.String packageName) throws java.lang.Exception
java.lang.Exception@Nullable protected GolangDependency resolveDependenciesPackage(@Nonnull java.lang.String packageName) throws java.lang.Exception
java.lang.Exception@Nullable protected GolangDependency resolveGopathPackage(@Nonnull java.lang.String packageName) throws java.lang.Exception
java.lang.Exception@Nullable protected GolangDependency resolveGorootPackage(@Nonnull java.lang.String packageName) throws java.lang.Exception
java.lang.Exceptionprotected boolean containsGoSources(@Nonnull
java.nio.file.Path candidate)
throws java.lang.Exception
java.lang.Exception@Nonnull
protected java.util.Set<java.nio.file.Path> filesFor(@Nonnull
GolangDependency dependency)
throws java.lang.Exception
java.lang.Exceptionprotected void appendFilesFor(@Nonnull
java.lang.Iterable<java.nio.file.Path> roots,
@Nonnull
GolangDependency dependency,
@Nonnull
java.util.Set<java.nio.file.Path> to)
throws java.lang.Exception
java.lang.Exceptionprotected void appendFilesFor(@Nonnull
java.nio.file.Path root,
@Nonnull
GolangDependency dependency,
@Nonnull
java.util.Set<java.nio.file.Path> to)
throws java.lang.Exception
java.lang.Exception@Nonnull
public java.util.Collection<java.nio.file.Path> deleteUnknownDependenciesIfRequired()
throws java.lang.Exception
java.lang.Exception@Nonnull
public java.util.Collection<java.nio.file.Path> deleteAllCachedDependenciesIfRequired()
throws java.lang.Exception
java.lang.Exception@Nonnull protected java.util.Collection<GolangDependency> dependencies(@Nonnull DependencyHandler.GetTask task)
protected void appendDependenciesOf(@Nonnull
java.lang.String configurationName,
@Nonnull
java.util.Collection<GolangDependency> to)
@Nonnull protected java.util.Collection<GolangDependency> allProjectDependencies()
protected void appendDependenciesOf(@Nonnull
org.gradle.api.artifacts.Configuration configuration,
@Nonnull
java.util.Collection<GolangDependency> to)
@Nonnull
protected java.util.Collection<java.nio.file.Path> doDeleteUnknownDependenciesIfRequired(@Nonnull
java.nio.file.Path root,
@Nonnull
java.util.Set<java.lang.String> knownDependencyIds)
throws java.io.IOException
java.io.IOException@Nonnull
protected java.util.Collection<java.nio.file.Path> doDeleteAllCachedDependenciesIfRequired(@Nonnull
java.nio.file.Path root)
throws java.io.IOException
java.io.IOException@Nonnull
protected java.util.Collection<java.nio.file.Path> doDeleteUnknownDependencies(@Nonnull
java.nio.file.Path root,
@Nonnull
java.util.Set<java.lang.String> knownDependencyIds)
throws java.io.IOException
java.io.IOException@Nonnull
protected java.util.Collection<java.nio.file.Path> collectUnknownDependencyDirectories(@Nonnull
java.nio.file.Path root,
@Nonnull
java.util.Set<java.lang.String> knownDependencyIds)
@Nonnull protected java.util.Map<java.nio.file.Path,DependencyHandler.DependencyDirType> collectDirectoriesToKnownDependencyOf(@Nonnull java.nio.file.Path root, @Nonnull java.util.Set<java.lang.String> knownDependencyIds)
protected boolean isChildOfWithInfoFile(@Nonnull
java.nio.file.Path directory,
@Nonnull
java.nio.file.Path root,
@Nonnull
java.util.Map<java.nio.file.Path,DependencyHandler.DependencyDirType> directories)
protected boolean isKnownDependencyDirectory(@Nonnull
java.nio.file.Path directory,
@Nonnull
java.nio.file.Path root,
@Nonnull
java.util.Set<java.lang.String> knownDependencyIds)
throws java.io.IOException
java.io.IOException