I'll have to ask around to find out how much I should show


hdockter wrote:
> 
> Hi Jerod,
> 
> could you send me a zip with a complete project setup reproducing  
> this problem?
> 
> - Hans
> 
> On Jun 5, 2008, at 5:09 PM, JerodLass wrote:
> 
>>
>> populateJars() returns absolute paths. Here is the method:
>>
>> List populateJars(){
>>     List jarList = []
>>     jarCount = 0
>>     root = projectDir
>>     root.eachFile {
>>              if(it.name =~ /\w+common/) {
>>                      new File(it, "lib").eachFile {
>>                                 jarList.add(it.getAbsolutePath())
>>                      }
>>              }
>>      }
>>     return jarList
>> }
>>
>> I threw some debugging statements in and got output like:
>> added c:\workspace\codecommon\commons-io.jar to classpath
>>
>> and made sure the project names that it added to were on point, but  
>> it still
>> compiled the source as if these jars are missing.
>>
>>
>>
>> hdockter wrote:
>>>
>>> Can there be a file path isssue or does populateJars return absolute
>>> paths?
>>>
>>> - Hans
>>>
>>> On Jun 5, 2008, at 3:36 PM, JerodLass wrote:
>>>
>>>>
>>>> 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
>>>>
>>>>
>>>
>>> --
>>> 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--tp17650512p17672148.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--tp17650512p17677115.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