Package org.gradle.api

Examples of org.gradle.api.BuildCancelledException


    }

    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;
        if (target == null) {
View Full Code Here


        }
    }

    private void rethrowFailures() {
        if (tasksCancelled) {
            failures.add(new BuildCancelledException());
        }
        if (failures.isEmpty()) {
            return;
        }
View Full Code Here

        if (result instanceof Failure) {
            // Could potentially distinguish between CommandFailure and DaemonFailure here.
            Throwable failure = ((Failure) result).getValue();
            if (failure instanceof DaemonStoppedException && cancellationToken.isCancellationRequested()) {
                LOGGER.error("Daemon was stopped to handle build cancel request.");
                throw new BuildCancelledException();
            }
            throw UncheckedException.throwAsUncheckedException(failure);
        } else if (result instanceof DaemonUnavailable) {
            throw new DaemonInitialConnectException("The daemon we connected to was unavailable: " + ((DaemonUnavailable) result).getReason());
        } else if (result instanceof Result) {
View Full Code Here

        this.cancellationToken = cancellationToken;
    }

    public void configure(ProjectInternal project) {
        if (cancellationToken.isCancellationRequested()) {
            throw new BuildCancelledException();
        }
        project.evaluate();
    }
View Full Code Here

        project.evaluate();
    }

    public void configureHierarchy(ProjectInternal project) {
        if (cancellationToken.isCancellationRequested()) {
            throw new BuildCancelledException();
        }
        project.evaluate();
        for (Project sub : project.getSubprojects()) {
            if (cancellationToken.isCancellationRequested()) {
                throw new BuildCancelledException();
            }
            ((ProjectInternal) sub).evaluate();
        }
    }
View Full Code Here

TOP

Related Classes of org.gradle.api.BuildCancelledException

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.