Package org.gradle.initialization

Examples of org.gradle.initialization.BuildCancellationToken


    protected void doBuild(DaemonCommandExecution execution, Build build) {
        LOGGER.debug(DaemonMessages.STARTED_BUILD);
        LOGGER.info("Executing build with daemon context: {}", execution.getDaemonContext());
        try {
            BuildCancellationToken cancellationToken = execution.getDaemonStateControl().getCancellationToken();
            Object result = actionExecuter.execute(build.getAction(), cancellationToken, build.getParameters());
            execution.setResult(result);
        } catch (ReportedException e) {
            /*
                We have to wrap in a ReportedException so the other side doesn't re-log this exception, because it's already
View Full Code Here


    public BuildResult<?> getBuildModel() throws BuildExceptionVersion1 {
        return new ProviderBuildResult<Object>(gradle);
    }

    public BuildResult<?> getModel(Object target, ModelIdentifier modelIdentifier) throws BuildExceptionVersion1, InternalUnsupportedModelException {
        BuildCancellationToken cancellationToken = gradle.getServices().get(BuildCancellationToken.class);
        if (cancellationToken.isCancellationRequested()) {
            throw new BuildCancelledException(String.format("Could not build '%s' model. Build cancelled.", modelIdentifier.getName()));
        }
        ToolingModelBuilderRegistry modelBuilderRegistry;
        ProjectInternal project;
        boolean isImplicitProject;
View Full Code Here

        return distribution.getDisplayName();
    }

    public <T> T run(ConsumerAction<T> action) throws UnsupportedOperationException, IllegalStateException {
        try {
            BuildCancellationToken cancellationToken = action.getParameters().getCancellationToken();
            if (cancellationToken.isCancellationRequested()) {
                throw new BuildCancelledException("Build cancelled");
            }
            ConsumerConnection connection = onStartAction(cancellationToken);
            return action.run(connection);
        } finally {
View Full Code Here

TOP

Related Classes of org.gradle.initialization.BuildCancellationToken

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.