本文整理汇总了Java中org.gradle.internal.Actions.toAction方法的典型用法代码示例。如果您正苦于以下问题:Java Actions.toAction方法的具体用法?Java Actions.toAction怎么用?Java Actions.toAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.gradle.internal.Actions
的用法示例。
在下文中一共展示了Actions.toAction方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAction
import org.gradle.internal.Actions; //导入方法依赖的package包/类
private Action<? super ExecutionListener> createAction(Iterable<CommandLineAction> factories, CommandLineParser parser, ParsedCommandLine commandLine) {
for (CommandLineAction factory : factories) {
Runnable action = factory.createAction(parser, commandLine);
if (action != null) {
return Actions.toAction(action);
}
}
throw new UnsupportedOperationException("No action factory for specified command-line arguments.");
}
示例2: createAction
import org.gradle.internal.Actions; //导入方法依赖的package包/类
public Action<? super ExecutionListener> createAction(CommandLineParser parser, ParsedCommandLine commandLine) {
if (commandLine.hasOption(HELP)) {
return Actions.toAction(new ShowUsageAction(parser));
}
if (commandLine.hasOption(VERSION)) {
return Actions.toAction(new ShowVersionAction());
}
return null;
}
示例3: createAction
import org.gradle.internal.Actions; //导入方法依赖的package包/类
public Action<? super ExecutionListener> createAction(CommandLineParser parser, ParsedCommandLine commandLine) {
BuildLayoutParameters layout = new BuildLayoutParameters();
layoutConverter.convert(commandLine, layout);
Map<String, String> properties = new HashMap<String, String>();
layoutToPropertiesConverter.convert(layout, properties);
propertiesConverter.convert(commandLine, properties);
StartParameter startParameter = new StartParameter();
propertiesToStartParameterConverter.convert(properties, startParameter);
commandLineConverter.convert(commandLine, startParameter);
DaemonParameters daemonParameters = new DaemonParameters(layout);
propertiesToDaemonParametersConverter.convert(properties, daemonParameters);
daemonConverter.convert(commandLine, daemonParameters);
if (commandLine.hasOption(STOP)) {
return stopAllDaemons(daemonParameters, loggingServices);
}
if (commandLine.hasOption(FOREGROUND)) {
ForegroundDaemonConfiguration conf = new ForegroundDaemonConfiguration(
daemonParameters.getUid(), daemonParameters.getBaseDir(), daemonParameters.getIdleTimeout());
return Actions.toAction(new ForegroundDaemonMain(conf));
}
if (daemonParameters.isEnabled()) {
return runBuildWithDaemon(startParameter, daemonParameters, loggingServices);
}
if (canUseCurrentProcess(daemonParameters)) {
return runBuildInProcess(startParameter, daemonParameters, loggingServices);
}
return runBuildInSingleUseDaemon(startParameter, daemonParameters, loggingServices);
}
示例4: createAction
import org.gradle.internal.Actions; //导入方法依赖的package包/类
public Action<? super ExecutionListener> createAction(CommandLineParser parser, ParsedCommandLine commandLine) {
if (commandLine.hasOption(GUI)) {
return Actions.toAction(new ShowGuiAction());
}
return null;
}
示例5: stopAllDaemons
import org.gradle.internal.Actions; //导入方法依赖的package包/类
private Action<? super ExecutionListener> stopAllDaemons(DaemonParameters daemonParameters, ServiceRegistry loggingServices) {
DaemonClientServices clientServices = new StopDaemonClientServices(loggingServices, daemonParameters, System.in);
DaemonClient stopClient = clientServices.get(DaemonClient.class);
return Actions.toAction(new StopDaemonAction(stopClient));
}
示例6: daemonBuildAction
import org.gradle.internal.Actions; //导入方法依赖的package包/类
private Action<? super ExecutionListener> daemonBuildAction(StartParameter startParameter, DaemonParameters daemonParameters, BuildActionExecuter<BuildActionParameters> executer) {
return Actions.toAction(
new RunBuildAction(executer, startParameter, SystemProperties.getCurrentDir(), clientMetaData(), getBuildStartTime(), daemonParameters.getEffectiveSystemProperties(), System.getenv()));
}