Search in sources :

Example 1 with ContinuousExecutionGate

use of org.gradle.initialization.ContinuousExecutionGate in project gradle by gradle.

the class ContinuousBuildActionExecuter method waitForDeployments.

private void waitForDeployments(BuildAction action, BuildRequestContext requestContext, final BuildActionParameters actionParameters, ServiceRegistry buildSessionScopeServices, CancellableOperationManager cancellableOperationManager) {
    final DeploymentRegistryInternal deploymentRegistry = buildSessionScopeServices.get(DeploymentRegistryInternal.class);
    if (!deploymentRegistry.getRunningDeployments().isEmpty()) {
        // Deployments are considered outOfDate until initial execution with file watching
        for (Deployment deployment : deploymentRegistry.getRunningDeployments()) {
            ((DeploymentInternal) deployment).outOfDate();
        }
        logger.println().println("Reloadable deployment detected. Entering continuous build.");
        ContinuousExecutionGate deploymentRequestExecutionGate = deploymentRegistry.getExecutionGate();
        executeMultipleBuilds(action, requestContext, actionParameters, buildSessionScopeServices, cancellableOperationManager, deploymentRequestExecutionGate);
    }
    cancellableOperationManager.closeInput();
}
Also used : DeploymentRegistryInternal(org.gradle.deployment.internal.DeploymentRegistryInternal) ContinuousExecutionGate(org.gradle.initialization.ContinuousExecutionGate) DefaultContinuousExecutionGate(org.gradle.initialization.DefaultContinuousExecutionGate) Deployment(org.gradle.deployment.internal.Deployment) DeploymentInternal(org.gradle.deployment.internal.DeploymentInternal)

Aggregations

Deployment (org.gradle.deployment.internal.Deployment)1 DeploymentInternal (org.gradle.deployment.internal.DeploymentInternal)1 DeploymentRegistryInternal (org.gradle.deployment.internal.DeploymentRegistryInternal)1 ContinuousExecutionGate (org.gradle.initialization.ContinuousExecutionGate)1 DefaultContinuousExecutionGate (org.gradle.initialization.DefaultContinuousExecutionGate)1