use of org.gradle.jvm.internal.resolve.JvmLibraryResolveContext in project gradle by gradle.
the class JvmTestSuiteBasePlugin method createResolveContext.
private static JvmLibraryResolveContext createResolveContext(JvmTestSuiteBinarySpecInternal testBinary, ModelSchema<? extends JvmTestSuiteBinarySpec> schema, ImmutableModuleIdentifierFactory moduleIdentifierFactory) {
// TODO:Cedric find out why if we use the same ID directly, it fails resolution by trying to get the artifacts
// from the resolving metadata instead of the resolved metadata
LibraryBinaryIdentifier id = testBinary.getId();
LibraryBinaryIdentifier thisId = new DefaultLibraryBinaryIdentifier(id.getProjectPath(), id.getLibraryName() + "Test", id.getVariant());
return new JvmLibraryResolveContext(thisId, DefaultVariantsMetaData.extractFrom(testBinary, schema), runtimeDependencies(testBinary), UsageKind.RUNTIME, testBinary.getDisplayName(), moduleIdentifierFactory);
}
Aggregations