public class GradlePluginLord extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
GradlePluginLord.GeneralPluginObserver |
static interface |
GradlePluginLord.RequestObserver |
static interface |
GradlePluginLord.SettingsObserver |
| Constructor and Description |
|---|
GradlePluginLord() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListener listener)
This allows you to add a listener that can add additional command line arguments whenever gradle is executed.
|
Request |
addExecutionRequestToQueue(List<FavoriteTask> favorites)
Executes several favorites commands at once as a single command.
|
Request |
addExecutionRequestToQueue(List<TaskView> tasks,
boolean forceOutputToBeShown,
String... additionCommandLineOptions)
This executes all the tasks together in a background thread.
|
Request |
addExecutionRequestToQueue(String fullCommandLine,
String displayName) |
Request |
addExecutionRequestToQueue(String fullCommandLine,
String displayName,
boolean forceOutputToBeShown)
Call this to execute a task in a background thread.
|
Request |
addExecutionRequestToQueue(TaskView task,
boolean forceOutputToBeShown,
String... additionCommandLineOptions)
This executes a task in a background thread.
|
void |
addGeneralPluginObserver(GradlePluginLord.GeneralPluginObserver observer,
boolean inEventQueue)
Adds an observer for various events.
|
Request |
addRefreshRequestToQueue()
This will refresh the project/task tree.
|
Request |
addRefreshRequestToQueue(String additionalCommandLineArguments)
This will refresh the project/task tree.
|
void |
addRequestObserver(GradlePluginLord.RequestObserver observer,
boolean inEventQueue) |
void |
addSettingsObserver(GradlePluginLord.SettingsObserver observer,
boolean inEventQueue) |
File |
getCurrentDirectory() |
File |
getCustomGradleExecutor() |
FavoritesEditor |
getFavoritesEditor() |
static String |
getGradleExceptionMessage(Throwable failure,
ShowStacktrace stackTraceLevel)
This code was copied from BuildExceptionReporter.reportBuildFailure in gradle's source, then modified slightly to compensate for the fact that we're not driven by options or logging things to a
logger object.
|
File |
getGradleHomeDirectory() |
LogLevel |
getLogLevel() |
List<ProjectView> |
getProjects() |
ShowStacktrace |
getStackTraceLevel() |
boolean |
isBusy()
Determines if there are tasks executing or waiting to execute.
|
boolean |
isSetupComplete()
Determines if all required setup is complete based on the current settings.
|
void |
removeCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListener listener) |
void |
removeGeneralPluginObserver(GradlePluginLord.GeneralPluginObserver observer) |
void |
removeRequestObserver(GradlePluginLord.RequestObserver observer) |
void |
removeSettingsObserver(GradlePluginLord.SettingsObserver observer) |
boolean |
setCurrentDirectory(File currentDirectory) |
boolean |
setCustomGradleExecutor(File customGradleExecutor) |
void |
setGradleHomeDirectory(File gradleHomeDirectory)
sets the gradle home directory.
|
void |
setLogLevel(LogLevel logLevel) |
void |
setProjects(List<ProjectView> newProjects)
Sets the current projects.
|
void |
setStackTraceLevel(ShowStacktrace stackTraceLevel)
this allows you to change how much information is given when an error occurs.
|
void |
startExecutionQueue()
Call this to start execution.
|
public List<ProjectView> getProjects()
public void setProjects(List<ProjectView> newProjects)
public File getGradleHomeDirectory()
public void setGradleHomeDirectory(File gradleHomeDirectory)
gradleHomeDirectory - the new home directorypublic File getCurrentDirectory()
public boolean setCurrentDirectory(File currentDirectory)
currentDirectory - the new root directory of your gradle project.public File getCustomGradleExecutor()
public boolean setCustomGradleExecutor(File customGradleExecutor)
public FavoritesEditor getFavoritesEditor()
public void setStackTraceLevel(ShowStacktrace stackTraceLevel)
public ShowStacktrace getStackTraceLevel()
public LogLevel getLogLevel()
public void setLogLevel(LogLevel logLevel)
public void startExecutionQueue()
public void addGeneralPluginObserver(GradlePluginLord.GeneralPluginObserver observer, boolean inEventQueue)
observer - your observerinEventQueue - true if you want to be notified in the Event Dispatch Thread.public void removeGeneralPluginObserver(GradlePluginLord.GeneralPluginObserver observer)
public void addRequestObserver(GradlePluginLord.RequestObserver observer, boolean inEventQueue)
public void removeRequestObserver(GradlePluginLord.RequestObserver observer)
public void addSettingsObserver(GradlePluginLord.SettingsObserver observer, boolean inEventQueue)
public void removeSettingsObserver(GradlePluginLord.SettingsObserver observer)
public boolean isSetupComplete()
public Request addExecutionRequestToQueue(String fullCommandLine, String displayName)
public Request addExecutionRequestToQueue(TaskView task, boolean forceOutputToBeShown, String... additionCommandLineOptions)
task - the task to execute.forceOutputToBeShown - overrides the user setting onlyShowOutputOnErrors so that the output is shown regardlesspublic Request addExecutionRequestToQueue(List<TaskView> tasks, boolean forceOutputToBeShown, String... additionCommandLineOptions)
tasks - the tasks to executeforceOutputToBeShown - overrides the user setting onlyShowOutputOnErrors so that the output is shown regardlessadditionCommandLineOptions - additional command line options to exeucte.public Request addExecutionRequestToQueue(List<FavoriteTask> favorites)
favorites - a list of favorites. If just one favorite, it executes it normally. If multiple favorites, it executes them all at once as a single command.public Request addExecutionRequestToQueue(String fullCommandLine, String displayName, boolean forceOutputToBeShown)
fullCommandLine - the full command line to pass to gradle.displayName - what we show on the tab.forceOutputToBeShown - overrides the user setting onlyShowOutputOnErrors so that the output is shown regardlesspublic Request addRefreshRequestToQueue()
public Request addRefreshRequestToQueue(String additionalCommandLineArguments)
additionalCommandLineArguments - the arguments to add, or null if none.public void addCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListener listener)
public void removeCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListener listener)
public static String getGradleExceptionMessage(Throwable failure, ShowStacktrace stackTraceLevel)
public boolean isBusy()
Copyright © 2013. All rights reserved