title: Gradle: execute tasks sequentially in some task
body: <p>I have a library, which contains 3 lib modules and 1 example module. Before deploy task I want to execute some other tasks. In command line it looks like this: <code>./gradlew -x:example:clean -x:example:check -x:example:uploadArchives clean check :androidLib:assembleRelease uploadArchives</code>. </p>
  
  <p><strong>I want to write gradle task to execute all tasks sequentially for all modules besides example module. That I can do: <code>./gradlew deployAll</code>. How can i do it?</strong></p>
  
  <p>I try do this:</p>
  
  <pre><code>task deployAll {
      doLast {
          subprojects {
               if(it.plugins.withType(com.android.build.gradle.AppPlugin)) return
               it.tasks.getByName('clean').execute()
               it.tasks.getByName('check').execute()
               ...
          }
      }
  }
  </code></pre>
  
  <p>But <code>execute()</code> is deprecated and it execute only first task and ignore any.</p>