From 9c3ae62bed2ed4da5f1ff2bf8856fd2478017b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E8=89=AF=E5=96=84?= Date: Thu, 28 Sep 2017 11:43:08 +0800 Subject: [PATCH] fix Issue #4: conflict of kotlin and databinding --- build.gradle | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index e6ffa63..1e1ece0 100644 --- a/build.gradle +++ b/build.gradle @@ -34,8 +34,11 @@ subprojects { apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' // 拓展 - if(enableDataBinding) - apply plugin: 'kotlin-kapt' + // kapt + apply plugin: 'kotlin-kapt' + kapt { + generateStubs = true + } android { compileSdkVersion rootProject.ext.compileSdkVersion as Integer @@ -72,17 +75,11 @@ subprojects { dependencies { // kotlin compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + kapt "com.android.databinding:compiler:$rootProject.ext.android_plugin_version" /******* rx ****************************************************************************/ compile "io.reactivex.rxjava2:rxjava:$rootProject.ext.rxjavaVersion" //1.3MB [EventBus] compile "io.reactivex.rxjava2:rxandroid:$rootProject.ext.rxandroidVersion" //8KB - - if(enableDataBinding){ - kapt "com.android.databinding:compiler:$rootProject.ext.android_plugin_version" - -// compile 'me.tatarka.bindingcollectionadapter:bindingcollectionadapter:1.1.0' -// compile 'me.tatarka.bindingcollectionadapter:bindingcollectionadapter-recyclerview:1.1.0' - } } }