Path utilities.
| Type Params | Return Type | Name and description |
|---|---|---|
|
static java.lang.String |
extractJavaClass(java.util.Collection<java.io.File> roots, java.io.File file)Resolves class name from source file. |
|
static java.io.File |
findConfigurationJar(org.gradle.api.Project project, java.lang.String configurationName, java.lang.String jarIdentity)Finds exact jar in gradle configuration. |
|
static org.gradle.api.tasks.SourceSet |
findMatchingSet(java.lang.String baseName, java.lang.String taskName, java.util.Collection<org.gradle.api.tasks.SourceSet> sets)Searches for source set current task belongs to using task name build convention. |
<T> |
static T |
loadFileFromJar(java.io.File jar, java.lang.String filePath, groovy.lang.Closure<T> action)Loads file from provided jar file (found with findConfigurationJar(org.gradle.api.Project, java.lang.String, java.lang.String)). |
|
static java.util.Set<java.io.File> |
resolveIgnoredFiles(org.gradle.api.file.FileTree files, java.util.Collection<java.lang.String> excludes)Resolves excluded files of file set. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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() |
Resolves class name from source file.
roots - source directoriesfile - java source fileFinds exact jar in gradle configuration.
project - project to look configurations inconfigurationName - configuration namejarIdentity - part of jar name to identify itSearches for source set current task belongs to using task name build convention.
baseName - base name for task grouptaskName - full task namesets - source sets to search inLoads file from provided jar file (found with findConfigurationJar(org.gradle.api.Project, java.lang.String, java.lang.String)).
Action closure receives input stream (and so could load file contents and handle it). Opened input stream is always closed after closure execution.
jar - jar file to search infilePath - file path inside jaraction - closure to handle file contentsResolves excluded files of file set.
files - files collectionexcludes - exclude patterns