title: How to apply plugin to allprojects with new Gradle plugins mechanism?
body: <p>Before Gradle 2.1 I could apply plugin to all projects by using <code>allProjects</code> closure (by prevoisly resolving the jar, of course):</p>
  
  <pre><code>buildscript {
    repositories {
      jcenter()
    }
    dependencies {
      classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1"
    }
  }
  
  allprojects {
      apply plugin: "com.jfrog.artifactory"
  }
  </code></pre>
  
  <p>With new publishing mechanism it looks like the <code>plugins</code> closure can't be used inside <code>allprojects</code>:</p>
  
  <pre><code>allprojects {
  
      plugins {
          id "com.jfrog.artifactory" version "3.0.1"
      }
  }
  </code></pre>
  
  <p>fails with:</p>
  
  <p><em>"Could not find method plugins() for arguments [build_xxxx_run_closure1_closure4@yyyyy] on root project"</em></p>
  
  <p>What are the rules of using <code>plugins</code> closure? Is the plugin applied to current project only? If so, how can I apply it to all projects without repeating the <code>plugins</code> closure inside each build?</p>