Kotlin Gradle 插件包含compileKotlin可以通过参数配置的任务apiVersion(languageVersiondoc ):
compileKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = '1.8'
languageVersion = '1.1'
apiVersion = '1.1'
}
}
Run Code Online (Sandbox Code Playgroud)
这两个参数都用于与旧版 Kotlin 兼容。有人可以解释一下它们之间有什么区别吗?使用它们的用例是什么?