@groovy.transform.CompileStatic class DependencyHandler extends java.lang.Object
Implementation of a RustDependencyHandler.
Type | Name and description |
---|---|
static java.lang.String |
CRATES_IO_NAME Way of referring to crates.io inside of Cargo.toml . |
Constructor and description |
---|
DependencyHandler
(org.gradle.api.Project project) Create a Rust dependency handler. |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
build(java.lang.String dep, java.lang.String... more) Adds a build dependency in the format 'name:version '. |
|
void |
build(groovy.lang.Closure depSpec) Adds a dev dependency using a configurating closure. |
|
void |
build(org.gradle.api.Action<RustConfigurableDependency> configurator) |
|
void |
call(groovy.lang.Closure cfg) |
|
void |
compile(java.lang.String dep, java.lang.String... more) Adds a dependency in the format ' name:version '. |
|
void |
compile(groovy.lang.Closure depSpec) Adds a dependency using a configurating closure. |
|
void |
compile(org.gradle.api.Action<RustConfigurableDependency> configurator) |
|
void |
configure(groovy.lang.Closure cfg) |
|
void |
configure(org.gradle.api.Action<RustDependencyHandler> cfg) |
|
RustDependencyConfiguration |
getBuild() Return the Rust build dependencies configuration. |
|
RustDependencyConfiguration |
getCompile() Return the Rust dependencies configuration. |
|
java.lang.Iterable<PatchDependency> |
getPatches() Returns the container with all local patches. |
|
java.util.Map<java.lang.String, java.lang.Iterable<ConfigurableDependency>> |
getPatchesAsMap() Map the local patches on a per repository-basis |
|
RustDependencyConfiguration |
getTest() Return the Rust dev dependencies configuration. |
|
void |
patch(java.lang.String name, java.lang.String path) Add a path to a patched dependency. |
|
void |
patch(java.net.URI repoURI, java.lang.String name, java.lang.String path) Add a path to a patched dependency. |
|
void |
patch(groovy.lang.Closure cfg) Add a patched dependency via a configuration closure for a crates.io based crate. |
|
void |
patch(java.net.URI repoURI, groovy.lang.Closure cfg) Add a patched dependency via a configuration closure for a repository that is not crates.io |
|
void |
patch(org.gradle.api.Action<RustConfigurableDependency> cfg) Add a patched dependency via a configurating action for a crates.io based crate. |
|
void |
patch(java.net.URI repoURI, org.gradle.api.Action<RustConfigurableDependency> cfg) Add a patched dependency via a configurating action for a repository that is not crates.io . |
|
void |
test(java.lang.String dep, java.lang.String... more) Adds a dev dependency in the format 'name:version '. |
|
void |
test(groovy.lang.Closure depSpec) Adds a dev dependency using a configurating closure. |
|
void |
test(org.gradle.api.Action<RustConfigurableDependency> configurator) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Way of referring to crates.io
inside of Cargo.toml
.
Create a Rust dependency handler.
project
- Project this Rust dependency handler is attached to. Adds a build
dependency in the format 'name:version
'.
dep
- Dependencymore
- Additional dependencies Adds a dev
dependency using a configurating closure.
test {
name 'winhttp'
version '1.2.3'
git( 'http://github.com/foo/bar' )
git( 'http://github.com/foo/bar', 'my-branch')
path( 'some/path' )
}
Adds a dependency in the format 'name:version
'.
dep
- Dependencymore
- Additional dependencies Adds a dependency using a configurating closure.
compile {
name 'winhttp'
version '1.2.3'
git( 'http://github.com/foo/bar' )
git( 'http://github.com/foo/bar', 'my-branch')
path( 'some/path' )
}
Return the Rust build dependencies configuration.
Return the Rust dependencies configuration.
Returns the container with all local patches.
In Rust terms this is the patch.crates-io
section.
Map the local patches on a per repository-basis
Return the Rust dev dependencies configuration.
Add a path to a patched dependency.
name
- Name of dependencypath
- Local path to dependencyAdd a path to a patched dependency.
repoURI
- URI that is used for cratesname
- Name of dependencypath
- A relative path Add a patched dependency via a configuration closure for a crates.io
based crate.
cfg
- Configurating closure Add a patched dependency via a configuration closure for a repository that is
not crates.io
repoURI
- Repository URIcfg
- Configurating closure Add a patched dependency via a configurating action for a crates.io
based crate.
cfg
- Configurating action. Add a patched dependency via a configurating action for a repository that is not crates.io
.
repoURI
- Repository URI.cfg
- Configurating action. Adds a dev
dependency in the format 'name:version
'.
dep
- Dependencymore
- Additional dependencies Adds a dev
dependency using a configurating closure.
test {
name 'winhttp'
version '1.2.3'
git( 'http://github.com/foo/bar' )
git( 'http://github.com/foo/bar', 'my-branch')
path( 'some/path' )
}
Groovy Documentation