How can I build a plugin that depends on a resolved resource?

I can’t figure out how to invoke dependency resolving and I can’t figure out where the dependency’s get resolved and stored at. I want to resolve a jar and that my plugin will rely on, whats the procedure for this. Also, is there a task that will only resolve my dependencies?

I think I may have found half of the answer here: http://www.gradle.org/releases/0.8/docs/userguide/organizing_build_logic.html#sec:external_dependencies

I’m still not sure where the dependencies are stored on the machine, which I’d like to know to erase some magic.

Also, what is the procedure when building a plugin that has an external dependency (package the dependency with the plugin, or tell users to add the dependency to their build script, or something else)?

I can’t figure out how to invoke dependency resolving and I can’t figure out where the dependency’s get resolved and stored at.

Configurations are resolved on-the-fly when needed, e.g. when you iterate over them. Artifacts are stored in ~/.gradle/caches/artifacts-x/.

I want to resolve a jar and that my plugin will rely on, whats the procedure for this.

Add the dependency to a configuration and iterate over the configuration (or call ‘resolve()’).

Also, what is the procedure when building a plugin that has an external dependency (package the dependency with the plugin, or tell users to add the dependency to their build script, or something else)?

Typically you publish a pom.xml or ivy.xml along with your plugin and transitive dependency management takes care of the rest.