Package groovy.grape
Interface GrapeEngine
public interface GrapeEngine
Contract for Grape dependency resolution engines.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringArgument key for the caller depth.static final intDefault caller depth used by the static facade. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddResolver(Map<String, Object> args) Adds a resolver to this engine.Enumerates locally available grapes.Grabs a dependency expressed using the endorsed module shorthand.Grabs a single dependency.Grabs one or more dependencies using the supplied arguments.Map[]listDependencies(ClassLoader classLoader) Lists dependencies associated with the supplied class loader.URI[]Resolves dependency coordinates to artifact URIs while optionally collecting dependency information.URI[]Resolves dependency coordinates to artifact URIs.default voidsetLoggingLevel(int level) Sets the logging level for the grape engine.
-
Field Details
-
CALLEE_DEPTH
Argument key for the caller depth.- See Also:
-
DEFAULT_CALLEE_DEPTH
static final int DEFAULT_CALLEE_DEPTHDefault caller depth used by the static facade.- See Also:
-
-
Method Details
-
grab
Grabs a dependency expressed using the endorsed module shorthand.- Parameters:
endorsedModule- the endorsed module notation- Returns:
- an engine-specific result
-
grab
Grabs a single dependency.- Parameters:
args- the dependency descriptor- Returns:
- an engine-specific result
-
grab
Grabs one or more dependencies using the supplied arguments.- Parameters:
args- grab argumentsdependencies- dependency descriptors- Returns:
- an engine-specific result
-
enumerateGrapes
Enumerates locally available grapes.- Returns:
- grapes grouped by organization and module
-
resolve
Resolves dependency coordinates to artifact URIs.- Parameters:
args- resolve argumentsdependencies- dependency descriptors- Returns:
- the resolved artifact URIs
-
resolve
Resolves dependency coordinates to artifact URIs while optionally collecting dependency information.- Parameters:
args- resolve argumentsdepsInfo- optional dependency metadata sinkdependencies- dependency descriptors- Returns:
- the resolved artifact URIs
-
listDependencies
Lists dependencies associated with the supplied class loader.- Parameters:
classLoader- the class loader to inspect- Returns:
- the dependency descriptors
-
addResolver
Adds a resolver to this engine.- Parameters:
args- the resolver descriptor
-
setLoggingLevel
default void setLoggingLevel(int level) Sets the logging level for the grape engine.- Parameters:
level- the logging level (0=quiet/errors only, 1=warn, 2=info, 3=verbose, 4=debug)- Since:
- 6.0.0
-