On Wed, Jan 20, 2010 at 12:53 PM, MartyMcFly <[email protected]>wrote:

>
> Thanks for the logging hint...
>
> if this is intentional ? honestly - no idea... its from the userguide or
> the
> internet... I'm just trying to get the right syntax.
>
> usePlugin 'java'
>
> sourceSets.main.srcDir = new File(buildDir, 'src')
>

Where does your source live? The above _adds_ a srcDir to the ones already
added by the Java plugin. The added srcDir looks in build/src for sources.

Have also a look at:
http://gradle.org/0.8/docs/userguide/java_plugin.html#sec:source_sets


>  sourceSets.main.classesDir = new File(buildDir, 'classes')
>
> so the compilation works - it does compile... but it compiles to
> build/classes and I wanted to compile it to classes... so it ignores the
> second entry.
>
> Is there no way of changing it ?
>

There is a way:

sourceSets.main.classesDir = new File(projectDir, 'classes')

alternatively

sourceSets.main.classesDir = file('classes') // Which returns a file
relative to project root.

- Hans

--
Hans Dockter
Founder, Gradle
http://www.gradle.org, http://twitter.com/gradleorg
CEO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz


> Thanks for the fast help here... cool
>
>
>
> levi_h wrote:
> >
> > Hi Marty,
> >
> > On Wed, Jan 20, 2010 at 12:30 PM, MartyMcFly
> > <[email protected]>wrote:
> >
> >>
> >> sourceSets.main.srcDir = new File(buildDir, 'src')
> >>
> >
> > Is this intentional?
> >
> >   Levi
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Failing-on-simple-script-tp27240252p27240548.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