Thanks!  That is exactly what I need.

I really like what I see so far (6 hours trying to convert our old build
system) with gradle and look forward to using it.  Gradle is actually (once
I get what you suggested below working) a very easy tool to use.  Replacing
our current custom build process (very complex ant scripts) with gradle is
going to give us a much more manageable/repeatable process.  We've been
wanting to migrate to Ivy for a while now; but have dreaded having to
retrofit a lot of our build scripts to use ivy.  Gradle came along at the
right time and we are making a clean break and redoing our build process.

Chris....


hdockter wrote:
> 
> 
> On May 11, 2008, at 8:50 AM, Hans Dockter wrote:
> 
>> Hi Chris,
>>
>> On May 10, 2008, at 12:49 AM, chrishane wrote:
>>>
>>> Is it possible to have an includes/excludes directive on the  
>>> compile task?
>>>
>>> I am building a java project and our current build scripts compile  
>>> specific
>>> directories for specific build targets.  Until I can refactor the  
>>> directory
>>> structure, I need to compile only certain directories.
>>
>> I have been surprised myself when I discovered that the Gradle  
>> Compile task does not offer this.
>>
>> On the other hand it is a good showcase that Gradle doesn't lock  
>> you in. If Gradle where just a big framework you might had to wait  
>> for the next release to get this feature. But as Gradle's build by  
>> convention behavior is build upon a general purpose build DSL there  
>> is a work around.
>>
>> compile.actions[0] = {    ant {        mkdir(dir:  
>> classesDir)        javac(includeAntRuntime: false,                 
>> srcdir: srcDirs.join(':'),                destdir:  
>> classesDir,                classpath: dependencies.antpath 
>> ('compile'),                target:  
>> targetCompatibility,                source:  
>> sourceCompatibility,                includes: 'org/gradle/ 
>> webapp1/')    }}
> 
> Apple Mail does not handle new lines properly when I paste code  
> snippets from Eclipse or IntelliJ. Pasting it first to TextEdit is at  
> least a solution. Here a readable version:
> 
> compile.actions[0] = {
>      ant {
>          mkdir(dir: classesDir)
>          javac(includeAntRuntime: false,
>                  srcdir: srcDirs.join(':'),
>                  destdir: classesDir,
>                  classpath: dependencies.antpath('compile'),
>                  target: targetCompatibility,
>                  source: sourceCompatibility,
>                  includes: 'org/gradle/webapp1/')
>      }
> }
> 
> - Hans
> 
>>
>> This replaces the build in compile behavior with something that  
>> solves your problem. We simply use the javac ant task and feed it  
>> with the project properties. Additionally we use javac's includes  
>> property to filter packages or whatever we want to filter. There is  
>> also an excludes property available.
>> We are not saying this is very convenient but not less convenient  
>> compared to an ant build.
>> I have filed an issue for this: http://jira.codehaus.org/browse/ 
>> GRADLE-89
>> This is going to be fixed in the next release.
>> - Hans
>>
>>>
>>> Thanks,
>>> Chris....
>>> -- 
>>> View this message in context: http://www.nabble.com/Compile- 
>>> Inculde-Exclude-tp17157729p17157729.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
>>
>>
>>
>>
> 
> --
> Hans Dockter
> Gradle Project lead
> http://www.gradle.org
> 
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Compile-Inculde-Exclude-tp17157729p17189439.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