[英]Unable to use Kotlin-kapt with kotlin/native
在通用Kotlin /本機模塊中使用時,編譯器無法識別任何kapt依賴項
apply plugin: 'konan'
apply plugin: 'kotlin-platform-common'
apply plugin: 'kotlin-kapt'
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
compile "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version"
compile "com.jakewharton:butterknife:8.8.1"
//kapt "com.jakewharton:butterknife-compiler:8.8.1"
}
konan.targets = ['iphone', 'iphone_sim']
def frameworkName = 'XplatformAnalytics'
konanArtifacts {
framework(frameworkName)
}
Kotlin / Native當前不支持kapt或任何其他kotlinx庫。 我們可以在應用程序的android平台中使用kapt,但不能在主要的通用模塊本身中使用。
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
buildscript {
ext.kotlin_version = '1.2.10'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
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
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.