diff --git a/build.gradle b/build.gradle index 32a0f5815c..d210cb3ce4 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,6 @@ apply from: "config.gradle" apply from: "javadoc.gradle" buildscript { - ext.kotlin_version = '1.3.61' repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' @@ -19,7 +18,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.5.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.71' classpath "com.alibaba:arouter-register:1.0.2" classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.4' // NOTE: Do not place your application dependencies here; they belong diff --git a/config.gradle b/config.gradle index 6714fbfaaf..436b7c6281 100644 --- a/config.gradle +++ b/config.gradle @@ -1,6 +1,6 @@ ext { time = "" - + kotlin_version = "1.3.71" android = [ // applicationId : "com.mogo.launcher", // zhidadoApplicationId: "com.zhidao.launcher", @@ -20,8 +20,8 @@ ext { dependencies = [ // androidx - androidxappcompat : "androidx.appcompat:appcompat:1.0.2", - androidxccorektx : "androidx.core:core-ktx:1.2.0", + androidxappcompat : "androidx.appcompat:appcompat:1.1.0", + androidxccorektx : "androidx.core:core-ktx:1.3.0", androidxconstraintlayout : "androidx.constraintlayout:constraintlayout:1.1.3", boostmultidex : "com.bytedance.boost_multidex:boost_multidex:1.0.1", androidxviewpager2 : "androidx.viewpager2:viewpager2:1.0.0", @@ -141,7 +141,7 @@ ext { accountsdk : "com.zhidao.accountservice:account-sdk:1.0.11", // crash crashSdk : "com.zhidaoauto.crash.log:library:1.0.5", - kotlinstdlibjdk7 : "org.jetbrains.kotlin:kotlin-stdlib-jdk7", + kotlinstdlibjdk7 : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlin_version}", //探路 videoarmv7 : "com.shuyu:gsyVideoPlayer-armv7a:7.1.2", @@ -196,6 +196,8 @@ ext { androidxroomktx : "androidx.room:room-ktx:2.2.3", // - mogomodulewidgets : "com.mogo.module:module-widgets:${MOGO_MODULE_WIDGETS_VERSION}", + mogomodulewidgets : "com.mogo.module:module-widgets:${MOGO_MODULE_WIDGETS_VERSION}", + + kotlingradleplugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}" ] } \ No newline at end of file diff --git a/libraries/tanlulib/build.gradle b/libraries/tanlulib/build.gradle index cf297b1c10..de83c92c42 100644 --- a/libraries/tanlulib/build.gradle +++ b/libraries/tanlulib/build.gradle @@ -39,13 +39,10 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.core:core-ktx:1.3.0' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - implementation 'com.zhidaoauto.common:service:1.0.4.10' + implementation rootProject.ext.dependencies.kotlinstdlibjdk7 + implementation rootProject.ext.dependencies.androidxappcompat + implementation rootProject.ext.dependencies.androidxccorektx + implementation rootProject.ext.dependencies.aiassist implementation 'com.squareup.okhttp3:okhttp:3.10.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.6.0' implementation 'com.zhidaoauto.controller:api:1.0.8' @@ -53,6 +50,7 @@ dependencies { implementation 'com.zhidao.video:video-processor:1.0.2.1' implementation 'com.foundation.utils:common-utils:1.0.7' + implementation rootProject.ext.dependencies.eventbus compileOnly rootProject.ext.dependencies.mogocommons implementation rootProject.ext.dependencies.eventbus implementation rootProject.ext.dependencies.coroutinescore diff --git a/libraries/tanlulib/src/test/java/com/zhidao/roadcondition/ExampleUnitTest.kt b/libraries/tanlulib/src/test/java/com/zhidao/roadcondition/ExampleUnitTest.kt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/modules/mogo-module-search/build.gradle b/modules/mogo-module-search/build.gradle index 53027f6e57..b5b990719a 100644 --- a/modules/mogo-module-search/build.gradle +++ b/modules/mogo-module-search/build.gradle @@ -49,6 +49,7 @@ dependencies { implementation rootProject.ext.dependencies.androidxcardview kapt rootProject.ext.dependencies.aroutercompiler implementation rootProject.ext.dependencies.rxandroid + implementation rootProject.ext.dependencies.kotlinstdlibjdk7 if (Boolean.valueOf(RELEASE)) { @@ -66,7 +67,6 @@ dependencies { implementation project(':modules:mogo-module-common') implementation project(':modules:mogo-module-gps-simulator') } - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation 'com.zhidaoauto.voice.controller:api:1.0.2' } diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/launchercard/LauncherCardRefresher.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/launchercard/LauncherCardRefresher.java index 58fd0037ea..afae482a97 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/launchercard/LauncherCardRefresher.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/launchercard/LauncherCardRefresher.java @@ -223,14 +223,16 @@ class LauncherCardRefresher { if ( response.getResult().getExploreWay() == null || response.getResult().getExploreWay().isEmpty() ) { return false; } - speakTTS( String.format( tts, response.getResult().getExploreWay().size(), mRefreshStrategy.getDesc() ) ); - notifyLauncherCard( String.format( info, response.getResult().getExploreWay().size(), mRefreshStrategy.getDesc() ) ); + int size = response.getResult().getExploreWay().size(); + speakTTS( String.format( tts, size, mRefreshStrategy.getDesc() ) ); + notifyLauncherCard( String.format( info, size, mRefreshStrategy.getDesc() ), size ); } else { if ( response.getResult().getOnlineCar() == null || response.getResult().getOnlineCar().isEmpty() ) { return false; } - speakTTS( String.format( tts, response.getResult().getOnlineCar().size(), mRefreshStrategy.getDesc() ) ); - notifyLauncherCard( String.format( info, response.getResult().getOnlineCar().size(), mRefreshStrategy.getDesc() ) ); + int size = response.getResult().getOnlineCar().size(); + speakTTS( String.format( tts, size, mRefreshStrategy.getDesc() ) ); + notifyLauncherCard( String.format( info, size, mRefreshStrategy.getDesc() ), size ); } return true; } @@ -243,11 +245,12 @@ class LauncherCardRefresher { AIAssist.getInstance( mContext ).speakTTSVoice( msg ); } - private void notifyLauncherCard( String info ) { + private void notifyLauncherCard( String info, int amount ) { Intent intent = new Intent( "com.mogo.launcher.v2x" ); intent.putExtra( "v2x_warning_type", 20000 ); - intent.putExtra( "v2x_warining_timeout", 20 ); + intent.putExtra( "v2x_warining_timeout", 20 * 1000L ); intent.putExtra( "v2x_warning_tts", "" ); + intent.putExtra( "v2x_warning_eventCount", amount ); intent.putExtra( "v2x_warning_info", info ); mContext.sendBroadcast( intent ); } diff --git a/modules/mogo-module-tanlu/build.gradle b/modules/mogo-module-tanlu/build.gradle index f28f498553..fb48f1e204 100644 --- a/modules/mogo-module-tanlu/build.gradle +++ b/modules/mogo-module-tanlu/build.gradle @@ -42,13 +42,9 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.appcompat:appcompat:1.0.2' - implementation 'androidx.core:core-ktx:1.3.0' - implementation 'androidx.recyclerview:recyclerview:1.1.0' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.2.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + implementation rootProject.ext.dependencies.androidxccorektx + implementation rootProject.ext.dependencies.kotlinstdlibjdk7 + implementation rootProject.ext.dependencies.androidxrecyclerview implementation rootProject.ext.dependencies.androidxappcompat implementation rootProject.ext.dependencies.arouter annotationProcessor rootProject.ext.dependencies.aroutercompiler