Search in sources :

Example 1 with JvmBinarySpecInternal

use of org.gradle.jvm.internal.JvmBinarySpecInternal 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)

Aggregations

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