Project related utility methods.
| Type | Name and description |
|---|---|
static java.io.File |
createReportDirectorySpec(org.gradle.api.Project pProject, java.lang.String pDirectoryItemName)Create a file specification for a file or directory within the project's main report directory. |
static java.io.File |
createTemporaryDirectorySpec(org.gradle.api.Project pProject, java.lang.String pDirectoryItemName)Create a file specification for a temporary directory. |
static boolean |
extractResource(java.lang.String pResource, java.io.File pFile)Extract a classpath resource to a file. |
static T |
getExtension(org.gradle.api.Project pProject, java.lang.String pName, java.lang.Class<T> pExtensionClass)Get an extension from a project. |
static org.gradle.api.internal.file.FileResolver |
getFileResolver(org.gradle.api.Project pProject)Get a project's file resolver. |
static org.gradle.api.tasks.SourceSet |
getSourceSet(org.gradle.api.Project pProject, java.lang.String pName)Get a source set from a project. |
static T |
getTask(org.gradle.api.Project pProject, java.lang.String pName, java.lang.Class<T> pTaskClass)Get a task from a project. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Create a file specification for a file or directory within the project's main report
directory. If the specified project has the reporting extension installed, that extension's
baseDir property is used as the main reporting directory, otherwise the project's
build directory is used as the main reporting directory.
pProject - The project to create the report directory spec for.pDirectoryItemName - If non-null, the name of the directory item (file or
subdirectory) within the project's main report directory to
create the file spec for. If null, the file spec for the main
report directory will be returned.Create a file specification for a temporary directory.
pProject - The project to create the temporary directory spec for.pDirectoryItemName - If non-null, the name of the directory item (file or
subdirectory) within the project's temporary directory to create
the file spec for. If null, the file spec for the project's
temporary directory itself will be returned. Extract a classpath resource to a file. The resource will be accessed through the class
loader of the Projects class.
pResource - The name of the resource.pFile - The file to extract the resource to.Get an extension from a project.
pProject - The project.pName - The name of the extension.pExtensionClass
- The extension's class (or a superclass of its class).Get a project's file resolver.
pProject - The project to get the file resolver from.Get a source set from a project.
pProject - The project.pName - The name of the source set.Get a task from a project.
pProject - The project.pName - The name of the task.pTaskClass - The task's class (or a superclass of its class).