public final class GradleCommandLine extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
GradleCommandLine.Flag
Gradle command line flags
|
static interface |
GradleCommandLine.GradleOptionItem |
static class |
GradleCommandLine.LogLevel
Gradle log levels.
|
static class |
GradleCommandLine.Parameter |
static class |
GradleCommandLine.Property |
static class |
GradleCommandLine.StackTrace
Gradle stacktrace output levels.
|
Modifier and Type | Field and Description |
---|---|
static String |
CHECK_TASK
The common name of the task which invokes checks.
|
static String |
TEST_TASK
The common name of the task which invokes tests.
|
Constructor and Description |
---|
GradleCommandLine(CharSequence argLine) |
GradleCommandLine(GradleCommandLine cmd)
Creates a copy instance of the provided GradleCommandLine.
|
GradleCommandLine(GradleDistributionManager.GradleDistribution dist,
CharSequence argLine) |
GradleCommandLine(GradleDistributionManager.GradleDistribution dist,
GradleCommandLine cmd)
/**
Creates a copy instance of the provided GradleCommandLine, but with for a
specified GradleDistribution.
|
GradleCommandLine(GradleDistributionManager.GradleDistribution dist,
String... args)
Creates a command line form the specified arguments with compatibility
constraint on a specified Gradle distribution.
|
GradleCommandLine(String... args) |
public static final String TEST_TASK
public static final String CHECK_TASK
public GradleCommandLine(GradleDistributionManager.GradleDistribution dist, GradleCommandLine cmd)
dist
- the GradleDistribution for compatibility checks. null
can be used for unspecified.cmd
- the command line to copypublic GradleCommandLine(GradleCommandLine cmd)
cmd
- the command line to copypublic GradleCommandLine(GradleDistributionManager.GradleDistribution dist, String... args)
dist
- the GradleDistribution for compatibility checks. null
can be used for unspecified.args
- the command line parameterspublic GradleCommandLine(String... args)
public GradleCommandLine(GradleDistributionManager.GradleDistribution dist, CharSequence argLine)
public GradleCommandLine(CharSequence argLine)
public List<String> getSupportedCommandLine()
public List<String> getFullCommandLine()
public void setTasks(Collection<String> tasks)
public void removeTask(String task)
public void addTask(String task)
public boolean hasTask(String task)
public boolean hasFlag(GradleCommandLine.Flag flag)
public void addFlag(GradleCommandLine.Flag flag)
public boolean canAdd(GradleCommandLine.Flag flag)
public boolean canAdd(GradleCommandLine.GradleOptionItem item)
public void removeFlag(GradleCommandLine.Flag flag)
public void setFlag(GradleCommandLine.Flag flag, boolean b)
public void addParameter(GradleCommandLine.Parameter param, String value)
public String getFirstParameter(GradleCommandLine.Parameter param)
public boolean hasParameter(GradleCommandLine.Parameter param)
public Collection<String> getParameters(GradleCommandLine.Parameter param)
public void setExcludedTasks(Collection<String> excluded)
public void removeParameters(GradleCommandLine.Parameter param)
public void removeParameter(GradleCommandLine.Parameter param, String value)
public void removeProperty(GradleCommandLine.Property prop, String key)
public GradleCommandLine remove(GradleCommandLine mask)
public String getProperty(GradleCommandLine.Property type, String key)
public GradleCommandLine.LogLevel getLoglevel()
public void setLogLevel(GradleCommandLine.LogLevel level)
public GradleCommandLine.StackTrace getStackTrace()
public void setStackTrace(GradleCommandLine.StackTrace st)
public void configure(org.gradle.tooling.ConfigurableLauncher<?> launcher, File rootDir)
launcher
- the Launcher instance to configure.rootDir
- can be null
if the project properties for JVM
arguments shall not be evaluated.public void configure(org.gradle.tooling.ConfigurableLauncher<?> launcher)
launcher
- the Launcher instance to configure.public static GradleCommandLine combine(GradleCommandLine first, GradleCommandLine... layers)
public static GradleCommandLine getDefaultCommandLine()