I have not tried this yet in terms of building a release (so I do not
know how it plays out in the generated poms). But here is an example of
how I specify it in my Hibernate-gradle prototype (props to Hans, Jason,
and Adam for helping me discover this):
dependencies {
compile (
this.project(':hibernate-core').sourceSets.main.runtimeClasspath,
[group: 'junit', name: 'junit', version: junitVersion]
)
}
On Thu, 2010-02-04 at 07:06 -0800, merscwog wrote:
>
> MartyMcFly wrote:
> >
> > It directly converts dependencies in your workspace to project
> > dependencies if these projects exists. If the project does not exists, it
> > uses the jar from the repo.
> >
> > I was wondering if this behaviour is cloneable in gradle with the concept
> > of configurations.
> >
>
> This is a very powerful concept, and I've wondered whether gradle would
> support it eventually.
>
> There are some issues to consider, but if it really is an accepted idiom,
> then it is worthy of consideration. Ideally there would be some way to
> specify a dependency as a regular project() like now that says, I need it
> available locally for things to work, and a remotableProject() that tries to
> find it locally, but digs up things in a repository otherwise.
>
> Along a similar vein, I was hoping at some point for there to be
> optionalProject() or optionalDependency() that says to include it in the
> dependencies it if it can find it, and set some variable that can be used to
> determine things like conditional compilation (exclusion usually) or other
> behavior.
>
> -Spencer
>
> -Spencer
--
Steve Ebersole <[email protected]>
Hibernate.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email