This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Gradle.
Summary
Provides a wrapper around Gradle functionality within a Cake build script.
- Assembly
- Cake
.Gradle .dll - Namespace
- Cake
.Gradle - Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type["GradleRunnerAlias"]
class Type type-node
Syntax
public static class GradleRunnerAlias
Examples
Run 'gradle --version'.
Cake task:
Task("Gradle-Version")
.Does(() =>
{
Gradle.WithArguments("--version").Run();
});
Run 'gradle hello' in a specific folder.
Note: if you have a gradle wrapper setup in the specified path, this one will be used.
Cake task:
Task("Gradle-Hello")
.Does(() =>
{
Gradle.FromPath("./example").WithTask("hello").Run();
});
Run 'gradle hello' in a specific folder with default log level.
Note: if no log level is set, it is derived from the Cake verbosity (which is set to 'verbose' in build.ps1).
Cake task:
Task("Gradle-Hello-WithDefaultLogLevel")
.Does(() =>
{
Gradle.FromPath("./example").WithTask("hello").WithLogLevel(GradleLogLevel.Default).Run();
});
Run 'gradle --offline --build-file build.gradle hello' in a specific folder.
Cake task:
Task("Gradle-Hello-WithArguments")
.Does(() =>
{
Gradle.FromPath("./example").WithTask("hello").WithArguments("--offline --build-file build.gradle").Run();
});
Attributes
Type | Description |
---|---|
Cake |
Methods
Name | Value | Summary |
---|---|---|
Gradle |
GradleRunner |
Get a Gradle runner.
static
|
Extension Methods
Name | Value | Summary |
---|---|---|
ToDictionary |
IDictionary |
From ObjectHelpers
Requires the Cake.DeployParams addin
|
To |
string |
From StringExtensions
Requires the Cake.Issues addin
|