On Mon, Feb 28, 2011 at 10:57 PM, Russel Winder <[email protected]> wrote: > The JSR 166 source tree has some non-Maven-standard features. easily > handled in Ant, and it should be just as easy in Gradle. However . . . > > The source hierarchy is structured like: > > src > ├── extra166y > ├── jsr166x > ├── jsr166y > ├── main > │ ├── java > │ │ └── util > └── test > ├── extra166y > └── tck > > there is more but this is the important structure. The main is actually > Maven 1 structuring since the java is the name of the package java.util. > Using: > > sourceSets { main { java { srcDir '../src/main' } } } > > in the :jsr166 project works fine. However the jsr166y project always > recompiles using: > > sourceSets { main { java { srcDir '../src/jsr166y' } } }
When you declare the project 'jsr166y' in settings.gradle, and later use it as project( ':jsr166y'), Gradle assumes a directory path of './jsr166y' and hence you need the ".." in "../src/jsr166y" to get to the right location. The main project is relative to the settings.gradle file, and I think you should drop the "..". Besides, how come you don't need to specify "../src/main/java" ?? And for the main project, you shouldn't need it at all, as src/main/java is the default. Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/3xugrbk I work here; http://tinyurl.com/24svnvk I relax here; http://tinyurl.com/2cgsug --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
