Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gradle compile filetree syntax

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

like image 968
CQM Avatar asked Nov 12 '22 21:11

CQM


1 Answers

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.

like image 134
Peter Niederwieser Avatar answered Nov 14 '22 22:11

Peter Niederwieser