@groovy.transform.CompileStatic @groovy.util.logging.Slf4j class GemUtils extends Object
A collection of utilities to manipulate GEMs.
| Modifiers | Name | Description |
|---|---|---|
class |
GemUtils.1 |
|
static class |
GemUtils.GemsToProcess |
Contains which GEMs to unpack and which old GEMs to delete. |
static class |
GemUtils.JarsToProcess |
Information on which JAR-dependent GEMs need to be processed from a configuration. |
| Modifiers | Name | Description |
|---|---|---|
static String |
GEM_COMMAND |
|
static String |
JARS_LOCK |
|
static String |
JARS_REWRITE_SUBDIR |
|
static String |
JRUBY_COMPLETE_NAME |
|
static String |
JRUBY_MAINCLASS |
| Constructor and description |
|---|
GemUtils
() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static GemUtils.JarsToProcess |
findGemDependentJars(Configuration config)Extract JARs from a GEM configuration. |
|
static GemUtils.GemsToProcess |
findGemsToProcess(FileCollection gems, File destDir, GemOverwriteAction overwrite)Process a collection of GEMs and determine which to delete and which to unpack on the local filesystem. |
|
static File |
findJRubyJar(FileCollection fc, String version)Finds a JRuby Jar within a file collection |
|
static CopySpec |
gemCopySpec(java.util.Map properties, org.ysb33r.grolifant5.api.core.ConfigCacheSafeOperations ccso, Object dir)Adds a GEM CopySpec to an archive |
|
static CopySpec |
gemCopySpec(java.util.Map properties, org.ysb33r.grolifant5.api.core.ProjectOperations projectOperations, Object dir) |
|
static String |
gemFullNameFromFile(String filename)Take the given .gem filename (e.g. rake-10.3.2.gem) and just return the gem "full name" (e.g. rake-10.3.2) |
|
static FileCollection |
getGems(FileCollection fc)Given a FileCollection return a filtered FileCollection only containing GEMs |
|
static CopySpec |
jarCopySpec(org.ysb33r.grolifant5.api.core.ConfigCacheSafeOperations ccso, Object dir) |
|
static CopySpec |
jarCopySpec(org.ysb33r.grolifant5.api.core.ProjectOperations projectOperations, Object dir) |
|
static void |
rewriteJarDependencies(File jarsDir, GemUtils.JarsToProcess jarsToProcess, GemOverwriteAction overwrite)Rewrite the JAR dependencies |
|
static void |
writeJarsLock(File jarsLock, java.util.List<String> coordinates)Write a JARs lock file if the content has changed. |
Extract JARs from a GEM configuration.
config - GEM configuration.Process a collection of GEMs and determine which to delete and which to unpack on the local filesystem.
gems - GEM collection.destDir - GEM destination directory.overwrite - GEM overwrite mode.Finds a JRuby Jar within a file collection
fc - File collection to searchversion - Version of JRUBY_COMPLETE_NAME to search for.Adds a GEM CopySpec to an archive The following are supported as properties:
properties - Additional properties to control behaviourccso - Instance of org.ysb33r.grolifant5.api.core.ConfigCacheSafeOperations.dir - The source of the GEM filesTake the given .gem filename (e.g. rake-10.3.2.gem) and just return the gem "full name" (e.g. rake-10.3.2)
filename - GEM filename.Given a FileCollection return a filtered FileCollection only containing GEMs
fc - Original FileCollectionRewrite the JAR dependencies
jarsDir - Target directory for JARsjarsToProcess - JARs to processoverwrite - Overwrite action