org.gradle.api.tasks.testing.Test.getSystemProperties()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(160)

本文整理了Java中org.gradle.api.tasks.testing.Test.getSystemProperties()方法的一些代码示例,展示了Test.getSystemProperties()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Test.getSystemProperties()方法的具体详情如下:
包路径:org.gradle.api.tasks.testing.Test
类名称:Test
方法名:getSystemProperties

Test.getSystemProperties介绍

暂无

代码示例

代码示例来源:origin: gradle.plugin.de.monkeyworks.buildmonkey/gradle.pde

javaExecHandleBuilder.setSystemProperties(testTask.getSystemProperties());
javaExecHandleBuilder.setEnvironment(testTask.getEnvironment());

代码示例来源:origin: Putnami/putnami-gradle-plugin

private void includeSourcesForTest(Project project) {
  JavaPluginConvention javaConvention = project.getConvention().getPlugin(JavaPluginConvention.class);
  SourceSet mainSourset = javaConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
  SourceSet testSourset = javaConvention.getSourceSets().getByName(SourceSet.TEST_SOURCE_SET_NAME);
  FileCollection testClasspath = project
    .files(mainSourset.getAllSource().getSrcDirs().toArray())
    .plus(project.files(testSourset.getAllSource().getSrcDirs().toArray()))
    .plus(testSourset.getRuntimeClasspath());
  testSourset.setRuntimeClasspath(testClasspath);
  Test test = project.getTasks().withType(Test.class).getByName("test");
  test.getSystemProperties().put("gwt.persistentunitcachedir", project.getBuildDir() + "/putnami/test");
}

代码示例来源:origin: gradle.plugin.de.esoco.gwt/gwt-gradle-plugin

private void includeSourcesForTest(Project project) {
  JavaPluginConvention javaConvention = project.getConvention()
                         .getPlugin(JavaPluginConvention.class);
  SourceSet mainSourset = javaConvention.getSourceSets()
                     .getByName(SourceSet.MAIN_SOURCE_SET_NAME);
  SourceSet testSourset = javaConvention.getSourceSets()
                     .getByName(SourceSet.TEST_SOURCE_SET_NAME);
  FileCollection testClasspath = project.files(mainSourset.getAllSource()
                         .getSrcDirs().toArray())
                     .plus(project.files(testSourset
                               .getAllSource()
                               .getSrcDirs()
                               .toArray()))
                     .plus(testSourset
                        .getRuntimeClasspath());
  testSourset.setRuntimeClasspath(testClasspath);
  Test test = project.getTasks().withType(Test.class).getByName("test");
  test.getSystemProperties()
    .put("gwt.persistentunitcachedir",
       project.getBuildDir() + GwtExtension.DIRECTORY + "/test");
}

相关文章