[ 
https://issues.apache.org/jira/browse/OFBIZ-7749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15379974#comment-15379974
 ] 

Taher Alkhateeb commented on OFBIZ-7749:
----------------------------------------

Hi Pierre,

In reply to your comments:

The two functions are exactly the same and that is why they have the same name. 
They do exactly the same thing, but we cannot write them only once (or maybe we 
there is a workaround in that I'm unaware of yet, feel free to help us).

The reason why we cannot is that Gradle runs in three stages, Initialization, 
Configuration, and Execution. The initialization stage is different from the 
other stages and cannot reuse code. So build.gradle is not visible to 
settings.gradle and vice-versa because they are parsed in different time-lines.

In most projects this does not happen, but because of the complexity and 
non-standard directory structure in OFBiz, we needed that same bit of code in 
both the initialization phase (to create the subprojects) and in the other 
phases for everything else.

I hope this answers your inquiries.

> iterateOverActiveComponents exists twice
> ----------------------------------------
>
>                 Key: OFBIZ-7749
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-7749
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Pierre Smits
>            Assignee: Jacques Le Roux
>              Labels: gradle
>
> Currently the iterateOverActiveComponents function or tasks exists both in 
> build.gradle and settings.gradle.
> Do we need both? Which one is superfluous?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to