Java Code Examples for org.gradle.api.internal.tasks.TaskStateInternal#upToDate()
The following examples show how to use
org.gradle.api.internal.tasks.TaskStateInternal#upToDate() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SkipTaskWithNoActionsExecuter.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { if (task.getActions().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; } } if (upToDate) { state.upToDate(); } return; } executer.execute(task, state, context); }
Example 2
Source File: SkipTaskWithNoActionsExecuter.java From pushfish-android with BSD 2-Clause "Simplified" License | 6 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { if (task.getActions().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; } } if (upToDate) { state.upToDate(); } return; } executer.execute(task, state, context); }
Example 3
Source File: SkipTaskWithNoActionsExecuter.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { if (task.getActions().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; } } if (upToDate) { state.upToDate(); } return; } executer.execute(task, state, context); }
Example 4
Source File: SkipTaskWithNoActionsExecuter.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 6 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { if (task.getActions().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; } } if (upToDate) { state.upToDate(); } return; } executer.execute(task, state, context); }
Example 5
Source File: SkipUpToDateTaskExecuter.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { LOGGER.debug("Determining if {} is up-to-date", task); Clock clock = new Clock(); TaskArtifactState taskArtifactState = repository.getStateFor(task); try { List<String> messages = new ArrayList<String>(); if (taskArtifactState.isUpToDate(messages)) { LOGGER.info("Skipping {} as it is up-to-date (took {}).", task, clock.getTime()); state.upToDate(); return; } logOutOfDateMessages(messages, task, clock.getTime()); task.getOutputs().setHistory(taskArtifactState.getExecutionHistory()); context.setTaskArtifactState(taskArtifactState); taskArtifactState.beforeTask(); try { executer.execute(task, state, context); if (state.getFailure() == null) { taskArtifactState.afterTask(); } } finally { task.getOutputs().setHistory(null); context.setTaskArtifactState(null); } } finally { taskArtifactState.finished(); } }
Example 6
Source File: SkipEmptySourceFilesTaskExecuter.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { if (task.getInputs().getHasSourceFiles() && task.getInputs().getSourceFiles().isEmpty()) { LOGGER.info("Skipping {} as it has no source files.", task); state.upToDate(); return; } executer.execute(task, state, context); }
Example 7
Source File: SkipUpToDateTaskExecuter.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { LOGGER.debug("Determining if {} is up-to-date", task); Clock clock = new Clock(); TaskArtifactState taskArtifactState = repository.getStateFor(task); try { List<String> messages = new ArrayList<String>(); if (taskArtifactState.isUpToDate(messages)) { LOGGER.info("Skipping {} as it is up-to-date (took {}).", task, clock.getTime()); state.upToDate(); return; } logOutOfDateMessages(messages, task, clock.getTime()); task.getOutputs().setHistory(taskArtifactState.getExecutionHistory()); context.setTaskArtifactState(taskArtifactState); taskArtifactState.beforeTask(); try { executer.execute(task, state, context); if (state.getFailure() == null) { taskArtifactState.afterTask(); } } finally { task.getOutputs().setHistory(null); context.setTaskArtifactState(null); } } finally { taskArtifactState.finished(); } }
Example 8
Source File: SkipEmptySourceFilesTaskExecuter.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { if (task.getInputs().getHasSourceFiles() && task.getInputs().getSourceFiles().isEmpty()) { LOGGER.info("Skipping {} as it has no source files.", task); state.upToDate(); return; } executer.execute(task, state, context); }
Example 9
Source File: SkipUpToDateTaskExecuter.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { LOGGER.debug("Determining if {} is up-to-date", task); Clock clock = new Clock(); TaskArtifactState taskArtifactState = repository.getStateFor(task); try { List<String> messages = new ArrayList<String>(); if (taskArtifactState.isUpToDate(messages)) { LOGGER.info("Skipping {} as it is up-to-date (took {}).", task, clock.getTime()); state.upToDate(); return; } logOutOfDateMessages(messages, task, clock.getTime()); task.getOutputs().setHistory(taskArtifactState.getExecutionHistory()); context.setTaskArtifactState(taskArtifactState); taskArtifactState.beforeTask(); try { executer.execute(task, state, context); if (state.getFailure() == null) { taskArtifactState.afterTask(); } } finally { task.getOutputs().setHistory(null); context.setTaskArtifactState(null); } } finally { taskArtifactState.finished(); } }
Example 10
Source File: SkipEmptySourceFilesTaskExecuter.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { if (task.getInputs().getHasSourceFiles() && task.getInputs().getSourceFiles().isEmpty()) { LOGGER.info("Skipping {} as it has no source files.", task); state.upToDate(); return; } executer.execute(task, state, context); }
Example 11
Source File: SkipUpToDateTaskExecuter.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { LOGGER.debug("Determining if {} is up-to-date", task); Clock clock = new Clock(); TaskArtifactState taskArtifactState = repository.getStateFor(task); try { List<String> messages = new ArrayList<String>(); if (taskArtifactState.isUpToDate(messages)) { LOGGER.info("Skipping {} as it is up-to-date (took {}).", task, clock.getTime()); state.upToDate(); return; } logOutOfDateMessages(messages, task, clock.getTime()); task.getOutputs().setHistory(taskArtifactState.getExecutionHistory()); context.setTaskArtifactState(taskArtifactState); taskArtifactState.beforeTask(); try { executer.execute(task, state, context); if (state.getFailure() == null) { taskArtifactState.afterTask(); } } finally { task.getOutputs().setHistory(null); context.setTaskArtifactState(null); } } finally { taskArtifactState.finished(); } }
Example 12
Source File: SkipEmptySourceFilesTaskExecuter.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { if (task.getInputs().getHasSourceFiles() && task.getInputs().getSourceFiles().isEmpty()) { LOGGER.info("Skipping {} as it has no source files.", task); state.upToDate(); return; } executer.execute(task, state, context); }
Example 13
Source File: PostExecutionAnalysisTaskExecuter.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { executer.execute(task, state, context); if (!state.getDidWork()) { state.upToDate(); } }
Example 14
Source File: PostExecutionAnalysisTaskExecuter.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { executer.execute(task, state, context); if (!state.getDidWork()) { state.upToDate(); } }
Example 15
Source File: PostExecutionAnalysisTaskExecuter.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { executer.execute(task, state, context); if (!state.getDidWork()) { state.upToDate(); } }
Example 16
Source File: PostExecutionAnalysisTaskExecuter.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public void execute(TaskInternal task, TaskStateInternal state, TaskExecutionContext context) { executer.execute(task, state, context); if (!state.getDidWork()) { state.upToDate(); } }