本文整理了Java中org.gradle.api.Task.getState()
方法的一些代码示例,展示了Task.getState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getState()
方法的具体详情如下:
包路径:org.gradle.api.Task
类名称:Task
方法名:getState
暂无
代码示例来源:origin: gradle.plugin.org.mockito/release
public boolean isSatisfiedBy(Task t) {
return task.getState().getFailure() == null;
}
});
代码示例来源:origin: org.gradle/gradle-core
public void onTaskFailure(Task task) {
task.getState().rethrowFailure();
}
}
代码示例来源:origin: stackoverflow.com
public class TaskTableModel extends AbstractTableModel {
private final TaskList taskList;
public TaskTableModel(TaskList taskList) {
this.taskList = taskList;
}
public Object getValueAt(int row, int column) {
Task task = taskList.getTask(row);
Object ret;
switch(column) {
case 0:
ret = task.getStartTime();
break;
case 1:
ret = task.getState();
break;
// etc ...
}
return ret;
}
// TODO: Implement other TableModel methods.
}
代码示例来源:origin: org.gradle/gradle-core
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) {
if (task.getTaskActions().isEmpty()) {
LOGGER.info("Skipping {} as it has no actions.", task);
boolean upToDate = true;
for (Task dependency : task.getTaskDependencies().getDependencies(task)) {
if (!dependency.getState().getSkipped()) {
upToDate = false;
break;
}
}
state.setActionable(false);
state.setOutcome(upToDate ? TaskExecutionOutcome.UP_TO_DATE : TaskExecutionOutcome.EXECUTED);
return;
}
executer.execute(task, state, context);
}
}
内容来源于网络,如有侵权,请联系作者删除!