folder structure:
- RootProject Folder
- MyMainProject
- MyLibraries
- Facebook
The root project folder has a build.gradle file, but MyMainProject has the one with all the dependencies.
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':MyLibraries:Facebook')
}
I feel like compile project
doesn't have the correct path. Is there a way to make it look up a directory, so something like ../MyLibraries/Facebook
? I don't completely understand the colon (:) syntax
You need a settings.gradle
, and the dependency presumably needs to be declared as project(':Facebook')
. (According to the folder structure, MyLibraries
and Facebook
are siblings.) For more information, see the multi-project builds chapter in the Gradle User Guide. I don't understand why you think this is connected to the fileTree
syntax, and I don't see libs
in your folder structure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With