作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Gradle jettyRun任务具有守护程序属性,我在启动应用程序时希望为false,但当我将其作为接受测试(fastend2end)任务的依赖项时为true。
task fastend2end(type: Test, dependsOn: jettyRun) {
description = "Runs the end to end tests"
testClassesDir = sourceSets.end2end.classesDir
classpath = sourceSets.end2end.runtimeClasspath
}
最佳答案
您不能直接这样做。但是,如果fastend2end任务在您的执行图中,则可以使用以下代码段设置daemon属性:
gradle.taskGraph.whenReady {graph ->
if (graph.hasTask(fastend2end)) {
jettyRun.daemon = true
}
}
关于gradle - 如何将属性传递给依赖项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6299077/
我是一名优秀的程序员,十分优秀!