Hi again,

Am 28.02.11 17:59, schrieb Graeme Rocher:
> One other note is that a contributing factor to the slowness is that
> the UP-TO-DATE check seems to fail for the javadoc generation
> (javadocs are always generated)
>
> Is there a way to get incremental build for the javadoc?
I had a look at the javadoc tasks in the grails build. By running a
gradle build using the -i option you can see in the info log, why a task
isn't skipped.
It seems, that the course of the slowlyness of the grails build is the
"grails.build.properties" files you create in your builds. This is
always updated with the new timestamp of the build.
This causes the several jar tasks and the javadoc tasks to be executed
again, since the input has changed. a new generated javadoc causes a new
generated javadoc jar and so on...

the following snippet seems to cause these problems:
---------
jar.doFirst {
    ant.mkdir(dir:sourceSets.main.classesDir)
   
ant.propertyfile(file:"${sourceSets.main.classesDir}/grails.build.properties")
{
        entry key:"grails.version", value:version
    }
}
---------

you may create this grails.build.properties file within the
processResources Task using gradles copyspec capabilities instead of
using ant.propertyfile.

regards,
René
> Cheers
>
> On Mon, Feb 28, 2011 at 4:33 PM, Graeme Rocher <[email protected]> wrote:
>> Hi,
>>
>> I'm trying to understand how skipping tasks works in a multi project
>> build scenario.
>>
>> In the Grails build I have defined two tasks to create the source and
>> javadoc distributions like so
>>
>>    task sourcesJar(type: Jar, dependsOn:classes) {
>>        classifier = 'sources'
>>        appendix = project.name[7..-1]
>>        from sourceSets.main.allSource
>>    }
>>
>>    task javadocJar(type: Jar, dependsOn:javadoc) {
>>        classifier = 'javadoc'
>>        appendix = project.name[7..-1]
>>        from javadoc.destinationDir
>>    }
>>
>> However this has added significant time to build each subproject since
>> the source and javadoc jars are built too
>>
>> Is there a way to skip subproject tasks? I have tried:
>>
>> gradle -x javadocJar -x sourcesJar assemble
>>
>> I have also tried:
>>
>> gradle -x *:javadocJar -x *:sourcesJar assemble
>>
>> But nothing seems to get skipped
>>
>> Thoughts?
>>
>> --
>> Graeme Rocher
>> Grails Project Lead
>> SpringSource - A Division of VMware
>> http://www.springsource.com
>>
>
>


-- 
------------------------------------
Rene Groeschke

[email protected]
http://www.breskeby.com
http://twitter.com/breskeby
------------------------------------


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

    http://xircles.codehaus.org/manage_email


Reply via email to