class JRubyExec extends org.gradle.api.tasks.JavaExec
Runs a ruby script using JRuby
Fields inherited from class | Fields |
---|---|
class org.gradle.api.tasks.JavaExec |
TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION |
class org.gradle.api.internal.ConventionTask |
TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION |
Constructor and description |
---|
JRubyExec
() |
Type | Name and description |
---|---|
org.gradle.api.tasks.JavaExec |
args(java.lang.Object... args) |
org.gradle.process.JavaExecSpec |
args(java.lang.Iterable<?> args) |
void |
exec() |
java.util.List<java.lang.String> |
getArgs() getArgs gets overridden in order to add JRuby options, script name and script arguments in the correct order. |
java.util.List<java.lang.String> |
getJrubyArgs() Returns a list of jruby arguments |
java.lang.String |
getJrubyVersion() If it is required that a JRubyExec task needs to be executed with a different version of JRuby that the globally configured one, it can be done by setting it here. |
java.io.File |
getScript() Script to execute. |
java.util.List<java.lang.Object> |
getScriptArgs() Returns a list of script arguments |
static java.lang.String |
jarDependenciesGemLibPath(java.io.File gemDir) |
void |
jrubyVersion(java.lang.String ver) Setting the jruby-complete version allows for tasks to be run using different versions of JRuby.
|
org.gradle.api.tasks.JavaExec |
setArgs(java.lang.Iterable<?> applicationArgs) |
void |
setJrubyVersion(java.lang.String version) Setting the jruby-complete version allows for tasks to be run using different versions of JRuby.
|
org.gradle.api.tasks.JavaExec |
setMain(java.lang.String mainClassName) |
static void |
updateJRubyDependencies(org.gradle.api.Project project) Ensure that our JRuby depedencies are updated properly for the default jrubyExec configuration and all other JRubyExec tasks |
void |
validateTaskConfiguration() Verify that we are in a good configuration for execution |
Methods inherited from class | Name |
---|---|
class org.gradle.api.tasks.JavaExec |
org.gradle.api.tasks.JavaExec#workingDir(java.lang.Object), org.gradle.api.tasks.JavaExec#workingDir(java.lang.Object), org.gradle.api.tasks.JavaExec#setSystemProperties(java.util.Map), org.gradle.api.tasks.JavaExec#getDefaultCharacterEncoding(), org.gradle.api.tasks.JavaExec#getMain(), org.gradle.api.tasks.JavaExec#setDefaultCharacterEncoding(java.lang.String), org.gradle.api.tasks.JavaExec#getMinHeapSize(), org.gradle.api.tasks.JavaExec#setMinHeapSize(java.lang.String), org.gradle.api.tasks.JavaExec#getMaxHeapSize(), org.gradle.api.tasks.JavaExec#setMain(java.lang.String), org.gradle.api.tasks.JavaExec#setMain(java.lang.String), org.gradle.api.tasks.JavaExec#setArgs(java.lang.Iterable), org.gradle.api.tasks.JavaExec#setArgs(java.lang.Iterable), org.gradle.api.tasks.JavaExec#setClasspath(org.gradle.api.file.FileCollection), org.gradle.api.tasks.JavaExec#setClasspath(org.gradle.api.file.FileCollection), org.gradle.api.tasks.JavaExec#systemProperty(java.lang.String, java.lang.Object), org.gradle.api.tasks.JavaExec#systemProperty(java.lang.String, java.lang.Object), org.gradle.api.tasks.JavaExec#setMaxHeapSize(java.lang.String), org.gradle.api.tasks.JavaExec#getJvmArgs(), org.gradle.api.tasks.JavaExec#setJvmArgs(java.lang.Iterable), org.gradle.api.tasks.JavaExec#jvmArgs(java.lang.Iterable), org.gradle.api.tasks.JavaExec#jvmArgs([Ljava.lang.Object;), org.gradle.api.tasks.JavaExec#jvmArgs([Ljava.lang.Object;), org.gradle.api.tasks.JavaExec#jvmArgs(java.lang.Iterable), org.gradle.api.tasks.JavaExec#getBootstrapClasspath(), org.gradle.api.tasks.JavaExec#setBootstrapClasspath(org.gradle.api.file.FileCollection), org.gradle.api.tasks.JavaExec#bootstrapClasspath([Ljava.lang.Object;), org.gradle.api.tasks.JavaExec#bootstrapClasspath([Ljava.lang.Object;), org.gradle.api.tasks.JavaExec#getEnableAssertions(), org.gradle.api.tasks.JavaExec#setEnableAssertions(boolean), org.gradle.api.tasks.JavaExec#setDebug(boolean), org.gradle.api.tasks.JavaExec#getAllJvmArgs(), org.gradle.api.tasks.JavaExec#setAllJvmArgs(java.lang.Iterable), org.gradle.api.tasks.JavaExec#setStandardInput(java.io.InputStream), org.gradle.api.tasks.JavaExec#setStandardInput(java.io.InputStream), org.gradle.api.tasks.JavaExec#getStandardInput(), org.gradle.api.tasks.JavaExec#getWorkingDir(), org.gradle.api.tasks.JavaExec#setIgnoreExitValue(boolean), org.gradle.api.tasks.JavaExec#setIgnoreExitValue(boolean), org.gradle.api.tasks.JavaExec#isIgnoreExitValue(), org.gradle.api.tasks.JavaExec#setStandardOutput(java.io.OutputStream), org.gradle.api.tasks.JavaExec#setStandardOutput(java.io.OutputStream), org.gradle.api.tasks.JavaExec#getStandardOutput(), org.gradle.api.tasks.JavaExec#getErrorOutput(), org.gradle.api.tasks.JavaExec#getCommandLine(), org.gradle.api.tasks.JavaExec#setWorkingDir(java.lang.Object), org.gradle.api.tasks.JavaExec#getEnvironment(), org.gradle.api.tasks.JavaExec#setEnvironment(java.util.Map), org.gradle.api.tasks.JavaExec#setErrorOutput(java.io.OutputStream), org.gradle.api.tasks.JavaExec#setErrorOutput(java.io.OutputStream), org.gradle.api.tasks.JavaExec#getSystemProperties(), org.gradle.api.tasks.JavaExec#systemProperties(java.util.Map), org.gradle.api.tasks.JavaExec#systemProperties(java.util.Map), org.gradle.api.tasks.JavaExec#getClasspath(), org.gradle.api.tasks.JavaExec#classpath([Ljava.lang.Object;), org.gradle.api.tasks.JavaExec#classpath([Ljava.lang.Object;), org.gradle.api.tasks.JavaExec#getExecutable(), org.gradle.api.tasks.JavaExec#getArgs(), org.gradle.api.tasks.JavaExec#copyTo(org.gradle.process.JavaForkOptions), org.gradle.api.tasks.JavaExec#copyTo(org.gradle.process.ProcessForkOptions), org.gradle.api.tasks.JavaExec#copyTo(org.gradle.process.JavaForkOptions), org.gradle.api.tasks.JavaExec#copyTo(org.gradle.process.ProcessForkOptions), org.gradle.api.tasks.JavaExec#executable(java.lang.Object), org.gradle.api.tasks.JavaExec#executable(java.lang.Object), org.gradle.api.tasks.JavaExec#getDebug(), org.gradle.api.tasks.JavaExec#setExecutable(java.lang.Object), org.gradle.api.tasks.JavaExec#exec(), org.gradle.api.tasks.JavaExec#environment(java.util.Map), org.gradle.api.tasks.JavaExec#environment(java.lang.String, java.lang.Object), org.gradle.api.tasks.JavaExec#environment(java.util.Map), org.gradle.api.tasks.JavaExec#environment(java.lang.String, java.lang.Object), org.gradle.api.tasks.JavaExec#args([Ljava.lang.Object;), org.gradle.api.tasks.JavaExec#args([Ljava.lang.Object;), org.gradle.api.tasks.JavaExec#args(java.lang.Iterable), org.gradle.api.tasks.JavaExec#getConventionMapping(), org.gradle.api.tasks.JavaExec#conventionMapping(java.lang.String, groovy.lang.Closure), org.gradle.api.tasks.JavaExec#conventionMapping(java.lang.String, java.util.concurrent.Callable), org.gradle.api.tasks.JavaExec#getStandardOutputCapture(), org.gradle.api.tasks.JavaExec#getAsDynamicObject(), org.gradle.api.tasks.JavaExec#setActions(java.util.List), org.gradle.api.tasks.JavaExec#getTaskDependencies(), org.gradle.api.tasks.JavaExec#getTaskDependencies(), org.gradle.api.tasks.JavaExec#getDependsOn(), org.gradle.api.tasks.JavaExec#setDependsOn(java.lang.Iterable), org.gradle.api.tasks.JavaExec#dependsOn([Ljava.lang.Object;), org.gradle.api.tasks.JavaExec#onlyIf(org.gradle.api.specs.Spec), org.gradle.api.tasks.JavaExec#onlyIf(groovy.lang.Closure), org.gradle.api.tasks.JavaExec#setOnlyIf(org.gradle.api.specs.Spec), org.gradle.api.tasks.JavaExec#setOnlyIf(groovy.lang.Closure), org.gradle.api.tasks.JavaExec#setDidWork(boolean), org.gradle.api.tasks.JavaExec#getDidWork(), org.gradle.api.tasks.JavaExec#doFirst(org.gradle.api.Action), org.gradle.api.tasks.JavaExec#doFirst(groovy.lang.Closure), org.gradle.api.tasks.JavaExec#doLast(org.gradle.api.Action), org.gradle.api.tasks.JavaExec#doLast(groovy.lang.Closure), org.gradle.api.tasks.JavaExec#deleteAllActions(), org.gradle.api.tasks.JavaExec#getEnabled(), org.gradle.api.tasks.JavaExec#setProject(org.gradle.api.Project), org.gradle.api.tasks.JavaExec#getTemporaryDir(), org.gradle.api.tasks.JavaExec#mustRunAfter([Ljava.lang.Object;), org.gradle.api.tasks.JavaExec#setMustRunAfter(java.lang.Iterable), org.gradle.api.tasks.JavaExec#getMustRunAfter(), org.gradle.api.tasks.JavaExec#finalizedBy([Ljava.lang.Object;), org.gradle.api.tasks.JavaExec#setFinalizedBy(java.lang.Iterable), org.gradle.api.tasks.JavaExec#getFinalizedBy(), org.gradle.api.tasks.JavaExec#shouldRunAfter([Ljava.lang.Object;), org.gradle.api.tasks.JavaExec#getShouldRunAfter(), org.gradle.api.tasks.JavaExec#dependsOnTaskDidWork(), org.gradle.api.tasks.JavaExec#getInputs(), org.gradle.api.tasks.JavaExec#getOutputs(), org.gradle.api.tasks.JavaExec#getOutputs(), org.gradle.api.tasks.JavaExec#setShouldRunAfter(java.lang.Iterable), org.gradle.api.tasks.JavaExec#executeWithoutThrowingTaskFailure(), org.gradle.api.tasks.JavaExec#addValidator(org.gradle.api.internal.tasks.execution.TaskValidator), org.gradle.api.tasks.JavaExec#injectIntoNewInstance(org.gradle.api.internal.project.ProjectInternal, java.lang.String, java.util.concurrent.Callable), org.gradle.api.tasks.JavaExec#getExecuter(), org.gradle.api.tasks.JavaExec#setExecuter(org.gradle.api.internal.tasks.TaskExecuter), org.gradle.api.tasks.JavaExec#getTemporaryDirFactory(), org.gradle.api.tasks.JavaExec#getValidators(), org.gradle.api.tasks.JavaExec#getTaskActions(), org.gradle.api.tasks.JavaExec#getOnlyIf(), org.gradle.api.tasks.JavaExec#leftShift(groovy.lang.Closure), org.gradle.api.tasks.JavaExec#setEnabled(boolean), org.gradle.api.tasks.JavaExec#getLogger(), org.gradle.api.tasks.JavaExec#configure(groovy.lang.Closure), org.gradle.api.tasks.JavaExec#configure(groovy.lang.Closure), org.gradle.api.tasks.JavaExec#isEnabled(), org.gradle.api.tasks.JavaExec#property(java.lang.String), org.gradle.api.tasks.JavaExec#getGroup(), org.gradle.api.tasks.JavaExec#getDescription(), org.gradle.api.tasks.JavaExec#getProject(), org.gradle.api.tasks.JavaExec#setDescription(java.lang.String), org.gradle.api.tasks.JavaExec#setGroup(java.lang.String), org.gradle.api.tasks.JavaExec#getAnt(), org.gradle.api.tasks.JavaExec#getConvention(), org.gradle.api.tasks.JavaExec#hasProperty(java.lang.String), org.gradle.api.tasks.JavaExec#getLogging(), org.gradle.api.tasks.JavaExec#getLogging(), org.gradle.api.tasks.JavaExec#setProperty(java.lang.String, java.lang.Object), org.gradle.api.tasks.JavaExec#toString(), org.gradle.api.tasks.JavaExec#compareTo(java.lang.Object), org.gradle.api.tasks.JavaExec#compareTo(org.gradle.api.Task), org.gradle.api.tasks.JavaExec#getName(), org.gradle.api.tasks.JavaExec#execute(), org.gradle.api.tasks.JavaExec#getActions(), org.gradle.api.tasks.JavaExec#setName(java.lang.String), org.gradle.api.tasks.JavaExec#getState(), org.gradle.api.tasks.JavaExec#getState(), org.gradle.api.tasks.JavaExec#getPath(), org.gradle.api.tasks.JavaExec#getExtensions(), org.gradle.api.tasks.JavaExec#wait(long, int), org.gradle.api.tasks.JavaExec#wait(long), org.gradle.api.tasks.JavaExec#wait(), org.gradle.api.tasks.JavaExec#equals(java.lang.Object), org.gradle.api.tasks.JavaExec#hashCode(), org.gradle.api.tasks.JavaExec#getClass(), org.gradle.api.tasks.JavaExec#notify(), org.gradle.api.tasks.JavaExec#notifyAll() |
class org.gradle.api.internal.ConventionTask |
org.gradle.api.internal.ConventionTask#getConventionMapping(), org.gradle.api.internal.ConventionTask#conventionMapping(java.lang.String, groovy.lang.Closure), org.gradle.api.internal.ConventionTask#conventionMapping(java.lang.String, java.util.concurrent.Callable), org.gradle.api.internal.ConventionTask#getStandardOutputCapture(), org.gradle.api.internal.ConventionTask#getAsDynamicObject(), org.gradle.api.internal.ConventionTask#setActions(java.util.List), org.gradle.api.internal.ConventionTask#getTaskDependencies(), org.gradle.api.internal.ConventionTask#getTaskDependencies(), org.gradle.api.internal.ConventionTask#getDependsOn(), org.gradle.api.internal.ConventionTask#setDependsOn(java.lang.Iterable), org.gradle.api.internal.ConventionTask#dependsOn([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#onlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.ConventionTask#onlyIf(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#setOnlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.ConventionTask#setOnlyIf(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#setDidWork(boolean), org.gradle.api.internal.ConventionTask#getDidWork(), org.gradle.api.internal.ConventionTask#doFirst(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#doFirst(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#doLast(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#doLast(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#deleteAllActions(), org.gradle.api.internal.ConventionTask#getEnabled(), org.gradle.api.internal.ConventionTask#setProject(org.gradle.api.Project), org.gradle.api.internal.ConventionTask#getTemporaryDir(), org.gradle.api.internal.ConventionTask#mustRunAfter([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#setMustRunAfter(java.lang.Iterable), org.gradle.api.internal.ConventionTask#getMustRunAfter(), org.gradle.api.internal.ConventionTask#finalizedBy([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#setFinalizedBy(java.lang.Iterable), org.gradle.api.internal.ConventionTask#getFinalizedBy(), org.gradle.api.internal.ConventionTask#shouldRunAfter([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#getShouldRunAfter(), org.gradle.api.internal.ConventionTask#dependsOnTaskDidWork(), org.gradle.api.internal.ConventionTask#getInputs(), org.gradle.api.internal.ConventionTask#getOutputs(), org.gradle.api.internal.ConventionTask#getOutputs(), org.gradle.api.internal.ConventionTask#setShouldRunAfter(java.lang.Iterable), org.gradle.api.internal.ConventionTask#executeWithoutThrowingTaskFailure(), org.gradle.api.internal.ConventionTask#addValidator(org.gradle.api.internal.tasks.execution.TaskValidator), org.gradle.api.internal.ConventionTask#injectIntoNewInstance(org.gradle.api.internal.project.ProjectInternal, java.lang.String, java.util.concurrent.Callable), org.gradle.api.internal.ConventionTask#getExecuter(), org.gradle.api.internal.ConventionTask#setExecuter(org.gradle.api.internal.tasks.TaskExecuter), org.gradle.api.internal.ConventionTask#getTemporaryDirFactory(), org.gradle.api.internal.ConventionTask#getValidators(), org.gradle.api.internal.ConventionTask#getTaskActions(), org.gradle.api.internal.ConventionTask#getOnlyIf(), org.gradle.api.internal.ConventionTask#leftShift(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#setEnabled(boolean), org.gradle.api.internal.ConventionTask#getLogger(), org.gradle.api.internal.ConventionTask#configure(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#configure(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#isEnabled(), org.gradle.api.internal.ConventionTask#property(java.lang.String), org.gradle.api.internal.ConventionTask#getGroup(), org.gradle.api.internal.ConventionTask#getDescription(), org.gradle.api.internal.ConventionTask#getProject(), org.gradle.api.internal.ConventionTask#setDescription(java.lang.String), org.gradle.api.internal.ConventionTask#setGroup(java.lang.String), org.gradle.api.internal.ConventionTask#getAnt(), org.gradle.api.internal.ConventionTask#getConvention(), org.gradle.api.internal.ConventionTask#hasProperty(java.lang.String), org.gradle.api.internal.ConventionTask#getLogging(), org.gradle.api.internal.ConventionTask#getLogging(), org.gradle.api.internal.ConventionTask#setProperty(java.lang.String, java.lang.Object), org.gradle.api.internal.ConventionTask#toString(), org.gradle.api.internal.ConventionTask#compareTo(java.lang.Object), org.gradle.api.internal.ConventionTask#compareTo(org.gradle.api.Task), org.gradle.api.internal.ConventionTask#getName(), org.gradle.api.internal.ConventionTask#execute(), org.gradle.api.internal.ConventionTask#getActions(), org.gradle.api.internal.ConventionTask#setName(java.lang.String), org.gradle.api.internal.ConventionTask#getState(), org.gradle.api.internal.ConventionTask#getState(), org.gradle.api.internal.ConventionTask#getPath(), org.gradle.api.internal.ConventionTask#getExtensions(), org.gradle.api.internal.ConventionTask#wait(long, int), org.gradle.api.internal.ConventionTask#wait(long), org.gradle.api.internal.ConventionTask#wait(), org.gradle.api.internal.ConventionTask#equals(java.lang.Object), org.gradle.api.internal.ConventionTask#hashCode(), org.gradle.api.internal.ConventionTask#getClass(), org.gradle.api.internal.ConventionTask#notify(), org.gradle.api.internal.ConventionTask#notifyAll() |
getArgs gets overridden in order to add JRuby options, script name and script arguments in the correct order. There are three modes of behaviour
-S
- Normal way to execute script. A check
whether the script exists will be performed.
-S
- If script is not absolute, no check will be performed to see
if the script exists and will be assumed that the script can be found using the default ruby path mechanism.
org.gradle.api.InvalidUserDataException
if mode of behaviour cannot be determined.Returns a list of jruby arguments
If it is required that a JRubyExec task needs to be executed with a different version of JRuby that the globally configured one, it can be done by setting it here.
Script to execute.
Returns a list of script arguments
Setting the jruby-complete
version allows for tasks to be run using different versions of JRuby.
This is useful for comparing the results of different version or running with a gem that is only
compatible with a specific version or when running a script with a different version that what will
be packaged.
version
- String in the form '1.7.13' Setting the jruby-complete
version allows for tasks to be run using different versions of JRuby.
This is useful for comparing the results of different version or running with a gem that is only
compatible with a specific version or when running a script with a different version that what will
be packaged.
version
- String in the form '1.7.13'Ensure that our JRuby depedencies are updated properly for the default jrubyExec configuration and all other JRubyExec tasks This function also ensures that we have a proper version of jar-dependencies on older versions of JRuby so jar requires work properly on those version
Verify that we are in a good configuration for execution
Groovy Documentation