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