public final class TagLibraryIndexGenerator extends java.lang.Object
Writes the tag library index for a source set.
Sources are parsed to the point where the syntax tree is complete and no further, so a tag library is never loaded or executed to find out what it declares. Reading the tree rather than the text means the answer follows Groovy's own understanding of the source.
The index is rewritten in full each time rather than added to. A tag library that has been renamed or deleted therefore disappears from it, where an index accumulated as each class compiled would keep describing tags that no longer exist until the build directory was cleaned.
Invoked in a forked process by the build, with the source set's own compile classpath, because the rules it applies belong to the framework rather than to the build tooling.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static void |
generate(java.io.File sourceDir, java.io.File outputDir, boolean parameterNamesRetained, java.lang.String encoding)Regenerates the index describing every tag library under a source directory. |
|
public static void |
generate(java.util.List<java.io.File> sourceDirs, java.io.File outputDir, boolean parameterNamesRetained, java.lang.String encoding)Regenerates the index, resolving a type this project declares from its source. |
|
public static void |
generate(java.util.List<java.io.File> sourceDirs, java.util.List<java.io.File> resolutionRoots, java.io.File outputDir, boolean parameterNamesRetained, java.lang.String encoding)Regenerates the index describing every tag library under any of several source directories. |
|
public static void |
main(java.lang.String[] args)
|
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Regenerates the index describing every tag library under a source directory.
sourceDir - the directory to scan for tag librariesoutputDir - the directory the index is written beneathparameterNamesRetained - whether the compilation writes parameter names into class filesencoding - the source encodingRegenerates the index, resolving a type this project declares from its source.
sourceDirs - the directories to scan for tag librariesoutputDir - the directory the index is written beneathparameterNamesRetained - whether the compilation writes parameter names into class filesencoding - the source encodingRegenerates the index describing every tag library under any of several source directories.
All of them are described in one pass. Describing them one at a time would mean either erasing the previous directory's descriptors or leaving behind descriptors for tag libraries that have since been renamed or deleted.
sourceDirs - the directories to scan for tag librariesresolutionRoots - the source roots a type this project declares may be resolved from, so
that a base class, trait or parameter type it supplies is read rather than guessedoutputDir - the directory the index is written beneathparameterNamesRetained - whether the compilation writes parameter names into class filesencoding - the source encoding
args - the output directory, whether parameter names are retained, the source encoding, how
many source directories follow, those directories, and then the source roots a type this
project declares may be resolved from