Hi

I have found several time that I wish I could tell gradle that one
project depeneded on another gradle project, but not actually make
them part of the same multiproject. For example, I am developing a
library, say libA, and an application, say AppB. The application and
the library don't really make sense as a multiproject as they are very
separate entities, just that the application uses the library and I
happen to be the developer of both. When coding on the application, I
really want to use the lastest source for the library, instead of the
latest release so that I can improve both as I discover issues instead
of having to make a new "release" of the library every time for a new
feature to be used by the client. Of course, at some point the release
of the application would probably depend on the released version of
the library, but in the middle of the development cycle this doesn't
always make sense. The current way I do things is to have one
mega-miltuproject with everything project I have ever worked on
listed, so that I can choose what dependency graph I want. But this
seems wrong to me.

So, what I would like to do is instead of:
dependencies {
    compile project(':libA')
}

do
dependencies {
    compile project('file:../myOtherDev/libA')
}

and as long as there is a build.gradle in the ../myOtherDev/libA
directory, gradle will first build libA and use the resulting jar as
the dependency for building the application.

It might even be the case that libA is part of a multiproject and has
other gradle project dependencies.

This might also be a way to get away from settings.gradle, as what is
important is that gradle can find a dependency project relative to an
existing one rather then all the projects being listed in the setting
file.

One down side is that if the source code is given to another
developer, the relative directories would have to be maintained or
updated, but this seems reasonable to me.

One last idea would be to have a general URL instead of just a file,
perhaps allowing one project to depend on another that is in a public
web accessible version control system. Gradle could cache the source
of the dependency project and build it locally. That may be a little
ambitious a goal, but...

If this sounds like an idea worth considering, I'll open a jira issue.

thanks,
Philip

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

    http://xircles.codehaus.org/manage_email


Reply via email to