Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add external project dependency in gradle

Tags:

gradle

I am starting to migrate from ANT to Gradle and I have multiple projects which rely on one another. They are not all in the same path, meaning that they are not all under a single project but still they have dependencies with one another.

I read that in Gradle in order to define a dependency between two projects, they need to be under the same root project.

Can I avoid this? how can I give project compile(..) a path which is outside of the current path?

In other words, I don't want to start changing the path of the projects, for now.

like image 348
Raz Avatar asked Jan 08 '23 22:01

Raz


1 Answers

Also, i found this while searching for information on including projects/modules that are not in the same path:

https://looksok.wordpress.com/2014/07/12/compile-gradle-project-with-another-project-as-a-dependency/

It explains what Awanish Raj explained above, and more.

like image 156
Raz Avatar answered Feb 15 '23 09:02

Raz