Is there something I'm doing wrong?  The code I currently have in the
toplevel gradlefile is:


//List jars = populateJars()
allprojects{

    compile.unmanagedClasspath(populateJars())
    //compile.unmanagedClasspath(jars)

    dependencies{
        addMavenRepo()
    }

}

where populateJars() is a method in the same gradlefile that populates and
returns a List object of all jars in the common code directory.  This method
works if placed in the individual gradlefiles with the same
unmanagedClasspath code.  I also tried the commented-out portion and
achieved the same result.  Does the compile.unmanagedClasspath change when
accessed from a higher-level project?


hdockter wrote:
> 
> 
> On Jun 4, 2008, at 6:14 PM, JerodLass wrote:
> 
>>
>> I have a groovy method that I use in my gradlefile to add a bunch  
>> of .jars to
>> the unmanagedClasspath.  Is there a way for the top-level project  
>> to call it
>> to add these .jars (which are needed by more or less every  
>> subproject) to
>> the classpaths of all subprojects?  This would allow me to cut the  
>> number of
>> lines of every subproject's gradlefile almost in half.  If I just  
>> call it
>> from the top-level gradlefile, the subprojects have trouble finding  
>> the
>> .jars.  Thanks.
> 
> In the toplevel gradlefile you can type:
> 
> allprojects {
>      compile.unmanagedClasspath('x.jar', 'y.jar')
> }
> 
> See user's guide section 13.1 and 13.2 for more details.
> 
> - Hans
> 
>>
>> -Jerod
>> -- 
>> View this message in context: http://www.nabble.com/gradlefile- 
>> cleaning--tp17650512p17650512.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
>>
>>
> 
> --
> Hans Dockter
> Gradle Project lead
> http://www.gradle.org
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/gradlefile-cleaning--tp17650512p17669975.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


Reply via email to