buildscript {
    repositories {
        mavenCentral()

mavenRepo(urls:'http://google-gson.googlecode.com/svn/mavenrepo')
    }
    dependencies {
        classpath('com.google.code.gson:gson:1.4')
    }
}

On Sat, 2010-06-19 at 21:14 -0600, Jason Porter wrote:
> You need to add it to the classpath for the build script. The syntax  
> escapes me atm, but I know it's been in recent emails. Perhaps Adam or  
> others could chime in.
> 
> Sent from my iPhone
> 
> On Jun 19, 2010, at 17:24, saltnlight5 <[email protected]> wrote:
> 
> >
> > Hi,
> >
> > I have the following simple build script, but it failed on the  
> > "testGson"
> > task with "unable to resolve class com.google.gson.Gson" error:
> >
> >
> > apply(plugin:'java')
> > repositories {
> >  mavenCentral()
> >  mavenRepo(urls:'http://google-gson.googlecode.com/svn/mavenrepo')
> > }
> > dependencies {
> >  compile([
> >    'com.google.code.gson:gson:1.4'
> >  ])
> > }
> >
> > task testGson << {
> >  gson = new com.google.gson.Gson()
> >  map = [a:'aaa',i:123,o:new Object()]
> >  println(gson.toJson(map))
> > }
> >
> >
> > So my question is, how do I make those depedencies accessible in a  
> > task
> > itself?
> >
> > Thanks,
> > Zemian
> >
> >
> > -----
> > ----
> > Zemian Deng
> > -- 
> > View this message in context: 
> > http://old.nabble.com/How-to-use-dependecies-within-build-script-in-a-custom-task--tp28937827p28937827.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
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 

-- 
Steve Ebersole <[email protected]>
http://hibernate.org


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to