title: Importing coroutines-common causes error "Cannot inline bytecode build with JVM target 1.8 into...". Even with explicitly specified jvmTarget
body: <p>I'm trying to import kotlin coroutines in my spring project. </p>
  
  <p>I have the following lines in my <code>build.gradle</code> file:</p>
  
  <pre><code>compileKotlin {
      kotlinOptions {
          freeCompilerArgs = ['-Xjsr305=strict']
          jvmTarget = '1.8'
      }
  }
  
  compileTestKotlin {
      kotlinOptions {
          freeCompilerArgs = ['-Xjsr305=strict']
          jvmTarget = '1.8'
      }
  }
  </code></pre>
  
  <p>But anyways when I import coroutines-common using <code>implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-common:1.1.1'</code> I get the error: <code>Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option</code></p>
  
  <p>If I remove <code>implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-common:1.1.1'</code>  the project builds fine.</p>
  
  <p>How can I import kotlin coroutines?</p>
  
  <p>P.S. I tried </p>
  
  <pre><code>tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
      kotlinOptions { 
          apiVersion = "1.3"
          languageVersion = "1.3"
          jvmTarget = "1.8"
      }
  }
  </code></pre>
  
  <p>Full <code>build.gradle</code> file:</p>
  
  <pre><code>buildscript {
      repositories {
          mavenCentral()
      }
  
      dependencies {
          classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.5.RELEASE")
          classpath("org.jetbrains.kotlin:kotlin-noarg:1.3.20")
          classpath("org.jetbrains.kotlin:kotlin-allopen:1.3.20")
      }
  }
  
  plugins {
      id 'org.springframework.boot' version '2.1.3.RELEASE'
      id 'org.jetbrains.kotlin.jvm' version '1.3.20'
      id 'org.jetbrains.kotlin.plugin.spring' version '1.3.20'
  }
  
  apply plugin: 'java'
  apply plugin: 'idea'
  apply plugin: 'io.spring.dependency-management'
  apply plugin: 'kotlin-jpa'
  
  allOpen {
      annotation("javax.persistence.Entity")
      annotation("javax.persistence.MappedSuperclass")
      annotation("javax.persistence.Embeddable")
  }
  
  group = 'com.liberaid'
  version = '0.0.1'
  sourceCompatibility = '1.8'
  
  repositories {
      mavenCentral()
      maven { url "https://dl.bintray.com/rookies/maven"  }
  }
  
  dependencies {
      def withoutX = {
          exclude group: 'org.slf4j', module: 'slf4j-log4j12'
          exclude group: 'org.slf4j', module: 'slf4j-jdk14'
          exclude group: 'ch.qos.logback', module: 'logback-classic'
      }
  
      implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
      implementation 'org.springframework.boot:spring-boot-starter-web'
      implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
      implementation 'org.jetbrains.kotlin:kotlin-reflect'
      implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
      implementation 'commons-net:commons-net:3.6'
      implementation 'net.lingala.zip4j:zip4j:1.3.2'
      implementation 'org.apache.pdfbox:pdfbox:2.0.1'
  
      implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
      implementation 'mysql:mysql-connector-java:+'
  
      /* Json parsers */
      implementation 'org.json:json:+'
      implementation 'com.google.code.gson:gson:+'
  
      /* HTML parser */
      implementation 'org.jsoup:jsoup:1.11.3'
  
      /* GROBID - citation parser */
      implementation 'org.grobid:grobid-core:0.5.4', withoutX
      implementation 'org.grobid:grobid-trainer:0.5.4', withoutX
  
      /* Kotlin coroutines */
      implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1'
      implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-common:1.1.1'
  
      runtimeOnly 'org.springframework.boot:spring-boot-devtools'
      testImplementation 'org.springframework.boot:spring-boot-starter-test'
  }
  
  compileKotlin {
      kotlinOptions {
          freeCompilerArgs = ['-Xjsr305=strict']
          jvmTarget = '1.8'
      }
  }
  
  compileTestKotlin {
      kotlinOptions {
          freeCompilerArgs = ['-Xjsr305=strict']
          jvmTarget = '1.8'
      }
  }
  </code></pre>