Utility class to apply certain gradlesque Rust conventions.
Type | Name and description |
---|---|
static java.util.Map<java.lang.String, java.lang.String> |
CARGO_SOURCE_LAYOUT Directory structure for Cargo conventions. |
static java.util.Map<java.lang.String, java.lang.String> |
GRADLE_SOURCE_LAYOUT Directory structure for Gradle conventions. |
Type Params | Return Type | Name and description |
---|---|---|
|
static void |
applySourceCopyConventions(org.gradle.api.tasks.Copy task) Apply standard source layout conventions to the task that will prepare a Rust source directory. |
|
static org.gradle.api.Task |
createManifestTask(org.gradle.api.Project project, java.lang.String name, java.lang.String relativeDir, java.lang.String sourceSetName) Creates a task that will generate a Cargo manifest file. |
|
static org.gradle.api.tasks.Copy |
createSourceCopyTask(org.gradle.api.Project project, java.lang.String name, java.lang.String relativeDir) Creates a task that will copy Rust source code to a place where it can be dealt with by Cargo layout. |
|
static java.lang.String |
getAppRunnerTaskName(java.lang.String base = null ) Returns the name of the task that will run a compiled Rust application. |
|
static java.util.Map<java.lang.String, java.lang.String> |
getCompileTaskNames(java.lang.String base = null) Returns a map of compilation task names as related to various phases of the Rust development cycle. |
|
static java.util.Map<java.lang.String, java.lang.String> |
getTestTaskNames(java.lang.String base = null ) Returns a map of test task names as related to the test and benchmark parts of the Rust development cycle. |
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() |
Directory structure for Cargo conventions.
Directory structure for Gradle conventions.
Apply standard source layout conventions to the task that will prepare a Rust source directory.
Assumes src/(main|test\benches)/rust
layout as the input.
task
- Task that will copy Rust source codeCreates a task that will generate a Cargo manifest file.
project
- Project the task will be attached to.name
- Name of taskrelativeDir
- Directory relative to build directory where temporary Rust manifests will be placed.sourceSetName
- Name of Rust sourceset for which manifest is being createdCreates a task that will copy Rust source code to a place where it can be dealt with by Cargo layout.
project
- Project the task will be attached to.name
- Name of taskrelativeDir
- Directory relative to build directory where Rust source code will be placed.Copy
taskReturns the name of the task that will run a compiled Rust application.
base
- Basename for a Rust sourceset. Defaults to null
for the standard
Rust sourceset.Returns a map of compilation task names as related to various phases of the Rust development cycle.
base
- Basename for a Rust sourceset. Defaults to null
for the standard
Rust sourceset.exe
, lib
, test
& bench
keys.Returns a map of test task names as related to the test and benchmark parts of the Rust development cycle.
base
- Basename for a Rust sourceset. Defaults to null
for the standard
Rust sourceset.test
& bench
keys/