A collection of utilities to manipulate GEMs
Modifiers | Name | Description |
---|---|---|
enum |
GemUtils.OverwriteAction |
Type | Name and description |
---|---|
static void |
extractGem(org.gradle.api.Project project, java.io.File jRubyClasspath, java.io.File gem, java.io.File destDir, OverwriteAction overwrite) Extracts a gem to a folder |
static void |
extractGems(org.gradle.api.Project project, java.io.File jRubyClasspath, org.gradle.api.file.FileCollection gems, java.io.File destDir, OverwriteAction overwrite) |
static void |
extractGems(org.gradle.api.Project project, org.gradle.api.artifacts.Configuration jRubyConfig, org.gradle.api.artifacts.Configuration gemConfig, java.io.File destDir, OverwriteAction action) Extract Gems from a given configuration. |
static org.gradle.api.file.CopySpec |
gemCopySpec(java.util.Map properties = [:], org.gradle.api.Project project, java.lang.Object dir) Adds a GEM CopySpec to an archive |
static java.lang.String |
gemFullNameFromFile(java.lang.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 org.gradle.api.file.FileCollection |
getGems(org.gradle.api.file.FileCollection fc) Given a FileCollection return a filtered FileCollection only containing GEMs |
static org.gradle.api.file.CopySpec |
jarCopySpec(org.gradle.api.Project project, java.lang.Object dir) // specifications/* if (! |
static void |
rewriteJarDependencies(java.io.File jarsDir, java.util.List<java.io.File> dependencies, java.util.Map<java.lang.String, java.lang.String> renameMap, OverwriteAction overwrite) |
static void |
setupJars(org.gradle.api.artifacts.Configuration config, java.io.File destDir, OverwriteAction overwrite) |
static void |
writeJarsLock(java.io.File jarsLock, java.util.List<java.lang.String> coordinates) |
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() |
Extracts a gem to a folder
project
- Project instancejRubyClasspath
- Where to find the jruby-complete jargem
- Gem file to extractdestDir
- Directory to extract tooverwrite
- Allow overwrite of an existing gem folderExtract Gems from a given configuration.
project
- Project instancejRubyClasspath
- Where to find the jruby-complete jargemConfig
- Configuration containing GEMsdestDir
- Directory to extract toaction
- Allow overwrite of an existing gem folderAdds a GEM CopySpec to an archive The following are supported as properties:
Additional
- properties to control behaviourdir
- 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)
Given a FileCollection return a filtered FileCollection only containing GEMs
fc
- Original FileCollection// specifications/* if (!fullGem) { exclude 'cache/**' exclude 'gems/