本文整理了Java中org.gradle.api.tasks.testing.Test.getSystemProperties()
方法的一些代码示例,展示了Test.getSystemProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Test.getSystemProperties()
方法的具体详情如下:
包路径:org.gradle.api.tasks.testing.Test
类名称: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");
}
内容来源于网络,如有侵权,请联系作者删除!