我有以下内容:
// File: build.gradle
subprojects {
test {
final testRatioOfWaitTimeToComputeTime = System.getProperty('test.ratio-of-wait-time-to-compute-time', '1') as int
final testMaxParallelForks = (System.getProperty('test.max-parallel-forks') as Integer) ?: numberOfForks(testRatioOfWaitTimeToComputeTime)
maxParallelForks testMaxParallelForks
}
}
我将如何:
- 为一个
test.ratio-of-wait-time-to-compute-time
特定的子项目指定默认值?test.max-parallel-forks
- 为一个
test.ratio-of-wait-time-to-compute-time
特定的子项目指定一个命令行覆盖?test.max-parallel-forks
我尝试了各种组合-P
和组合,-D
无论是否在属性前加上子项目名称(例如:sub-project:test.ratio-of-wait-time-to-compute-time
)。