@CompileStatic interface DependencyManagement
Type Params | Return Type | Name and description |
---|---|---|
|
abstract Dependency |
dependency(Dependency dependency) |
|
abstract Dependency |
dependency(String gavNotation) Defines a dependency. |
|
abstract Dependency |
dependency(String name, String gavNotation) Defines a dependency. |
|
abstract Dependency |
dependency(String name, String gavNotation, Action<? super DependencySpec> action) Defines and configures a dependency. |
|
abstract Dependency |
dependency(String name, String gavNotation, Closure<Void> action) Defines and configures a dependency. |
|
abstract Dependency |
dependency(String gavNotation, Action<? super DependencySpec> action) Defines and configures a dependency by gavNotation. |
|
abstract Dependency |
dependency(String gavNotation, Closure<Void> action) Defines and configures a dependency by gavNotation. |
|
abstract Dependency |
findDependency(String nameOrGa) Retrieves a declared dependency by name. |
|
abstract Dependency |
findDependencyByGA(String groupId, String artifactId) Retrieves a declared dependency by grouId and artifactId. |
|
abstract Dependency |
findDependencyByName(String name) Retrieves a declared dependency by name. |
|
abstract Platform |
findPlatform(String nameOrGa) Retrieves a declared platform by name. |
|
abstract Platform |
findPlatformByGA(String groupId, String artifactId) Retrieves a declared platform by grouId and artifactId. |
|
abstract Platform |
findPlatformByName(String name) Retrieves a declared platform by name. |
|
abstract String |
ga(String nameOrGa, String moduleName) Formats the named module dependency in groupId:artifactId notation. |
|
abstract String |
gav(String nameOrGa) Formats the named dependency in groupId:artifactId:version notation. |
|
abstract String |
gav(String nameOrGa, String moduleName) Formats the named module dependency in groupId:artifactId:version notation. |
|
abstract Map<String, Dependency> |
getDependencies() A view of all registered dependencies and platforms, keyed by logical name. |
|
abstract Dependency |
getDependency(String nameOrGa) Retrieves a declared dependency by name. |
|
abstract Platform |
getPlatform(String nameOrGa) Retrieves a declared platform by name. |
|
abstract Platform |
platform(String gavNotation) Defines a platform dependency. |
|
abstract Platform |
platform(String name, String gavNotation) Defines a platform dependency. |
|
abstract Platform |
platform(String name, String gavNotation, Action<? super PlatformSpec> action) Defines and configures a platform dependency. |
|
abstract Platform |
platform(String name, String gavNotation, Closure<Void> action) Defines and configures a platform dependency. |
|
abstract void |
resolve() |
|
abstract Map<String, Collection<Object>> |
toMap() |
Defines a dependency.
Dependency name will be equal to parsedartifactId
.
Example:
dependency('com.googlecode.guava:guava:29.0-jre')
gavNotation
- must be in the groupId:artifactId:version
notationDefines a dependency.
Example:dependency('guava', 'com.googlecode.guava:guava:29.0-jre')
name
- the logical name of the dependencygavNotation
- must be in the groupId:artifactId:version
notationDefines and configures a dependency.
Example:dependency('groovy', 'org.codehaus.groovy:groovy:3.0.6') {* modules = [ 'groovy-test', 'groovy-json', 'groovy-xml' ] }*
name
- the logical name of the dependencygavNotation
- must be in the groupId:artifactId:version
notationDefines and configures a dependency.
Example:dependency('groovy', 'org.codehaus.groovy:groovy:3.0.6') {* modules = [ 'groovy-test', 'groovy-json', 'groovy-xml' ] }*
name
- the logical name of the dependencygavNotation
- must be in the groupId:artifactId:version
notationDefines and configures a dependency by gavNotation.
Example:dependency('org.codehaus.groovy:groovy:3.0.6') {* modules = [ 'groovy-test', 'groovy-json', 'groovy-xml' ] }*
gavNotation
- must be in the groupId:artifactId:version
notationDefines and configures a dependency by gavNotation.
Example:dependency('org.codehaus.groovy:groovy:3.0.6') {* modules = [ 'groovy-test', 'groovy-json', 'groovy-xml' ] }*
gavNotation
- must be in the groupId:artifactId:version
notationRetrieves a declared dependency by name.
nameOrGa
- the logical name or the groupId:artifactId
of the dependency to findorg.kordamp.gradle.plugin.base.model.artifact.Dependency
instance when found or null
.Retrieves a declared dependency by grouId and artifactId.
groupId
- the groupId of the dependency to findartifactId
- the artifactId of the dependency to findorg.kordamp.gradle.plugin.base.model.artifact.Dependency
instance when found, null
otherwise.Retrieves a declared dependency by name.
name
- the logical name of the dependency to findorg.kordamp.gradle.plugin.base.model.artifact.Dependency
instance when found, null
otherwise.Retrieves a declared platform by name.
nameOrGa
- the logical name or the groupId:artifactId
of the platform to findorg.kordamp.gradle.plugin.base.model.artifact.Platform
instance when found or {@code null.Retrieves a declared platform by grouId and artifactId.
groupId
- the groupId of the platform to findartifactId
- the artifactId of the platform to findorg.kordamp.gradle.plugin.base.model.artifact.Platform
instance when found, null
otherwise.Retrieves a declared platform by name.
name
- the logical name of the platform to findorg.kordamp.gradle.plugin.base.model.artifact.Platform
instance when found, null
otherwise. Formats the named module dependency in groupId:artifactId
notation.
nameOrGa
- the logical name or the groupId:artifactId
of the dependency to findmoduleName
- the name of the module to find. Formats the named dependency in groupId:artifactId:version
notation.
nameOrGa
- the logical name or the groupId:artifactId
of the dependency to find Formats the named module dependency in groupId:artifactId:version
notation.
nameOrGa
- the logical name or the groupId:artifactId
of the dependency to findmoduleName
- the name of the module to find.A view of all registered dependencies and platforms, keyed by logical name. The returned view is unmodifiable.
Retrieves a declared dependency by name.
nameOrGa
- the logical name or the groupId:artifactId
of the dependency to findorg.kordamp.gradle.plugin.base.model.artifact.Dependency
instance when found.Retrieves a declared platform by name.
nameOrGa
- the logical name or the groupId:artifactId
of the platform to findorg.kordamp.gradle.plugin.base.model.artifact.Platform
instance when found.Defines a platform dependency.
Dependency name will be equal to parsedartifactId
.
Example:
platform('io.micronaut:micronaut-bom:2.0.2')
gavNotation
- must be in the groupId:artifactId:version
notationDefines a platform dependency.
Example:platform('micronaut', 'io.micronaut:micronaut-bom:2.0.2')
name
- the logical name of the dependencygavNotation
- must be in the groupId:artifactId:version
notationDefines and configures a platform dependency.
Example:platform('micronaut', 'io.micronaut:micronaut-bom:2.0.2') {* modules = [ 'micronaut-core', 'micronaut-inject', 'micronaut-validation' ] }*
name
- the logical name of the dependencygavNotation
- must be in the groupId:artifactId:version
notationDefines and configures a platform dependency.
Example:platform('micronaut', 'io.micronaut:micronaut-bom:2.0.2') {* modules = [ 'micronaut-core', 'micronaut-inject', 'micronaut-validation' ] }*
name
- the logical name of the dependencygavNotation
- must be in the groupId:artifactId:version
notation