title: Execution failed for task 'app:copyDebugAndroidTestKotlinClasses' - Android Kotlin Build Error
body: <p>I'm attempting to build a two module project with Kotlin and I'm running into this build error, but I'm not sure how to solve it in the slightest.</p>
  
  <pre><code>Error:Execution failed for task ':app:copyDebugAndroidTestKotlinClasses'.
  &gt; kotlin.KotlinNullPointerException (no error message)
  </code></pre>
  
  <p>My project build.gradle is as follows:</p>
  
  <pre><code>buildscript {
      ext.compileSdkVersion = 25
      ext.buildToolsVersion = "25.0.2"
      ext.minSdkVersion = 16
      ext.targetSdkVersion = 25
  
      ext.kotlin_version = '1.1.0'
      ext.supportLibVersion = '25.3.1'
  
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:2.3.1'
          classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  apply plugin: "kotlin"
  
  allprojects {
      repositories {
          jcenter()
  
          maven {
              url "https://jitpack.io"
          }
      }
  }
  </code></pre>
  
  <p>My app module build.gradle</p>
  
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'kotlin-android'
  apply plugin: 'kotlin-kapt'
  
  ext.jUnitVersion = '4.12'
  ext.espressoVersion = '2.2.2'
  
  android {
      compileSdkVersion 25
      buildToolsVersion "25.0.2"
      defaultConfig {
          applicationId "com.thinkbubble.app"
          minSdkVersion 16
          targetSdkVersion 25
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      sourceSets {
          main.java.srcDirs += 'src/main/kotlin'
      }
  }
  
  kapt {
      generateStubs = true
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile project(path: ':bubblepicker')
  
      compile "com.android.support:appcompat-v7:$supportLibVersion"
      compile 'com.android.support.constraint:constraint-layout:1.0.2'
      compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  
      testCompile "junit:junit:$jUnitVersion"
      androidTestCompile("com.android.support.test.espresso:espresso-core:$espressoVersion", {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
  }
  </code></pre>
  
  <p>And the build.gradle for my second module</p>
  
  <pre><code>apply plugin: 'com.android.library'
  apply plugin: 'kotlin-android'
  
  android {
      compileSdkVersion rootProject.compileSdkVersion
      buildToolsVersion rootProject.buildToolsVersion
  
      defaultConfig {
          minSdkVersion 16
          targetSdkVersion 25
          versionCode 1
          versionName "1.0"
  
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      sourceSets {
          main.java.srcDirs += 'src/main/kotlin'
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile "com.android.support:appcompat-v7:$supportLibVersion"
      compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  
      compile files('libs/jbox2d-library-2.1.2.2.jar')
      compile files('libs/slf4j-api-1.7.22.jar')
  
      compile 'io.reactivex:rxkotlin:0.60.0'
      compile 'io.reactivex:rxandroid:1.2.0'
      compile 'io.reactivex:rxjava:1.1.6'
  }
  repositories {
      mavenCentral()
  }
  </code></pre>
  
  <p>What could be causing this exception to appear?</p>