title: Gradle run multiple spring projects with conditions
body: <p>I have multiple projects witch using spring and spring boot.<br>
  Spring boot have command to run application with Gradle:</p>
  
  <pre><code>gradle bootRun
  </code></pre>
  
  <p>I can run all my applications with command:</p>
  
  <pre><code>gradle bootRun --parallel
  </code></pre>
  
  <p>But I need one of my projects(Lets call it project A) to be started first, and only after it(project A) started other projects could start too.</p>
  
  <p>Problem is, I don't understand how I can start project A, then wait till it started, and only after it start other projects.</p>
  
  <p>If I just chain task it won't work because project A keep running and not giving back control to gradle.</p>
  
  <p>Grdale config for one of the projects:</p>
  
  <pre><code>buildscript {
      ext {
          springBootVersion = '1.5.3.RELEASE'
      }
      repositories {
          mavenCentral()
      }
      dependencies {
          classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
      }
  }
  
  apply plugin: 'java'
  apply plugin: 'idea'
  apply plugin: 'org.springframework.boot'
  
  jar {
      group 'test one'    
  }
  
  
  sourceCompatibility = 1.8
  targetCompatibility = 1.8
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile(
              'org.springframework.boot:spring-boot-starter-data-jpa'
      )
  }
  </code></pre>
  
  <p>Main setting.gradle just contains list of my projects:</p>
  
  <pre><code>rootProject.name = 'best-app'    
  include 'project A'
  include 'project B'
  include 'project C'
  </code></pre>