On 22/06/2011, at 9:23 AM, phil swenson wrote:

> this is the setUp() method in my testcase.
> 
> public void setUp() {
>        project = org.gradle.testfixtures.ProjectBuilder.builder().build()
>        plugin = new L10NPlugin()
>        project.apply plugin: 'bas-l10n'
>        project.apply plugin: 'bas-java'
>        pluginConvention = project.convention.plugins.l10n as
> L10NPluginConvention
>        project.l10n {
>            projectId = testProject
>            resourceOutputFileName = testResourceOutputFileName
>        }
>    }
> 
> 
> My bas-l10n plugin does a project.afterEvaluate call like:
> 
> project.afterEvaluate {
>            setupArchivesTask(project, l10nConvention)
>  }
> 
> Does anyone know why the afterEvaluate method doesn't execute in my testcase?


The solution is to call project.evaluate(). This will fire any evaluation 
lifecycle hooks that you have registered.

You don't see this in the API docs for Project because it is actually an 
internal method and is therefore potentially subject to change in future 
releases. There will be a supported mechanism for doing this kind of thing in 
the near future.

-- 
Luke Daley
Principal Engineer, Gradleware 
http://gradleware.com

Please vote Gradle for JAX Awards ยป http://vote.jax-awards.com




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

    http://xircles.codehaus.org/manage_email


Reply via email to