@AutoFinal
@CompileStatic
class GrapeIvy
extends Object
implements GrapeEngine
Implementation supporting @Grape and @Grab annotations based on Ivy.
| Type | Name and description |
|---|---|
Set<String> |
downloadedArtifactsArtifact files downloaded during the last resolution. |
boolean |
enableGrapesEnables or disables grape resolution. |
Set<IvyGrabRecord> |
grabRecordsForCurrDependenciesStores the IvyGrabRecord(s) for all dependencies in each grab() call. |
Ivy |
ivyInstanceActive Ivy instance used for dependency resolution. |
Map<ClassLoader, Set<IvyGrabRecord>> |
loadedDepsDependencies loaded into each class loader. |
Set<String> |
resolvedDependenciesModule revisions resolved during the last resolution. |
IvySettings |
settingsIvy settings backing this engine. |
| Constructor and description |
|---|
GrapeIvy()Creates an Ivy-backed grape engine. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
addResolver(Map<String, Object> args)Adds a resolver to the front of the Ivy resolver chain. |
|
ClassLoader |
chooseClassLoader(Map args)Chooses the target class loader for a grab operation. |
|
IvyGrabRecord |
createGrabRecord(Map dep)Converts dependency coordinates into an Ivy grab record. |
|
Map<String, Map<String, List<String>>> |
enumerateGrapes()Enumerates cached grapes by group, module, and version. |
|
ResolveReport |
getDependencies(Map args, IvyGrabRecord[] grabRecords)Resolves the supplied grab records with Ivy. |
|
File |
getGrapeCacheDir()Returns the cache directory used for downloaded artifacts. |
|
File |
getGrapeDir()Returns the root directory used by grape. |
|
File |
getGroovyRoot()Returns the configured Groovy home directory for grape state. |
|
File |
getLocalGrapeConfig()Returns the local Ivy grape configuration file. |
|
Object |
grab(String endorsedModule)Grabs the endorsed module for the current Groovy version. |
|
Object |
grab(Map args)Grabs a dependency described by a single argument map. |
|
Object |
grab(Map args, Map[] dependencies)Grabs one or more dependencies and adds them to the target class loader. |
|
Map[] |
listDependencies(ClassLoader classLoader)Lists dependencies already loaded into the supplied class loader. |
|
IvyListener |
makeIvyListener(Closure c)Creates an Ivy listener from a progress closure. |
|
URI[] |
resolve(Map args, Map[] dependencies)Resolves dependencies using the implicit target class loader. |
|
URI[] |
resolve(Map args, List depsInfo, Map[] dependencies)Resolves dependencies and optionally collects dependency metadata. |
|
URI[] |
resolve(ClassLoader loader, Map args, Map[] dependencies)Resolves dependencies for an explicit class loader. |
|
URI[] |
resolve(ClassLoader loader, Map args, List depsInfo, Map[] dependencies)Resolves dependencies for an explicit class loader and optional metadata sink. |
|
void |
setLoggingLevel(int level)Sets the Ivy logging verbosity. |
|
void |
uninstallArtifact(String group, String module, String rev)Removes a cached artifact version from the grape cache. |
Enables or disables grape resolution.
Stores the IvyGrabRecord(s) for all dependencies in each grab() call.
Active Ivy instance used for dependency resolution.
Dependencies loaded into each class loader.
Ivy settings backing this engine.
Adds a resolver to the front of the Ivy resolver chain.
args - the resolver configurationChooses the target class loader for a grab operation.
args - grab argumentsConverts dependency coordinates into an Ivy grab record.
dep - the dependency mapEnumerates cached grapes by group, module, and version.
Resolves the supplied grab records with Ivy.
args - the resolution argumentsgrabRecords - the dependencies to resolveReturns the cache directory used for downloaded artifacts.
Returns the root directory used by grape.
Returns the configured Groovy home directory for grape state.
Returns the local Ivy grape configuration file.
Grabs the endorsed module for the current Groovy version.
endorsedModule - the endorsed module nameGrabs a dependency described by a single argument map.
args - the grab argumentsGrabs one or more dependencies and adds them to the target class loader.
args - the shared grab argumentsdependencies - the dependency descriptorsnull on success or the suppressed exceptionLists dependencies already loaded into the supplied class loader.
classLoader - the class loader to inspectCreates an Ivy listener from a progress closure.
c - the progress callbackResolves dependencies using the implicit target class loader.
args - the resolution argumentsdependencies - the dependencies to resolveResolves dependencies and optionally collects dependency metadata.
args - the resolution argumentsdepsInfo - the optional dependency metadata sinkdependencies - the dependencies to resolveResolves dependencies for an explicit class loader.
loader - the target class loaderargs - the resolution argumentsdependencies - the dependencies to resolveResolves dependencies for an explicit class loader and optional metadata sink.
loader - the target class loaderargs - the resolution argumentsdepsInfo - the optional dependency metadata sinkdependencies - the dependencies to resolveSets the Ivy logging verbosity.
level - the grape logging levelCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.