From 1e26790fa74df8fa16122fe915cbe9e840538c75 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 Mar 2020 14:10:25 +0800 Subject: [PATCH] fix bug of gradle kapt --- .idea/misc.xml | 2 +- modules/mogo-module-authorize/build.gradle | 11 +++++++---- modules/mogo-module-guide/build.gradle | 11 +++++++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 707ee6e613..2dc54c489f 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/modules/mogo-module-authorize/build.gradle b/modules/mogo-module-authorize/build.gradle index 172f3cdfb7..9ef6135d63 100644 --- a/modules/mogo-module-authorize/build.gradle +++ b/modules/mogo-module-authorize/build.gradle @@ -2,6 +2,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'com.alibaba.arouter' +apply plugin: 'kotlin-kapt' android { compileSdkVersion rootProject.ext.android.compileSdkVersion @@ -15,9 +16,11 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' - javaCompileOptions { - annotationProcessorOptions { - arguments = [AROUTER_MODULE_NAME: project.getName()] + //ARouter apt 参数 + kapt { + useBuildCache = false + arguments { + arg("AROUTER_MODULE_NAME",project.getName() ) } } @@ -46,7 +49,7 @@ dependencies { implementation rootProject.ext.dependencies.androidxappcompat implementation rootProject.ext.dependencies.androidxconstraintlayout implementation rootProject.ext.dependencies.arouter - annotationProcessor rootProject.ext.dependencies.aroutercompiler + kapt rootProject.ext.dependencies.aroutercompiler if (Boolean.valueOf(RELEASE)) { implementation rootProject.ext.dependencies.mogoutils diff --git a/modules/mogo-module-guide/build.gradle b/modules/mogo-module-guide/build.gradle index cf008cd79a..f6d685f964 100644 --- a/modules/mogo-module-guide/build.gradle +++ b/modules/mogo-module-guide/build.gradle @@ -2,6 +2,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'com.alibaba.arouter' +apply plugin: 'kotlin-kapt' android { compileSdkVersion rootProject.ext.android.compileSdkVersion @@ -15,9 +16,11 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' - javaCompileOptions { - annotationProcessorOptions { - arguments = [AROUTER_MODULE_NAME: project.getName()] + //ARouter apt 参数 + kapt { + useBuildCache = false + arguments { + arg("AROUTER_MODULE_NAME",project.getName() ) } } } @@ -46,7 +49,7 @@ dependencies { implementation rootProject.ext.dependencies.androidxconstraintlayout implementation rootProject.ext.dependencies.androidxviewpager2 implementation rootProject.ext.dependencies.arouter - annotationProcessor rootProject.ext.dependencies.aroutercompiler + kapt rootProject.ext.dependencies.aroutercompiler if (Boolean.valueOf(RELEASE)) { implementation rootProject.ext.dependencies.mogoutils