Search in sources :

Example 1 with BuildOperationProcessor

use of org.gradle.internal.operations.BuildOperationProcessor in project gradle by gradle.

the class JvmTestSuiteBasePlugin method configureRuntimeClasspath.

@Finalize
public void configureRuntimeClasspath(@Each JvmTestSuiteBinarySpecInternal testBinary, ServiceRegistry serviceRegistry, ModelSchemaStore modelSchemaStore) {
    ArtifactDependencyResolver dependencyResolver = serviceRegistry.get(ArtifactDependencyResolver.class);
    RepositoryHandler repositories = serviceRegistry.get(RepositoryHandler.class);
    List<ResolutionAwareRepository> resolutionAwareRepositories = CollectionUtils.collect(repositories, Transformers.cast(ResolutionAwareRepository.class));
    ModelSchema<? extends JvmTestSuiteBinarySpec> schema = Cast.uncheckedCast(modelSchemaStore.getSchema(((BinarySpecInternal) testBinary).getPublicType()));
    AttributesSchema attributesSchema = serviceRegistry.get(AttributesSchema.class);
    ImmutableModuleIdentifierFactory moduleIdentifierFactory = serviceRegistry.get(ImmutableModuleIdentifierFactory.class);
    ModuleExclusions moduleExclusions = serviceRegistry.get(ModuleExclusions.class);
    BuildOperationProcessor buildOperationProcessor = serviceRegistry.get(BuildOperationProcessor.class);
    testBinary.setRuntimeClasspath(configureRuntimeClasspath(testBinary, dependencyResolver, resolutionAwareRepositories, schema, attributesSchema, moduleIdentifierFactory, moduleExclusions, buildOperationProcessor));
}
Also used : ArtifactDependencyResolver(org.gradle.api.internal.artifacts.ArtifactDependencyResolver) ImmutableModuleIdentifierFactory(org.gradle.api.internal.artifacts.ImmutableModuleIdentifierFactory) ModuleExclusions(org.gradle.api.internal.artifacts.ivyservice.resolveengine.excludes.ModuleExclusions) BinarySpecInternal(org.gradle.platform.base.internal.BinarySpecInternal) JvmBinarySpecInternal(org.gradle.jvm.internal.JvmBinarySpecInternal) JvmTestSuiteBinarySpecInternal(org.gradle.jvm.test.internal.JvmTestSuiteBinarySpecInternal) ResolutionAwareRepository(org.gradle.api.internal.artifacts.repositories.ResolutionAwareRepository) BuildOperationProcessor(org.gradle.internal.operations.BuildOperationProcessor) RepositoryHandler(org.gradle.api.artifacts.dsl.RepositoryHandler) AttributesSchema(org.gradle.api.attributes.AttributesSchema)

Aggregations

RepositoryHandler (org.gradle.api.artifacts.dsl.RepositoryHandler)1 AttributesSchema (org.gradle.api.attributes.AttributesSchema)1 ArtifactDependencyResolver (org.gradle.api.internal.artifacts.ArtifactDependencyResolver)1 ImmutableModuleIdentifierFactory (org.gradle.api.internal.artifacts.ImmutableModuleIdentifierFactory)1 ModuleExclusions (org.gradle.api.internal.artifacts.ivyservice.resolveengine.excludes.ModuleExclusions)1 ResolutionAwareRepository (org.gradle.api.internal.artifacts.repositories.ResolutionAwareRepository)1 BuildOperationProcessor (org.gradle.internal.operations.BuildOperationProcessor)1 JvmBinarySpecInternal (org.gradle.jvm.internal.JvmBinarySpecInternal)1 JvmTestSuiteBinarySpecInternal (org.gradle.jvm.test.internal.JvmTestSuiteBinarySpecInternal)1 BinarySpecInternal (org.gradle.platform.base.internal.BinarySpecInternal)1