How to manage dependencies on separated local project on AndroidStudio?

I try to have 2 independent projects in AndroidStudio :


/some_root/Project1 (‘app’)

The build lifecycle of the 2 projects are separated (2 gits, 2 jenkins target, …) and Lib1 is used by some other projects.

When I build Lib1, I want to generate a versioned aar. When I build Project1, that depends on Lib1, I want to generate an apk WITHOUT rebuilding my lib each time (aar installed on local maven or nexus). I would love to be able to see/edit/refactor my local library files next to my Project1 (if it have the required snapshot version in gradle dependency) from AndroidStudio. And in the same time, I need to be able to reproduce this setup on some other projects (eg Project2) and switch easily from one to the other.

Is it event possible?

Note: I have tried some configurations in settings.gradle to load a project from another URL but it implies dependency build each time, and it’s not possible for me. I have also failed to use AS dependency system (I suppose it use gradle each time so it’s not viable too).

Duplicated here: