Search in sources :

Example 1 with GradleBuildConverter

use of org.gradle.tooling.internal.consumer.converters.GradleBuildConverter in project gradle by gradle.

the class GradleBuildAdapterProducer method produceModel.

public <T> T produceModel(Class<T> type, ConsumerOperationParameters operationParameters) {
    if (type.equals(GradleBuild.class)) {
        GradleProject gradleProject = delegate.produceModel(GradleProject.class, operationParameters);
        final DefaultGradleBuild convert = new GradleBuildConverter().convert(gradleProject);
        return mappingProvider.applyCompatibilityMapping(adapter.builder(type), operationParameters).build(convert);
    }
    return delegate.produceModel(type, operationParameters);
}
Also used : GradleBuildConverter(org.gradle.tooling.internal.consumer.converters.GradleBuildConverter) DefaultGradleBuild(org.gradle.tooling.internal.gradle.DefaultGradleBuild) GradleProject(org.gradle.tooling.model.GradleProject)

Aggregations

GradleBuildConverter (org.gradle.tooling.internal.consumer.converters.GradleBuildConverter)1 DefaultGradleBuild (org.gradle.tooling.internal.gradle.DefaultGradleBuild)1 GradleProject (org.gradle.tooling.model.GradleProject)1