@java.lang.SuppressWarnings('UnusedMethodParameter') class JRubyDirInfoTransformer extends java.lang.Object
JRubyDirInfoTransformer implements a com.github.jengelman.gradle.plugins.shadow.transformers.Transformer interface. This is internal primarily because it rewrequires an interaction with the transformer interface inside of the shadow plugin, which will hopefully go away at some point in the future
Modifiers | Name | Description |
---|---|---|
protected JRubyDirInfo |
info |
|
protected java.io.File |
tmpDir |
Constructor and description |
---|
JRubyDirInfoTransformer
() |
Type | Name and description |
---|---|
boolean |
canTransformResource(org.gradle.api.file.FileTreeElement element) Register the relative path of the element that will be jarred. |
protected void |
deleteTempDirectory(java.io.File directory) Recursively delete the given java.io.File |
boolean |
hasTransformedResource() Confirm that we've done some work so our modifyOutputStream is called |
void |
modifyOutputStream(org.apache.tools.zip.ZipOutputStream os) Process the output stream and add our .jrubydir entries. |
protected void |
processDirectory(org.apache.tools.zip.ZipOutputStream stream, java.io.File directory) Process the directory given and ensure that all our .jrubydir files are added. |
void |
transform(java.lang.String path, java.io.InputStream is, java.util.List<com.github.jengelman.gradle.plugins.shadow.relocation.Relocator> relocators) No-op since we don't transform the actual file |
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() |
Register the relative path of the element
that will be jarred.
Since this transformer is just performing book-keeping, it returns false
to avoid telling the machinery in shadow to transform the actual file
being visited and jarred up
Recursively delete the given java.io.File
Confirm that we've done some work so our modifyOutputStream
is called
Process the output stream and add our .jrubydir entries. This method will also clean up our tempdir to make sure we don't clutter the user's machine with junk
Process the directory given and ensure that all our .jrubydir files are added.
stream
- org.apache.tools.zip.ZipOutputStream for our archive being builtdirectory
- Directory which contains our .jrubydir files to be
copiedNo-op since we don't transform the actual file