I have two projects[a,b] and i want them to build project [A] first before project [B].
But, if i give as
project(':B'){
dependsOn(':A:compile')
}
i am getting the below error: The Project.dependsOn(String path) method has been deprecated and is scheduled to be removed in Gradle 2.0. Can you please let me know, how to do it.
You likely want a project dependency from B on A. For details, see the multi-project builds chapter in the Gradle User Guide, and the many samples in the full Gradle distribution.
In that, they have mentioned project dependencies on a task.
Not sure what you mean by that.
I want project B to be compiled and built only after project A.
Why do you want that? In Gradle, projects aren’t built one after another. Instead, ordering happens on the task level. And to get the right task ordering, you’ll have to add a project dependency.
In settings.xml, even though i add as
I assume you mean ‘settings.gradle’.
It is building [B] first.
The order of 'include’s in ‘settings.gradle’ is irrelevant.
I read the turorial that you have sent, and i implemented as below and getting the error
As you said earlier, ‘The order of includes in settings.gradle is irrelevant.’ . I wanted to order the list of projects. I read the turorial that you have sent, i have tried the below:
project(’:B) {
dependencies {
compile project(’:A’) }
But, i am getting the below error: tting the below error:
The Project.dependsOn(String path) method has been deprecated and is scheduled to be removed in Gradle 2.0.