I have an Android Instant App with following structure:
- B: base module
- Installed: installed app module
- Instant: instant app module
- F: feature with functional specific to Installed app. F depends on local aar library
local-lib
located inproject\F\libs
.
F
's build.gradle is following:
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
api ":local-lib@aar"
}
I tried to include F
module to Installed
app module like this:
dependencies {
implementation project(':B')
implementation project(':F')
}
But gradle couldn't resolve local-lib
, giving error:
Error:Could not resolve all dependencies for configuration ':Installed:releaseCompileClasspath'.
> Could not find :local-lib:.
Searched in the following locations:
... some remote repositories ...
Required by:
project :Installed > project :F
I tried to duplicate libs
folder to project\Installed\libs
, and it worked. So basically I need 2 copies of local-lib
to make this work? How should I organise imports to avoid duplication? Perfect case would be if libs
folder was inside F
module.