On 24/02/2011, at 6:20 PM, Jesper Skov wrote:
> On Wed, Feb 23, 2011 at 4:50 PM, Jesper Skov <[email protected]>
> wrote:
> My code - that works - looks like this:
>
> After going home last night, I realized why this is working; the "2nd" level
> buildscripts are already located at the absolute path provided to the
> buildscript.dependencies.
> So it works because all dependencies are loaded in one pass (also explaining
> why the //FAILS alternative does not work)
>
> I was mistakenly hoping that the first apply would activate the bootstrap
> plugin before the next block of buildscript.dependencies was resolved. Which
> is obviouosly not how things work.
We might change things at some point so that it is possible to have multiple
bootstrap steps for a project. Here's how it might look:
We want to change project configuration so that it is implemented using regular
tasks. By default there will be 2 tasks for each project: a bootstrap task
which evaluates the buildscript { } closures to set up the script classpath,
and a configure task which actually executes the script. You would add an extra
bootstrap step simply by adding a custom task which does the bootstrap, and
having the project configure task depend on your custom task. There are lots of
interesting things which would become easy to implement with this approach.
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com