# Gradle include library from another project

**URL:** <https://discuss.gradle.org/t/gradle-include-library-from-another-project/22208>\
**Category:** Help/Discuss\
**Created:** [April 4, 2017, 11:07am UTC](https://discuss.gradle.org/t/gradle-include-library-from-another-project/22208 "2017-04-04T11:07:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![padhu1989](https://avatars.discourse-cdn.com/v4/letter/p/cc9497/32.png) [@padhu1989](https://discuss.gradle.org/u/padhu1989)\
**Post date:** [April 4, 2017, 11:07am UTC](https://discuss.gradle.org/t/gradle-include-library-from-another-project/22208/1 "2017-04-04T11:07:40Z")

</div>

I have this project setup (in Eclipse IDE):

```
|---Project1  
| |---App  
| |---lib
| |---xxx.jar
|
|---Project2  
     |---App

```

I want add project 1 lib jar as dependency to Project2.

Project2 settings.gradle:

```
include ':Project1'
project(':Project1').projectDir = new File(settingsDir, '../Project1')

```

Project2 build.gradle:

```
compile project(':Project1')
compile files(fileTree(dir: '../Project1/lib', includes: ['*.jar']))

```

But When I run the Project2 jar from command , I am getting dependency errors…

Is there anything wrong with the folder path? I didn’t find any good solution for this problem and i am not very familiar with gradle.
