> adding a project dependency seems not enough (at least on STS, where it
> always gets automatically discarded when I refresh gradle deps).

Oups :)

> But to further elaborate on your suggestion, maybe at the state of the art
> we could add a somewhat shared flatDir repo before the usual one and use it
> for upload of local artifacts and for deps resolution (your higher priority)
> on consumer project.
>
> i.e.
> repositories {
>    flatDir(name: 'fileRepo', dirs: "$projectDir/../repo") // flat dir repo
> "shared" at the upper level
>    ... // usual private maven repo
> }
> ...
> uploadArchives {
>    repositories {
>        add project.repositories.fileRepo //
>        ... //usual private maven repo
>    }
> ...
>
> Is it right?
> This way we can't take advantage of the build on save (using it on demand
> would be a great enhancement) but at least we keep our changes local.

I guess it is a possible approach given the current state of Gradle.
However, I'm not sure if I like that. The reason I want to have a
project dependency inside the IDE is that the changes are picked up
immediately. If I need to run 'gradle assemble' for the dependency
project to work with the latest changes I can as easily run 'gradle
install' (provided I use maven plugin and use mavenLocal() to share
intra-project dependencies). But then we're back at the starting point
of the discussion.

> We also have the same use case to allow working on the subset of projects in
> a big multi-module project. Could you tell me a bit more about your plans to
> make it easy to toggle binary dependency with a project dependency?

Not sure what specifically would you like to know :) Consider a large,
hierarchical project consisting of 50+ modules. It should be easy  to
check out / work with / build only the selected subproject(s). This
may mean the 'project dependencies' are satisfied via some repo
instead of being a part of a multi-module build run.

Cheers!

>
> Cheers
> Davide
>
>
> Szczepan Faber wrote:
>>
>> Hey,
>>
>> Interesting idea. I guess the main use case is when you work with the
>> IDE and you want take advantage of the build on save (eclipse) or
>> build on ctrl+F9 (idea) of the dependency project.
>>
>> I think it should be already possible with vanilla gradle + IDE. It's
>> not great but it should work if you configure a project dependency and
>> make sure it is higher on the classpath in the consumer project.
>>
>> As far as STS goes I could imagine a feature that allows to replace
>> selected binary dependency with a selected project from the workspace
>> :)
>>
>> For building gradle from CLI we plan to make it easy to toggle binary
>> dependency with a project dependency. Our main use case is to allow
>> working on the subset of projects in a big multi-module project.
>>
>> Cheers!
>>
>>
>
>
> --
> View this message in context: 
> http://gradle.1045684.n5.nabble.com/Is-it-possible-to-elect-a-local-gradle-project-to-satisfy-other-projects-deps-tp4497854p4498136.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
>
>
>



-- 
Szczepan Faber
Principal engineer@gradleware
Lead@mockito

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

    http://xircles.codehaus.org/manage_email


Reply via email to