Hello Gradle developers
I am woking with a Spring/Gradle multi-module project:
To run a test for a specific module I have the following:
project(':web-27-repository-jdbc') {
description 'Repository JDBC'
dependencies {
compile project(':web-27-repository-api')
testCompile project(':web-27-config')
testRuntime project(':web-27-config')
}
}
Note: It works.
My confusion is about the following:
According with:
7.3. Dependency configurations
it says:
testRuntime
The dependencies required to run the tests. By default, also includes the compile, runtime and test compile dependencies.
Check the second part:
By default, also includes the compile, runtime and test compile dependencies
It says testRuntime
includes compile, runtime
and testCompile
Therefore I am assuming that:
dependencies {
compile project(':web-27-repository-api')
testCompile project(':web-27-config')
testRuntime project(':web-27-config')
}
is the same than (it assuming that testRuntime
includes testCompile
- it according with the explanation shown above):
dependencies {
compile project(':web-27-repository-api')
//testCompile project(':web-27-config')
testRuntime project(':web-27-config')
}
But not. I must declare two lines.
Until here
Question 01: What does really mean/refer the explanation?
I must assume that the explanation aims to other point. But what?
Even more when in:
45.5. Dependency management
the table shown that testRuntime
extends runtime
and testRuntime
Assuming that both lines are mandatory
testCompile project(':web-27-config')
testRuntime project(':web-27-config')
Question 02:
Is possible declare
testCompile project(':web-27-config')
testRuntime project(':web-27-config')
in just one line? something like (the following is not valid):
testCompile,testRuntime project(':web-27-config')
Thanks in advance