title: Gradle multi module dependencies
body: <p>I have a Spring Boot multi module Gradle app.</p>
  
  <p>Everything builds and runs locally without issue however the JARs being output by my subprojects do not contain any of the required dependencies and strangely the generated manifest contains only <code>Manifest-Version: 1.0</code>. </p>
  
  <p>I've tried almost all different combinations I can think of but have now run out of ideas!</p>
  
  <p>Here's my root build.gradle:</p>
  
  <pre><code>buildscript {
      ext {
          springBootVersion = "1.5.3.RELEASE"
      }
      repositories {
          mavenCentral()
          maven { url "https://plugins.gradle.org/m2/" }
      }
      dependencies {
          classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
          classpath("io.spring.gradle:dependency-management-plugin:1.0.2.RELEASE")
          classpath("de.thetaphi:forbiddenapis:2.3")
          classpath("com.diffplug.spotless:spotless-plugin-gradle:3.3.2")
      }
  }
  
  subprojects {
  
      apply plugin: "java"
      apply plugin: "idea"
      apply plugin: "com.diffplug.gradle.spotless"
      apply plugin: "de.thetaphi.forbiddenapis"
      apply plugin: "io.spring.dependency-management"
      apply plugin: "org.springframework.boot"
  
      sourceCompatibility = 1.8
      targetCompatibility = 1.8
  
      repositories {
          mavenCentral()
          flatDir {
              dirs "libs"
          }
      }
  
      jar {
          baseName = "app"
          version = "0.0.1-SNAPSHOT"
      }
  
     spotless {
         java {
             googleJavaFormat()
         }
     }
  
      idea {
          module {
              inheritOutputDirs = false
              outputDir = file("$buildDir/classes/main/")
          }
      }
  
      task dev {
          doLast {
              bootRun.systemProperty "spring.profiles.active", "dev"
          }
      }
  
      bootRepackage {
          enabled = false
      }
  
      bootRun {
          addResources = true
          systemProperties = System.properties
      }
  
      forbiddenApis {
          // https://github.com/policeman-tools/forbidden-apis/wiki/GradleUsage
          bundledSignatures = [ "jdk-unsafe", "jdk-deprecated", "jdk-non-portable" ]
          signaturesFiles = files("../forbidden_signatures.txt")
          ignoreFailures = false
      }
  
      dependencies {
          compile("org.springframework.boot:spring-boot-starter") {
              exclude group: "org.flywaydb", module: "flyway-core"
          }
          compile("org.springframework.boot:spring-boot-devtools")
  
          compile("com.google.guava:guava:21.0")
          compile("org.apache.commons:commons-lang3:3.5")
          compile("org.projectlombok:lombok")
  
          testCompile("org.springframework.boot:spring-boot-starter-test")
          testCompile("com.h2database:h2")
      }
  
      dependencyManagement {
          imports {
              mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
          }
      }
  
      test {
          testLogging {
              events "failed"
              exceptionFormat "full"
          }
      }
  }
  </code></pre>
  
  <p>And the gradle.build for one of my subprojects:</p>
  
  <pre><code>buildscript {
      repositories {
          mavenCentral()
          maven { url "https://plugins.gradle.org/m2/" }
      }
      dependencies {
          classpath("com.moowork.gradle:gradle-node-plugin:1.1.1")
      }
  }
  
  apply plugin: "com.moowork.node"
  
  dependencies {
      compile project(":core")
      compile project(":search")
  
      // Spring projects
      compile("org.springframework.boot:spring-boot-starter-security")
      compile("org.springframework.security:spring-security-web")
      compile("org.springframework.boot:spring-boot-starter-thymeleaf")
      compile("org.springframework.boot:spring-boot-starter-mail")
  
      // Thymeleaf
      compile("nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect")
      compile("it.ozimov:spring-boot-thymeleaf-email:0.5.3")
  
      // Email
      compile("com.sendinblue:sendinblue:2.0")
      compile("com.icegreen:greenmail-spring:1.5.3")
  
      // DB
      compile("org.postgresql:postgresql:42.0.0")
      compile("org.flywaydb:flyway-core:4.1.2")
  }
  
  ext["thymeleaf.version"] = "3.0.5.RELEASE"
  ext["thymeleaf-layout-dialect.version"] = "2.2.1"
  
  node {
      version = "7.10.0"
      download = true
  }
  
  npmInstall.args = ['--silent']
  
  // make sure node and build dependencies are installed before calling webpack
  npm_run_build.dependsOn "npmInstall"
  
  npm_run_build.dependsOn npm_run_lint
  
  // make sure webpack generates assets for the build
  processResources.dependsOn npm_run_build
  </code></pre>
  
  <p>Any help or ideas would be hugely appreciated!</p>
  
  <p>Thank you</p>