Kotlin Coroutine 协程Gradle配置

工程的Gradle中:

  dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'
        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
    }
 allprojects {
    repositories {
        jcenter()
        maven {
            url "http://dl.bintray.com/kotlin/kotlin-eap-1.1"
        }
    }
}

module的Gradle

kotlin {//根目录下
    experimental {
        coroutines 'enable'
    }
}


 compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.6-beta'

你可能感兴趣的:(kotlin,coroutine)