Class LocalDirectoryDependency
- java.lang.Object
-
- com.github.blindpirate.gogradle.core.dependency.AbstractGolangDependency
-
- com.github.blindpirate.gogradle.core.dependency.AbstractNotationDependency
-
- com.github.blindpirate.gogradle.core.dependency.LocalDirectoryDependency
-
- All Implemented Interfaces:
GolangDependency,NotationDependency,ResolvedDependency,GolangCloneable,java.io.Serializable,java.lang.Cloneable,org.gradle.api.artifacts.Dependency
- Direct Known Subclasses:
GogradleRootProject
public class LocalDirectoryDependency extends AbstractNotationDependency implements ResolvedDependency
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.blindpirate.gogradle.core.dependency.AbstractNotationDependency
AbstractNotationDependency.NoTransitivePredicate, AbstractNotationDependency.PropertiesExclusionPredicate
-
-
Field Summary
-
Fields inherited from class com.github.blindpirate.gogradle.core.dependency.AbstractNotationDependency
NO_TRANSITIVE_DEP_PREDICATE, transitiveDepExclusions, VERSION_KEY
-
Fields inherited from interface org.gradle.api.artifacts.Dependency
ARCHIVES_CONFIGURATION, CLASSIFIER, DEFAULT_CONFIGURATION
-
Fields inherited from interface com.github.blindpirate.gogradle.core.dependency.GolangDependency
ALL_DESCENDANTS, ONLY_CURRENT_FILES
-
-
Constructor Summary
Constructors Constructor Description LocalDirectoryDependency()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()protected ResolvedDependencydoResolve(ResolveContext context)booleanequals(java.lang.Object o)java.lang.StringformatVersion()Get the formatted version, typically for dependency tree display.static LocalDirectoryDependencyfromLocal(java.lang.String name, java.io.File rootDir)CacheScopegetCacheScope()Get cache scope of this dependency.GolangDependencySetgetDependencies()Get transitive dependencies of this package.java.io.FilegetRootDir()longgetUpdateTime()The update time of a dependency package.java.lang.StringgetVersion()An unique identifier to locate a dependency, e.g., git commit id.inthashCode()voidinstallTo(java.io.File targetDirectory)Install to a target directory.voidsetDependencies(GolangDependencySet dependencies)protected voidsetDir(java.io.File rootDir)voidsetDir(java.lang.String dir)java.util.Map<java.lang.String,java.lang.Object>toLockedNotation()Get a map notation of thisResolvedDependency.java.lang.StringtoString()-
Methods inherited from class com.github.blindpirate.gogradle.core.dependency.AbstractNotationDependency
exclude, getTransitiveDepExclusions, hasBeenResolved, resolve, setTransitive
-
Methods inherited from class com.github.blindpirate.gogradle.core.dependency.AbstractGolangDependency
because, containsAllSubpackages, contentEquals, copy, getGroup, getName, getPackage, getReason, getSubpackages, isFirstLevel, setFirstLevel, setName, setPackage, setSubpackage, setSubpackage, setSubpackages, setSubpackages
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.gradle.api.artifacts.Dependency
because, contentEquals, copy, getGroup, getReason
-
Methods inherited from interface com.github.blindpirate.gogradle.core.dependency.GolangDependency
getName, getPackage, getSubpackages, isFirstLevel, resolve
-
-
-
-
Method Detail
-
fromLocal
public static LocalDirectoryDependency fromLocal(java.lang.String name, java.io.File rootDir)
-
getRootDir
public java.io.File getRootDir()
-
setDir
public void setDir(java.lang.String dir)
-
setDir
protected void setDir(java.io.File rootDir)
-
getUpdateTime
public long getUpdateTime()
Description copied from interface:ResolvedDependencyThe update time of a dependency package. It will be used in resolving package conflict. Generally speaking, package with newest update time will win.- Specified by:
getUpdateTimein interfaceResolvedDependency- Returns:
- the update time determined by the package. It may be the last modified time of a file on filesystem or in scm.
-
setDependencies
public void setDependencies(GolangDependencySet dependencies)
-
getDependencies
public GolangDependencySet getDependencies()
Description copied from interface:ResolvedDependencyGet transitive dependencies of this package.- Specified by:
getDependenciesin interfaceResolvedDependency- Returns:
- the transitive dependencies
-
toLockedNotation
public java.util.Map<java.lang.String,java.lang.Object> toLockedNotation()
Description copied from interface:ResolvedDependencyGet a map notation of thisResolvedDependency.- Specified by:
toLockedNotationin interfaceResolvedDependency- Returns:
- the map notation
-
installTo
public void installTo(java.io.File targetDirectory)
Description copied from interface:ResolvedDependencyInstall to a target directory.- Specified by:
installToin interfaceResolvedDependency- Parameters:
targetDirectory- the directory
-
formatVersion
public java.lang.String formatVersion()
Description copied from interface:ResolvedDependencyGet the formatted version, typically for dependency tree display.- Specified by:
formatVersionin interfaceResolvedDependency- Returns:
- the formatted version
-
getVersion
public java.lang.String getVersion()
Description copied from interface:GolangDependencyAn unique identifier to locate a dependency, e.g., git commit id.- Specified by:
getVersionin interfaceorg.gradle.api.artifacts.Dependency- Specified by:
getVersionin interfaceGolangDependency- Overrides:
getVersionin classAbstractGolangDependency- Returns:
- the version string
-
toString
public java.lang.String toString()
- Overrides:
toStringin classAbstractGolangDependency
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classAbstractNotationDependency
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractNotationDependency
-
getCacheScope
public CacheScope getCacheScope()
Description copied from interface:GolangDependencyGet cache scope of this dependency.- Specified by:
getCacheScopein interfaceGolangDependency- Returns:
- the cache scope
-
doResolve
protected ResolvedDependency doResolve(ResolveContext context)
- Specified by:
doResolvein classAbstractNotationDependency
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceGolangCloneable- Overrides:
clonein classAbstractNotationDependency
-
-