Examples of ModelMapping


Examples of org.gradle.tooling.internal.consumer.versioning.ModelMapping

        List<String> tasks = providerParameters.getTasks();
        if (modelName.equals(ModelIdentifier.NULL_MODEL) && tasks == null) {
            throw new IllegalArgumentException("No model type or tasks specified.");
        }
        Parameters params = initParams(providerParameters);
        Class<?> type = new ModelMapping().getProtocolTypeFromModelName(modelName);
        if (type == InternalBuildEnvironment.class) {
            //we don't really need to launch the daemon to acquire information needed for BuildEnvironment
            if (tasks != null) {
                throw new IllegalArgumentException("Cannot run tasks and fetch the build environment model.");
            }
View Full Code Here

Examples of org.gradle.tooling.internal.consumer.versioning.ModelMapping

                + "\nTo resolve the problem you can change/upgrade the target version of Gradle."
                , operation, targetVersion));
    }

    public static UnknownModelException unsupportedModel(Class<?> modelType, String targetVersion) {
        ModelMapping modelMapping = new ModelMapping();
        String versionAdded = modelMapping.getVersionAdded(modelType);
        if (versionAdded != null) {
            return new UnknownModelException(String.format("The version of Gradle you are using (%s) does not support building a model of type '%s'. Support for building '%s' models was added in Gradle %s and is available in all later versions.",
                    targetVersion, modelType.getSimpleName(), modelType.getSimpleName(), versionAdded));
        } else {
            return new UnknownModelException(String.format("The version of Gradle you are using (%s) does not support building a model of type '%s'. Support for building custom tooling models was added in Gradle 1.6 and is available in all later versions.",
View Full Code Here

Examples of org.gradle.tooling.internal.consumer.versioning.ModelMapping

            }
            // ConnectionVersion4 is a part of the protocol and cannot be easily changed.
            ConnectionVersion4 connection = factory.create();

            ProtocolToModelAdapter adapter = new ProtocolToModelAdapter(new ConsumerTargetTypeProvider());
            ModelMapping modelMapping = new ModelMapping();

            // Adopting the connection to a refactoring friendly type that the consumer owns
            AbstractConsumerConnection adaptedConnection;
            if (connection instanceof StoppableConnection) {
                adaptedConnection = new ShutdownAwareConsumerConnection(connection, modelMapping, adapter);
View Full Code Here

Examples of org.gradle.tooling.internal.consumer.versioning.ModelMapping

        this.action = action;
        this.adapter = adapter;
    }

    public T execute(final InternalBuildController buildController) {
        return action.execute(new BuildControllerAdapter(adapter, buildController, new ModelMapping()));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.