Ah yes, this can be very helpful in many cases. You can do the following to achieve this.
Let's say you have two projects - MyApplication and MyLibraryDemo containing the library module libmodule with the following paths:
MyApplication - "/../AndroidStudioProjects/MyApplication"
MyLibraryDemo - "/../AndroidStudioProjects/MyLibraryDemo"
libmodule - "/../AndroidStudioProjects/MyLibraryDemo/libmodule"
And let's say you are trying to use libmodule in MyApplication.
Then, in your settings.gradle
of your MyApplication
project, do this
include ':app', ":libmodule"
project(':libmodule').projectDir = new File(settingsDir, '../MyLibraryDemo/libmodule')
You may have to make relevant corrections, but I hope the idea of linking another module is clear.
All the best :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…