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


Reply via email to