title: javax.inject does not exists
body: <p>To investigate troubles with <code>javax.inject</code> I have created minimalistic Gradle project in IntelliJ IDEA.</p>
  
  <p>It contains <code>Main.java</code> only:</p>
  
  <pre><code>import javax.inject.Scope;
  public class Main {
      public static void main(String[] args) {}
  }
  </code></pre>
  
  <p>build.gradle</p>
  
  <pre><code>buildscript {
      repositories {
          mavenCentral()
      }
  }
  apply plugin: 'java'
  dependencies {
      compileOnly 'javax.annotation:jsr250-api:1.0'
  }
  </code></pre>
  
  <p>and settings.gradle</p>
  
  <pre><code>rootProject.name = 'test'
  </code></pre>
  
  <p>Building the project I got</p>
  
  <blockquote>
    <p>Error:(1, 20) java: package javax.inject does not exist</p>
  </blockquote>
  
  <p>What's wrong with javax, why it doesn't exists??</p>
  
  <p>Hmm, it seems the problem is not specifically with javax. Tried to add different dependencies from mavenCentral, no one works. Like Gradle does not load external libraries at all.</p>
  
  <p><strong>Solved</strong></p>
  
  <p>The problem was with <code>repositories</code> - it must be outside of <code>buildscript</code>.</p>