title: Add multi project itself as a dependency in another project
body: <p>After a lot of searching, it was the last option to raise it here! In eclipse, I am designing such project structure using Gradle, as shown below...</p>
  
  <pre><code>Algorithms              //Parent Project
      -SubModuleCore      //Child Project for common utilities &amp; dependencies
          -build.gradle
      -SubModuleOne       //Child project for any operation
          -build.gradle   //Added 'SubModuleCore' as a dependency like compile project(':SubModuleCore')
      -SubModuleTwo       //Child project for another operation
          -build.gradle   //Added 'SubModuleCore' as a dependency like compile project(':SubModuleCore')
      -build.gradle
      -settings.gradle
  
  Services                //Stand-Alone project
      -build.gradle       //Here I want to add 'Algorithms' as a single dependency
      -settings.gradle
  </code></pre>
  
  <p>Project structures are same in eclipse work-space as shown above. I am able to generate individual <strong>.jar</strong> of <em>Algorithms</em> project. So the problem is I want to add this <em>Algorithms</em> project as a single dependency in project <em>Services</em> like <code>compile project(':Algorithms')</code>. But eclipse just saying 'shut-up!'. I don't want to publish it somewhere like maven central / jitpack etc. instead I want to do it locally. I'm trying this way...</p>
  
  <p><strong>Services/build.gradle</strong></p>
  
  <pre><code>apply plugin: 'war'
  apply plugin: 'java'
  apply plugin: 'eclipse'
  apply plugin: 'eclipse-wtp'
  project.webAppDirName = 'WebContent'
  
  repositories {
      jcenter()
      mavenCentral()
  }
  
  dependencies {
      compile fileTree(dir: 'lib', include: ['*.jar'])
      compile project(':Algorithms')
  }
  </code></pre>
  
  <p><strong>Services/settings.gradle</strong></p>
  
  <pre><code>rootProject.name = 'Services'
  include 'Algorithms'
  project(':Algorithms').projectDir = new File(settingsDir, '../Algorithms')
  </code></pre>
  
  <p><strong>Algorithms/build.gradle</strong></p>
  
  <pre><code>apply plugin: 'java'
  apply plugin: 'eclipse'
  
  sourceCompatibility = "1.8";
  targetCompatibility = "1.8";
  
  subprojects {
      apply plugin: 'java'
      apply plugin: 'eclipse'
  
      sourceCompatibility = "1.8";
      targetCompatibility = "1.8";
  
      buildscript {
         dependencies {
            repositories {
              jcenter()
               mavenCentral()
            }
          }
      }
  
      repositories {
          jcenter()
          mavenCentral()
      }
  
  }
  subprojects.each { subproject -&gt; 
     evaluationDependsOn(subproject.path) 
  }
  jar.dependsOn subprojects.tasks['classes']
  jar {
    baseName = 'algorithms'
    subprojects.each { subproject -&gt;
      from subproject.sourceSets.main.output.classesDir
    }
    from files('resources/log4j2.xml')
    from files('resources/application.properties')
  }
  </code></pre>
  
  <p><strong>Algorithms/settings.gradle</strong></p>
  
  <pre><code>rootProject.name = 'Algorithms'
  include ':SubModuleCore', ':SubModuleOne', ':SubModuleTwo'
  </code></pre>
  
  <p>I tried several solutions from SO, still not succeeded. Somebody please help me, I got stuck badly here. It seems I am very close to this, but don't know what is missing!</p>
  
  <p>Thanks</p>