Search in sources :

Example 1 with JvmBinarySpec

use of org.gradle.jvm.JvmBinarySpec in project gradle by gradle.

the class JvmTestSuiteBasePlugin method runtimeDependencies.

private static List<DependencySpec> runtimeDependencies(JvmTestSuiteBinarySpecInternal testBinary) {
    List<DependencySpec> dependencies = Lists.newArrayList(testBinary.getDependencies());
    JvmBinarySpec testedBinary = testBinary.getTestedBinary();
    dependencies.add(DefaultLibraryBinaryDependencySpec.of(testBinary.getId()));
    if (testedBinary != null) {
        JvmBinarySpecInternal binary = (JvmBinarySpecInternal) testedBinary;
        LibraryBinaryIdentifier id = binary.getId();
        dependencies.add(DefaultLibraryBinaryDependencySpec.of(id));
    }
    addSourceSetSpecificDependencies(dependencies, testBinary.getSources());
    addSourceSetSpecificDependencies(dependencies, testBinary.getTestSuite().getSources());
    return dependencies;
}
Also used : JvmBinarySpec(org.gradle.jvm.JvmBinarySpec) LibraryBinaryIdentifier(org.gradle.api.artifacts.component.LibraryBinaryIdentifier) DefaultLibraryBinaryIdentifier(org.gradle.internal.component.local.model.DefaultLibraryBinaryIdentifier) DependencySpec(org.gradle.platform.base.DependencySpec) DefaultLibraryBinaryDependencySpec(org.gradle.platform.base.internal.DefaultLibraryBinaryDependencySpec) JvmBinarySpecInternal(org.gradle.jvm.internal.JvmBinarySpecInternal)

Example 2 with JvmBinarySpec

use of org.gradle.jvm.JvmBinarySpec in project gradle by gradle.

the class JvmTestSuiteBinaryRenderer method renderDetails.

@Override
protected void renderDetails(T binary, TextReportBuilder builder) {
    JvmTestSuiteSpec testSuite = binary.getTestSuite();
    JvmComponentSpec testedComponent = testSuite.getTestedComponent();
    if (testedComponent != null) {
        builder.item("component under test", testedComponent.getDisplayName());
    }
    JvmBinarySpec testedBinary = binary.getTestedBinary();
    if (testedBinary != null) {
        builder.item("binary under test", testedBinary.getDisplayName());
    }
    super.renderDetails(binary, builder);
}
Also used : JvmTestSuiteSpec(org.gradle.jvm.test.JvmTestSuiteSpec) JvmBinarySpec(org.gradle.jvm.JvmBinarySpec) JvmComponentSpec(org.gradle.jvm.JvmComponentSpec)

Aggregations

JvmBinarySpec (org.gradle.jvm.JvmBinarySpec)2 LibraryBinaryIdentifier (org.gradle.api.artifacts.component.LibraryBinaryIdentifier)1 DefaultLibraryBinaryIdentifier (org.gradle.internal.component.local.model.DefaultLibraryBinaryIdentifier)1 JvmComponentSpec (org.gradle.jvm.JvmComponentSpec)1 JvmBinarySpecInternal (org.gradle.jvm.internal.JvmBinarySpecInternal)1 JvmTestSuiteSpec (org.gradle.jvm.test.JvmTestSuiteSpec)1 DependencySpec (org.gradle.platform.base.DependencySpec)1 DefaultLibraryBinaryDependencySpec (org.gradle.platform.base.internal.DefaultLibraryBinaryDependencySpec)1