Wrong reference to 'project' in multi-build

View: New views
2 Messages — Rating Filter:   Alert me  

Wrong reference to 'project' in multi-build

by Rafael Serrano :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I'm currently trying to simplify the build process of several projects by combining them into a single gradle multi-project build. In general everything works like a charm, I can keep my flat-layout and the resulting build files are amazingly simpler and shorter than my previous ANT files.

However, I'm running into troubles with those tasks declared in my 'master' project under subproject { ... }. The root of all these problems seems to be the loss of the reference to 'project' which is always set to the last referenced project in 'settings.gradle'.

I've attached you a sample build file that shows this (just create the directories 'project1', 'project2' and 'master', copy these files into 'master' and run 'gradle info'):
build.gradle
settings.gradle

Thanks in advance
Rafa

PS: I know I can always find a workaround using 'delegate' or 'task.project' like I've done in the file I've uploaded, but it's quite easy to make a mistake.



Re : [gradle-user] Wrong reference to 'project' in multi-build

by Steven Devijver-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hey Rafa,

This seems to be the same issue as I've reported earlier:


Steven


De : Rafael Serrano <rserrano@...>
À : user@...
Envoyé le : Jeu 15 Octobre 2009, 18 h 01 min 56 s
Objet : [gradle-user] Wrong reference to 'project' in multi-build


Hi all,

I'm currently trying to simplify the build process of several projects by
combining them into a single gradle multi-project build. In general
everything works like a charm, I can keep my flat-layout and the resulting
build files are amazingly simpler and shorter than my previous ANT files.

However, I'm running into troubles with those tasks declared in my 'master'
project under subproject { ... }. The root of all these problems seems to be
the loss of the reference to 'project' which is always set to the last
referenced project in 'settings.gradle'.

I've attached you a sample build file that shows this (just create the
directories 'project1', 'project2' and 'master', copy these files into
'master' and run 'gradle info'):
http://www.nabble.com/file/p25911294/build.gradle build.gradle
http://www.nabble.com/file/p25911294/settings.gradle settings.gradle

Thanks in advance
Rafa

PS: I know I can always find a workaround using 'delegate' or 'task.project'
like I've done in the file I've uploaded, but it's quite easy to make a
mistake.



--
View this message in context: http://www.nabble.com/Wrong-reference-to-%27project%27-in-multi-build-tp25911294p25911294.html
Sent from the gradle-user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email