[GRADLE-479] Alphabetical projects execution order in multi-project build Created: 14/May/09  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: 0.5.2
Fix Version/s: None

Type: Improvement
Reporter: Uldis Karlovs-Karlovskis Assignee: Unassigned
Resolution: Won't Fix Votes: 11

Attachments: Text File SubProjectOrderListener.txt    

 Description   

On May 7, 2009, at 4:56 PM, Narco wrote:

>
> Hello!
>
> Imo it is confusing that sub-projects are executed in alphabetical
> order. It
> would be nice to run them simply in order which they are defined after
> include statement if no other project dependency rules exists. What
> do You
> think?

We have discussed something similar in regard to dependsOn relations
between tasks. We came to the conclusion that things can become messy
and hard to comprehend if we consider the order of declaration.
Probably the same reasoning applies to projects.

You may file a Jira issue so that we don't forget to discuss project
ordering for 0.7.

Thanks

  • Hans


 Comments   
Comment by Peter Voss [ 04/Nov/09 ]

There is also a mailing list thread for this: http://old.nabble.com/Controlling-execution-order-in-multiproject-build-td26170477.html

Comment by Erik Vonderheid [ 22/Apr/13 ]

A small remark why I would need this:

My company is currently in the process of upgrading the build infrastructure. For this we would like to move from Luntbuild to another CI server, CVS -> another VCS and maybe from Ant to another build tool too.

I was curious to see if I could reuse the exisiting Ant scripts using gradle. Basically the Ant build iterates through a list of modules (side-by-side) and executes a "distribute" target. The order of the module list is important (dependent projects come later in the list).

When I configured a multi-project build with the modules as sub-projects I was able to execute the distribute target for each subproject but since the execution order was alphanumeric the compilation of a module failed.

Comment by Sebastian Lösch [ 18/Jul/13 ]

Are there any plans to implement this in a future version?
I would suggest as well to use the order that is given in the settings.gradle file.

Comment by Adam Murdoch [ 18/Jul/13 ]

We're very unlikely to implement this. Instead, you should look at the task ordering rules that were added in 1.6 and 1.7. If they don't do what you need, or if they are awkward in some way for your use case, let us know and we can look at improving them.

Comment by Sebastian Lösch [ 19/Jul/13 ]

Thanks for pointing me to the task ordering rules.

I managed to write a custom ProjectEvaluationListener that does the job. Well, at the moment it's just a naive implementation.
Perhaps the distribution can offer a reviewed smarter version of this approach?

I attached the code snippet as file SubProjectOrderListener.txt.

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

Generated at Wed Jun 30 11:31:09 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.