https://kotlinlang.org logo
Title
j

Jérôme Gully

10/14/2020, 9:03 AM
Hi, I wonder if it's possible to use
includeBuild
to consume a library module that is not in the same path as the app project:
/projects/myApp/
App project
/projects/myApp/myModuleApp/
App module
/projects/myLib
LibProject
/projects/myLib/myModuleLib
LibModule
I want to inculde
myModuleLib
in
myModuleApp
as a dependency. I tried to create a new project app and a new project for the library (create new module android lib), and in settings.gradle from the app project I have added
includeBuild("../LibProject/mylibrary")
but it's not working. Maybe I have missed something, the error is:
Plugin [id: 'com.android.library'] was not found in any of the following sources:
Seems like the incldueBuild is working but it don't have the
com.android.library
plugin
a

aarjav

10/14/2020, 2:37 PM
I think normally you want to do an include build to a path where you have the settings.gradle. This way if there is something configured in the root project's (
myLib
) build.gradle for the subproject (
myModuleLib
) then it will still get applied properly
Though idk if they have a feature where it searches for the settings.gradle file parent directories automatically
j

Jérôme Gully

10/15/2020, 9:04 AM
Yes you are right, I fixed the probem with targeting my whole lib project !