On 28/10/2010, at 9:51 AM, Roger Studner wrote:

> So.. I have this all mostly working.. amazing really.. so much great magic.
> 
> one things i'm trying to do is this:
> 
> mainlevel/
>   webapp/
>     ui/
>     app/
> 
> So the "app" is the war.. all the spring controllers etc etc... 
> 
> The UI component, literally is just HTML/CSS/JS... 
> 
> The reason im trying to break them apart, is to make it "obvious" that this 
> is one of many UI impls.. 
> 
> So.. the question..
> 
> I have apply plugin: 'war' on the app/build.gradle
> 
> How can I get that, to "pull over" everything in the current ui..
> 
> do I make:
> 
> ui/js
> ui/css
> ui/html
> 
> and then magically issue some type of copy command ala:
> 
> app/build.gradle:
> 
> war << {
>  //something here.. type of copy task
> }

The War task works the same way as the Copy task, so you can just use the 
from() method to include files in the war. Something like this:

war {
    from project(':ui').file('src')
    // or even just: from '../ui/src'
}


--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz

Reply via email to