本文整理汇总了Java中org.gradle.jvm.test.JvmTestSuiteSpec类的典型用法代码示例。如果您正苦于以下问题:Java JvmTestSuiteSpec类的具体用法?Java JvmTestSuiteSpec怎么用?Java JvmTestSuiteSpec使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JvmTestSuiteSpec类属于org.gradle.jvm.test包,在下文中一共展示了JvmTestSuiteSpec类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createJvmTestSuiteBinaries
import org.gradle.jvm.test.JvmTestSuiteSpec; //导入依赖的package包/类
/**
* Create binaries for test suites. TODO: This should really be a @ComponentBinaries rule, but at this point we have no clue what the concrete binary type is, so everything has to be duplicated in
* specific plugins. See usages for example.
*/
public static void createJvmTestSuiteBinaries(ModelMap<BinarySpec> testBinaries,
PlatformResolvers platformResolver,
JvmTestSuiteSpec testSuite,
JavaToolChainRegistry toolChains,
Class<? extends JvmTestSuiteBinarySpec> testSuiteBinary) {
JvmComponentSpec testedComponent = testSuite.getTestedComponent();
if (testedComponent == null) {
// standalone test suite
createJvmTestSuiteBinary(testBinaries, testSuiteBinary, testSuite, null, toolChains, platformResolver);
} else {
// component under test
for (final JvmBinarySpec testedBinary : testedBinariesOf(testSuite)) {
createJvmTestSuiteBinary(testBinaries, testSuiteBinary, testSuite, testedBinary, toolChains, platformResolver);
}
}
}
示例2: renderDetails
import org.gradle.jvm.test.JvmTestSuiteSpec; //导入依赖的package包/类
@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);
}
示例3: namingSchemeFor
import org.gradle.jvm.test.JvmTestSuiteSpec; //导入依赖的package包/类
private static BinaryNamingScheme namingSchemeFor(JvmTestSuiteSpec testSuiteSpec, JvmBinarySpec testedBinary, List<JavaPlatform> selectedPlatforms, JavaPlatform platform) {
BinaryNamingScheme namingScheme = DefaultBinaryNamingScheme.component(testSuiteSpec.getName())
.withBinaryType("binary") // not a 'Jar', not a 'test'
.withRole("assembly", true)
.withVariantDimension(platform, selectedPlatforms);
if (testedBinary != null) {
return namingScheme.withVariantDimension(((BinarySpecInternal) testedBinary).getProjectScopedName());
}
return namingScheme;
}
示例4: createJvmTestSuiteBinaries
import org.gradle.jvm.test.JvmTestSuiteSpec; //导入依赖的package包/类
@ComponentBinaries
public static void createJvmTestSuiteBinaries(ModelMap<BinarySpec> testBinaries,
PlatformResolvers platformResolver,
JvmTestSuiteSpec testSuite,
JavaToolChainRegistry toolChains) {
JvmTestSuiteRules.createJvmTestSuiteBinaries(testBinaries, platformResolver, testSuite, toolChains, JUnitTestSuiteBinarySpec.class);
}
示例5: testedBinariesOf
import org.gradle.jvm.test.JvmTestSuiteSpec; //导入依赖的package包/类
private static Collection<JvmBinarySpec> testedBinariesOf(JvmTestSuiteSpec testSuite) {
return testedBinariesWithType(JvmBinarySpec.class, testSuite);
}
示例6: testedBinariesWithType
import org.gradle.jvm.test.JvmTestSuiteSpec; //导入依赖的package包/类
private static <S> Collection<S> testedBinariesWithType(Class<S> type, JvmTestSuiteSpec testSuite) {
VariantComponentSpec spec = (VariantComponentSpec) testSuite.getTestedComponent();
return spec.getBinaries().withType(type).values();
}
示例7: addTestSuiteSourceSets
import org.gradle.jvm.test.JvmTestSuiteSpec; //导入依赖的package包/类
@Defaults
public void addTestSuiteSourceSets(@Each JvmTestSuiteSpec component) {
component.getSources().create("clojure", ClojureSourceSet.class);
}