当前位置: 首页>>代码示例>>Java>>正文


Java ConfigurableReport类代码示例

本文整理汇总了Java中org.gradle.api.reporting.ConfigurableReport的典型用法代码示例。如果您正苦于以下问题:Java ConfigurableReport类的具体用法?Java ConfigurableReport怎么用?Java ConfigurableReport使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ConfigurableReport类属于org.gradle.api.reporting包,在下文中一共展示了ConfigurableReport类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: JacocoReportsContainerImpl

import org.gradle.api.reporting.ConfigurableReport; //导入依赖的package包/类
public JacocoReportsContainerImpl(Task task) {
    super(ConfigurableReport.class, task);
    add(TaskGeneratedSingleDirectoryReport.class, "html", task, "index.html");
    add(TaskGeneratedSingleFileReport.class, "xml", task);
    add(TaskGeneratedSingleFileReport.class, "csv", task);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:7,代码来源:JacocoReportsContainerImpl.java

示例2: DefaultTestTaskReports

import org.gradle.api.reporting.ConfigurableReport; //导入依赖的package包/类
public DefaultTestTaskReports(Task task) {
    super(ConfigurableReport.class, task);

    add(DefaultJUnitXmlReport.class, "junitXml", task);
    add(TaskGeneratedSingleDirectoryReport.class, "html", task, "index.html");
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:7,代码来源:DefaultTestTaskReports.java

示例3: createUnitTestTask

import org.gradle.api.reporting.ConfigurableReport; //导入依赖的package包/类
private void createUnitTestTask(@NonNull TaskFactory tasks,
        @NonNull final TestVariantData variantData) {
    final BaseVariantData testedVariantData =
            (BaseVariantData) variantData.getTestedVariantData();

    final Test runTestsTask = project.getTasks().create(
            variantData.getScope().getTaskName(UNIT_TEST.getPrefix()),
            Test.class);
    runTestsTask.setGroup(JavaBasePlugin.VERIFICATION_GROUP);
    runTestsTask.setDescription(
            "Run unit tests for the " +
                    testedVariantData.getVariantConfiguration().getFullName() + " build.");

    fixTestTaskSources(runTestsTask);

    runTestsTask.dependsOn(variantData.assembleVariantTask);

    final AbstractCompile testCompileTask = variantData.javacTask;
    runTestsTask.setTestClassesDir(testCompileTask.getDestinationDir());

    ConventionMappingHelper.map(runTestsTask, "classpath",
            new Callable<ConfigurableFileCollection>() {
                @Override
                public ConfigurableFileCollection call() throws Exception {
                    Iterable<File> filteredBootClasspath = Iterables.filter(
                            androidBuilder.getBootClasspath(),
                            new Predicate<File>() {
                                @Override
                                public boolean apply(@Nullable File file) {
                                    return file != null &&
                                            !SdkConstants.FN_FRAMEWORK_LIBRARY
                                                    .equals(file.getName());
                                }
                            });

                    return project.files(
                            testCompileTask.getClasspath(),
                            testCompileTask.getOutputs().getFiles(),
                            variantData.processJavaResourcesTask.getOutputs(),
                            testedVariantData.processJavaResourcesTask.getOutputs(),
                            filteredBootClasspath,
                            // Mockable JAR is last, to make sure you can shadow the classes
                            // withdependencies.
                            createMockableJar.getOutputFile());
                }
            });

    // Put the variant name in the report path, so that different testing tasks don't
    // overwrite each other's reports.
    TestTaskReports testTaskReports = runTestsTask.getReports();

    for (ConfigurableReport report : new ConfigurableReport[] {
            testTaskReports.getJunitXml(), testTaskReports.getHtml()}) {
        report.setDestination(new File(report.getDestination(), testedVariantData.getName()));
    }

    tasks.named(JavaPlugin.TEST_TASK_NAME, new Action<Task>() {
        @Override
        public void execute(Task test) {
            test.dependsOn(runTestsTask);
        }

    });

    extension.getTestOptions().getUnitTests().applyConfiguration(runTestsTask);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:67,代码来源:TaskManager.java


注:本文中的org.gradle.api.reporting.ConfigurableReport类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。