We have an conventional plugin that applies the dependencies for subprojects. And we are looking to add the lint module to the dependency list.
Problem: Lint module is not getting resolved when we add that in the conventional plugin (or even if we use directly) unless i add an explict include for that lint module in the root settings.gradle. Is that really necessary
Project structure at high level
root project
- settings.gradle
- mainapp
- subproject 1
...
- buildModule
- submodule 1
- conventional plugin 1 - applies the lib dependencies across subprojects in the mainapp
- conventional plugin 2
- submodule 2
- lint module
- settings.gradle (has includes for all submodules)
settings.gradle
includeBuild(:buildModule)
//it works if i add these 2 lines but AndroidStdio reports duplicate content (which is sort of understandable)
include(:lintModule)
project(:lintModule).projectDir = File(....)
conventional_plugin1.gradle
...
...
dependencies {
....
lintChecks(project(":lintModule"))
}
Understanding is that by including the buildModule in the root, we would be able to refer all the submodules inside. What am i missing here, can some one please help here. Appreciate any inputs