Project configuration order

(rburgst) #1

I have a fairly complicated multi project setup and the weird problem is that one of my sub projects gets configured before the root projects ‘allprojects’ closure executes. The result is that at the time where my project is configured the version is not yet set up (since it gets set in all projects).

I have tried to replicate this with a simpler build but failed to do so. Is there a way how to debug this problem?

(rburgst) #2

The best questions are the ones that you answer yourself just half an hour after you post them.

The reason for the weird execution order was that I specified a dependency in the root project above the allprojects closure which was kind of dumb. This was done in a somewhat hidden fashion by an unsuspecting

apply from: 'gradle-file-with-dependency.gradle'