title: Using Kotlin in a library module without using it in the app module
body: <p>I'm trying to use Kotlin in a library module without using it in the app module. The app module only uses Java and does not use any Kotlin classes from the library. Gradle won't compile hoever:</p>
  
  <pre><code>Error:(2, 1) A problem occurred evaluating project ':&lt;Library&gt;'.
  &gt; Plugin with id 'kotlin-android' not found.
  </code></pre>
  
  <p>Changes I made to include Kotlin:</p>
  
  <p>{library root} / build.gradle</p>
  
  <pre><code>buildscript {
  ext.kotlin_version = '1.1.3-2'
  
  repositories {
      jcenter()
  }
  dependencies {
      classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
      ...
  }
  
  allprojects {
  repositories {
      jcenter()
  }
  }
  </code></pre>
  
  <p>{library root} / {library module} / build.gradle</p>
  
  <pre><code>apply plugin: 'com.android.library'
  apply plugin: 'kotlin-android'
  ...
  
  dependencies{
      ...
      compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
  }
  </code></pre>
  
  <p>When I add the same to the app module, the project compiles without issue, but I'd like to avoid adding it in the app module because I'd like to use this library in multiple apps without making code changes to those apps</p>
  
  <p>Gradle version used : 3.3
  android gradle plugin version: 2.3.3</p>
  
  <p>Edit: @Jushua's answer works, but it still requires to update the project root build.gradle. I was hoping for a solution where only the dependency on the library would have to be added to make the whole thing work.</p>