sourceSets.main.java.srcDirs = ['src']
Note that I'm assigning srcDirs, and not referencing srcDir. That replaces
whatever set is there, rather than appending to it.
-Spencer
René Gröschke wrote:
>
> Hi there,
> In my JavaPlugin based build file I have a custom compile task which
> does aspectJ compiliation. So far it works fine. Today I tried to make
> it a bit more reusable by replacing the hardcoded "sourceroots" property
> of ant.iajc with sourceSets. In projects which are using the default
> Java layout it works fine. but when I tried this build file with a
> sourceSet like this:
>
>
> sourceSets {
> main {
> java {
> srcDir 'src'
> }
> resources {
> srcDir 'src'
> }
> }
> }
>
> I got the folloing error:
> [ant:iajc] [error] build config error: bad sourceroot:
> /Users/Rene/workspaces/joccis/complete/Morph/src/main/java
>
>
> Debugging shows that instead of having one directory in
> sourceSets.main.java, it contains two directories (src/main/java and src)?
>
> how did I replace the src/main/java path by src instead of just adding
> the second to the sourceSet?
>
> regards,
> René
>
>
>
> --
> ------------------------------------
> Rene Groeschke
>
> [email protected]
> http://www.breskeby.com
> ------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
>
--
View this message in context:
http://old.nabble.com/problems-while-replacing-default-sourceSet-layout-tp27299287p27307959.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