From 05d917d805c771583361f5f1b08d94ac4b609e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Thu, 21 Oct 2021 16:23:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E9=83=A8=E5=88=86=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=B8=BAKotlin=E6=94=AF=E6=8C=81=EF=BC=8C=E8=A7=A3?= =?UTF-8?q?=E5=86=B3Didn't=20find=20class=20"com.mogo.eagle.core.function.?= =?UTF-8?q?api.autopilot.IMoGoAutoPilotProvider$DefaultImpls"=20=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 董宏宇 --- .../mogo-core-function-smp/build.gradle | 27 ++++++++++++------ libraries/map-custom/build.gradle | 23 +++++++++------ modules/mogo-module-common/build.gradle | 12 ++++++++ modules/mogo-module-main/build.gradle | 22 +++++++++++---- modules/mogo-module-map/build.gradle | 28 +++++++++++++------ modules/mogo-module-service/build.gradle | 23 ++++++++++----- tts/tts-pad/build.gradle | 20 +++++++++---- 7 files changed, 110 insertions(+), 45 deletions(-) diff --git a/core/function-impl/mogo-core-function-smp/build.gradle b/core/function-impl/mogo-core-function-smp/build.gradle index 35c4c4d4a3..368e5d33af 100644 --- a/core/function-impl/mogo-core-function-smp/build.gradle +++ b/core/function-impl/mogo-core-function-smp/build.gradle @@ -1,5 +1,10 @@ -apply plugin: 'com.android.library' -apply plugin: 'com.alibaba.arouter' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-android-extensions' + id 'kotlin-kapt' + id 'com.alibaba.arouter' +} android { compileSdkVersion rootProject.ext.android.compileSdkVersion @@ -10,14 +15,17 @@ android { versionCode Integer.valueOf(VERSION_CODE) versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION") - javaCompileOptions { - annotationProcessorOptions { - arguments = [AROUTER_MODULE_NAME: project.getName()] - } - } testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' + + //ARouter apt 参数 + kapt { + useBuildCache = false + arguments { + arg("AROUTER_MODULE_NAME", project.getName()) + } + } } buildTypes { @@ -37,12 +45,13 @@ dependencies { implementation rootProject.ext.dependencies.androidxappcompat implementation rootProject.ext.dependencies.androidxconstraintlayout - implementation rootProject.ext.dependencies.arouter implementation rootProject.ext.dependencies.amapnavi3dmap implementation rootProject.ext.dependencies.amaplocation - annotationProcessor rootProject.ext.dependencies.aroutercompiler + implementation rootProject.ext.dependencies.arouter + kapt rootProject.ext.dependencies.aroutercompiler + if (Boolean.valueOf(RELEASE)) { api rootProject.ext.dependencies.mogocommons api rootProject.ext.dependencies.mogoserviceapi diff --git a/libraries/map-custom/build.gradle b/libraries/map-custom/build.gradle index ab34b9f21c..e0d484d9d3 100644 --- a/libraries/map-custom/build.gradle +++ b/libraries/map-custom/build.gradle @@ -1,6 +1,10 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-android-extensions' + id 'kotlin-kapt' + id 'com.alibaba.arouter' +} android { compileSdkVersion rootProject.ext.android.compileSdkVersion @@ -12,11 +16,13 @@ android { versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION") testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles 'consumer-rules.pro' + consumerProguardFiles "consumer-rules.pro" - javaCompileOptions { - annotationProcessorOptions { - arguments = [AROUTER_MODULE_NAME: project.getName()] + //ARouter apt 参数 + kapt { + useBuildCache = false + arguments { + arg("AROUTER_MODULE_NAME", project.getName()) } } } @@ -50,8 +56,9 @@ dependencies { implementation rootProject.ext.dependencies.androidxappcompat implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + 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-common/build.gradle b/modules/mogo-module-common/build.gradle index c6b45a8681..375145f5d9 100644 --- a/modules/mogo-module-common/build.gradle +++ b/modules/mogo-module-common/build.gradle @@ -17,6 +17,15 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles 'consumer-rules.pro' + + //ARouter apt 参数 + kapt { + useBuildCache = false + arguments { + arg("AROUTER_MODULE_NAME", project.getName()) + } + } + } buildTypes { release { @@ -46,7 +55,10 @@ dependencies { implementation rootProject.ext.dependencies.androidxappcompat implementation rootProject.ext.dependencies.androidxrecyclerview implementation rootProject.ext.dependencies.androidxconstraintlayout + implementation rootProject.ext.dependencies.arouter + kapt rootProject.ext.dependencies.aroutercompiler + implementation rootProject.ext.dependencies.callchatprovider api rootProject.ext.dependencies.mogoaicloudrealtime diff --git a/modules/mogo-module-main/build.gradle b/modules/mogo-module-main/build.gradle index 403a081353..bd3a44e2ea 100644 --- a/modules/mogo-module-main/build.gradle +++ b/modules/mogo-module-main/build.gradle @@ -1,4 +1,10 @@ -apply plugin: 'com.android.library' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-android-extensions' + id 'kotlin-kapt' + id 'com.alibaba.arouter' +} android { compileSdkVersion rootProject.ext.android.compileSdkVersion @@ -12,9 +18,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()) } } } @@ -38,9 +46,11 @@ dependencies { implementation rootProject.ext.dependencies.androidxappcompat implementation rootProject.ext.dependencies.androidxconstraintlayout - implementation rootProject.ext.dependencies.arouter implementation rootProject.ext.dependencies.callchatprovider - annotationProcessor rootProject.ext.dependencies.aroutercompiler + + implementation rootProject.ext.dependencies.arouter + kapt rootProject.ext.dependencies.aroutercompiler + compileOnly rootProject.ext.dependencies.adasapi compileOnly rootProject.ext.dependencies.adasconfigapi if (Boolean.valueOf(RELEASE)) { diff --git a/modules/mogo-module-map/build.gradle b/modules/mogo-module-map/build.gradle index b4f1c55aee..65c0193776 100644 --- a/modules/mogo-module-map/build.gradle +++ b/modules/mogo-module-map/build.gradle @@ -1,5 +1,11 @@ -apply plugin: 'com.android.library' -apply plugin: 'com.alibaba.arouter' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-android-extensions' + id 'kotlin-kapt' + id 'com.alibaba.arouter' +} + android { compileSdkVersion rootProject.ext.android.compileSdkVersion @@ -10,14 +16,16 @@ android { versionCode Integer.valueOf(VERSION_CODE) versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION") - javaCompileOptions { - annotationProcessorOptions { - arguments = [AROUTER_MODULE_NAME: project.getName()] + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles "consumer-rules.pro" + + //ARouter apt 参数 + kapt { + useBuildCache = false + arguments { + arg("AROUTER_MODULE_NAME", project.getName()) } } - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles 'consumer-rules.pro' } buildTypes { @@ -38,8 +46,10 @@ 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)) { api rootProject.ext.dependencies.mogomap api rootProject.ext.dependencies.mogomapapi diff --git a/modules/mogo-module-service/build.gradle b/modules/mogo-module-service/build.gradle index eef378592e..ed807b3c1f 100644 --- a/modules/mogo-module-service/build.gradle +++ b/modules/mogo-module-service/build.gradle @@ -1,5 +1,10 @@ -apply plugin: 'com.android.library' -apply plugin: 'com.alibaba.arouter' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-android-extensions' + id 'kotlin-kapt' + id 'com.alibaba.arouter' +} android { compileSdkVersion rootProject.ext.android.compileSdkVersion @@ -11,11 +16,13 @@ android { versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION") testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles 'consumer-rules.pro' + consumerProguardFiles "consumer-rules.pro" - javaCompileOptions { - annotationProcessorOptions { - arguments = [AROUTER_MODULE_NAME: project.getName()] + //ARouter apt 参数 + kapt { + useBuildCache = false + arguments { + arg("AROUTER_MODULE_NAME", project.getName()) } } } @@ -37,8 +44,10 @@ 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 + implementation rootProject.ext.dependencies.rxjava implementation rootProject.ext.dependencies.rxandroid implementation rootProject.ext.dependencies.callchatprovider diff --git a/tts/tts-pad/build.gradle b/tts/tts-pad/build.gradle index 6c10fe8722..b789e22b49 100644 --- a/tts/tts-pad/build.gradle +++ b/tts/tts-pad/build.gradle @@ -1,5 +1,10 @@ -apply plugin: 'com.android.library' -apply plugin: 'com.alibaba.arouter' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-android-extensions' + id 'kotlin-kapt' + id 'com.alibaba.arouter' +} android { compileSdkVersion rootProject.ext.android.compileSdkVersion @@ -13,9 +18,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()) } } } @@ -36,8 +43,9 @@ android { dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation rootProject.ext.dependencies.androidxappcompat + implementation rootProject.ext.dependencies.arouter - annotationProcessor rootProject.ext.dependencies.aroutercompiler + kapt rootProject.ext.dependencies.aroutercompiler api rootProject.ext.dependencies.aiassist api rootProject.ext.dependencies.aiassistReplace