diff --git a/OCH/mogo-och-bus-passenger/build.gradle b/OCH/mogo-och-bus-passenger/build.gradle index 6ae4e9b720..fbe54a38ba 100644 --- a/OCH/mogo-och-bus-passenger/build.gradle +++ b/OCH/mogo-och-bus-passenger/build.gradle @@ -1,5 +1,4 @@ apply plugin: 'com.android.library' -apply plugin: 'com.alibaba.arouter' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' diff --git a/OCH/mogo-och-bus/build.gradle b/OCH/mogo-och-bus/build.gradle index ca6568c042..766b0cbc6b 100644 --- a/OCH/mogo-och-bus/build.gradle +++ b/OCH/mogo-och-bus/build.gradle @@ -1,5 +1,4 @@ apply plugin: 'com.android.library' -apply plugin: 'com.alibaba.arouter' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' diff --git a/OCH/mogo-och-common-module/build.gradle b/OCH/mogo-och-common-module/build.gradle index 24b27d9db3..e039dd0abf 100644 --- a/OCH/mogo-och-common-module/build.gradle +++ b/OCH/mogo-och-common-module/build.gradle @@ -2,7 +2,6 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' -apply plugin: 'com.alibaba.arouter' android { compileSdkVersion rootProject.ext.android.compileSdkVersion diff --git a/OCH/mogo-och-noop/build.gradle b/OCH/mogo-och-noop/build.gradle index 1b12fcd129..496444693b 100644 --- a/OCH/mogo-och-noop/build.gradle +++ b/OCH/mogo-och-noop/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { diff --git a/OCH/mogo-och-sweeper/build.gradle b/OCH/mogo-och-sweeper/build.gradle index 50a67c9494..447401eeec 100644 --- a/OCH/mogo-och-sweeper/build.gradle +++ b/OCH/mogo-och-sweeper/build.gradle @@ -1,5 +1,4 @@ apply plugin: 'com.android.library' -apply plugin: 'com.alibaba.arouter' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' diff --git a/OCH/mogo-och-taxi-passenger/build.gradle b/OCH/mogo-och-taxi-passenger/build.gradle index 6d9432cc53..cac11852f5 100644 --- a/OCH/mogo-och-taxi-passenger/build.gradle +++ b/OCH/mogo-och-taxi-passenger/build.gradle @@ -1,5 +1,4 @@ apply plugin: 'com.android.library' -apply plugin: 'com.alibaba.arouter' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' diff --git a/OCH/mogo-och-taxi/build.gradle b/OCH/mogo-och-taxi/build.gradle index 37195198e7..379e28fcb5 100644 --- a/OCH/mogo-och-taxi/build.gradle +++ b/OCH/mogo-och-taxi/build.gradle @@ -1,5 +1,4 @@ apply plugin: 'com.android.library' -apply plugin: 'com.alibaba.arouter' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' diff --git a/app/build.gradle b/app/build.gradle index 5f6910595d..6e3eda0b9e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,123 +4,11 @@ import groovy.json.JsonSlurper import java.text.SimpleDateFormat apply plugin: 'com.android.application' -apply plugin: 'com.alibaba.arouter' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' -apply plugin: 'android-aspectjx' apply plugin: 'bugly' -def isReleaseBuild = isReleaseBuild() -//apply ByteX宿主 -if (!isAndroidTestBuild()) { - apply plugin: 'bytex' - ByteX { - enable true - enableInDebug true - logLevel "DEBUG" - } -} - -if (!isAndroidTestBuild()) { - apply plugin: 'bytex.notsticky.service' -} - -if (!isAndroidTestBuild()) { - apply plugin: 'chain.log.hook' - hooklog { - enableTraceToServer false - enableLoggerToLocal true - } - - apply plugin: 'biz.config.hook' -} - -if (!isAndroidTestBuild()) { - apply plugin: 'apm-plugin' -} - -if (!isAndroidTestBuild()) { - apply plugin: 'bytex.threadOpt' - thread_opt { - enable true - enableInDebug true - logLevel "DEBUG" - } -} - -if (!isAndroidTestBuild()) { - apply plugin: 'LancetX' - LancetX { - enable true - enableInDebug true - - weaveGroup { - anr_fix { - enable true - } - crash_fix { - enable true - } - memory_leak { - enable true - } - textview_opt { - enable true - } - } - } -} - -//if (!isAndroidTestBuild()) { -// /** -// * 方便使用systrace工具,在工程侧打点,便于分析工程侧性能问题 -// */ -// apply plugin: 'bytex.systrace' -// systrace { -// /** -// * 交付时要关闭,会有性能损耗 -// */ -// enable false -// enableInDebug false -// /** -// * - 是否使用[Trace.beginAsyncSection(String, int)/Trace.endAsyncSection(String, int)]进行打点 -// * - 默认使用[Trace.beginSection(String)/Trace.endSection()]进行打点 -// */ -// isTraceAsync false -// /** -// * - 是否在运行时只针对主线程打点,其它线程不打 -// */ -// isOnlyMainThread false -// -// /** -// * - 是否忽略对类的静态构造方法打点 -// * - 默认不忽略 -// */ -// isIgnoreClinitMethod false -// -// /** -// * - 是否忽略对类中的简单方法打点 -// * 简单方法定义: -// * - 空方法 -// * - get/set 方法 -// * - 单独的方法,方法体内没有调用其它方法 -// * - 默认不忽略 -// */ -// isIgnoreSampleMethod false -// -// /** -// * - 针对特定类集合,配置打点白名单,在此集合中的类中的所有方法不打点 -// * - 支持正则表达式 -// */ -// whiteListForClass = [] -// -// /** -// * - 针对特定包名集合,配置打点白名单,所有类以此包名为前缀的类不打点 -// * - 支持正则表达式 -// */ -// whiteListForPackage = [] -// } -//} +apply from: rootProject.file('gradle/bytex/bytex.gradle') bugly { appId = 'ac71228f85' // 注册时分配的App ID @@ -334,11 +222,6 @@ repositories { } } -aspectjx { - include "com.mogo.eagle.core.function.chat" -} - - dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) implementation rootProject.ext.dependencies.androidxappcompat @@ -379,37 +262,8 @@ dependencies { androidTestImplementation rootProject.ext.dependencies.androidx_runner androidTestImplementation rootProject.ext.dependencies.androidx_espresso_core androidTestImplementation rootProject.ext.dependencies.localbroadcastmanager - -// if (isAndroidTestBuild()) { -// implementation "com.mogo.thread.opt:lib:${THREAD_OPT_VERSION}" -// } } -if (!isAndroidTestBuild()) { - ApmPlugin { - // 是否进行插桩 - enable true - // 是否在Debug包插桩,默认不插桩 - enableInDebug true - // DEBUG("DEBUG"), INFO("INFO"), WARN("WARN"), ERROR("ERROR"); - // INFO 级别Log会汇总所有被插桩处理的类供查看,路径 app/build/ByteX/ApmPlugin - logLevel "DEBUG" - // 启动分析开关:监控App启动耗时,需要同时开启pageLoadSwitch - startSwitch = true - // 页面响应开关:监控Activity的生命周期耗时 - pageLoadSwitch = true - // 网络监控开关:监控okhttp3的网络请求 - okHttp3Switch = false - // 白名单下的包进行插桩,需要填写要插装类所在的包名,支持前缀配置 - whiteList = [ - "com.mogo" - ] - // 黑名单包下类不进行插桩,可以配置包名和类名,没有可以填空 - blackList = [ - - ] - } -} android.applicationVariants.all { variant -> def buildTime = new Date().format("yyyyMMdd", TimeZone.getTimeZone("GMT+08:00")) @@ -464,25 +318,6 @@ static def getBuildTime() { return "\"${buildTime}\"" } - -boolean isAndroidTestBuild() { - for (String s : gradle.startParameter.taskNames) { - if (s.contains("AndroidTest")) { - return true - } - } - return false -} - -boolean isReleaseBuild() { - for (String s : gradle.startParameter.taskNames) { - if (s.contains("Release") | s.contains("release")) { - return true - } - } - return false -} - Object readFileToJson(env) { try { def businessType = project.hasProperty('business') diff --git a/build.gradle b/build.gradle index 15dd159557..a9ad1ca75f 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ apply from: "config.gradle" apply from: "javadoc.gradle" buildscript { - + apply from: rootProject.file('gradle/ext.gradle') repositories { mavenLocal() maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } @@ -22,20 +22,19 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30' - classpath "com.alibaba:arouter-register:1.0.12-mogo" - classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.4' + classpath "com.android.tools.build:gradle:${gradle_version}" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}" + classpath "com.alibaba:arouter-register:${plugin_version}" classpath 'com.tencent.bugly:symtabfileuploader:2.2.1' - classpath "com.bytedance.android.byteX:base-plugin:0.3.0" - classpath "com.mogo.cloud:hook:${HOOK_LOG_VERSION}" - classpath "com.mogo.cloud:bizconfig:${BIZCONFIG_VERSION}" - classpath 'com.volcengine:apm_insight_plugin:1.4.1' - classpath "com.mogo.thread.opt:plg:${THREAD_OPT_VERSION}" - classpath 'com.mogo.cloud:systrace:1.0.1' + classpath "com.bytedance.android.byteX:base-plugin:${plugin_version}" + classpath "com.mogo.cloud:hook:${plugin_version}" + classpath "com.mogo.cloud:bizconfig:${plugin_version}" + classpath 'com.volcengine:apm_insight_plugin:1.4.2' + classpath "com.mogo.thread.opt:plg:${plugin_version}" + classpath "com.mogo.cloud:systrace:${plugin_version}" classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18' - classpath 'com.mogo.sticky:service:1.0.8' - classpath 'io.github.knight-zxw:lancet-plugin:0.0.4.8_mogo' + classpath "com.mogo.sticky:service:${plugin_version}" + classpath "io.github.knight-zxw:lancet-plugin:${plugin_version}" // classpath ("com.tencent.matrix:matrix-gradle-plugin:0.6.6") { changing = true } } @@ -133,3 +132,12 @@ subprojects.each { } } } + +boolean isAndroidTestBuild() { + for (String s : gradle.startParameter.taskNames) { + if (s.contains("AndroidTest")) { + return true + } + } + return false +} diff --git a/config.gradle b/config.gradle index 8bf367ddae..9bad263f1a 100644 --- a/config.gradle +++ b/config.gradle @@ -1,3 +1,4 @@ +apply from: rootProject.file('gradle/ext.gradle') ext { time = "" // kotlin_version = "1.4.31" @@ -86,8 +87,6 @@ ext { coroutinescore : "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2", coroutinesandroid : "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2", - aspectj : "org.aspectj:aspectjrt:1.8.9", - adasapi : "com.zhidao.autopilot.support:adas:1.0.6.15", adasconfigapi : "com.zhidao.adasconfig:adasconfig:1.1.5.2", @@ -112,10 +111,10 @@ ext { circleimageview : "de.hdodenhof:circleimageview:3.0.1", //plugin - mogochainbase : "com.mogo.cloud:service-chain:${SERVICE_CHAIN_VERSION}", - mogochainplugin : "com.mogo.cloud:hook:${HOOK_LOG_VERSION}", - mogoservicebiz : "com.mogo.cloud:service-biz:${SERVICE_BIZ_VERSION}", - mogobizconfig : "com.mogo.cloud:bizconfig:${BIZCONFIG_VERSION}", + mogochainbase : "com.mogo.cloud:service-chain:${plugin_version}", + mogochainplugin : "com.mogo.cloud:hook:${plugin_version}", + mogoservicebiz : "com.mogo.cloud:service-biz:${plugin_version}", + mogobizconfig : "com.mogo.cloud:bizconfig:${plugin_version}", //========================= 旧版本架构 Maven 版本管理 ========================= // modules @@ -213,7 +212,7 @@ ext { //========================= autosize ====================== androidautoSize : 'com.github.JessYanCoding:AndroidAutoSize:v1.2.1', - thread_opt : "com.mogo.thread.opt:lib:${THREAD_OPT_VERSION}" + thread_opt : "com.mogo.thread.opt:lib:${plugin_version}" ] android = [ launcherApplicationId : "com.mogo.launcher", diff --git a/core/function-impl/mogo-core-function-biz/build.gradle b/core/function-impl/mogo-core-function-biz/build.gradle index b91915dcfa..4914750bcd 100644 --- a/core/function-impl/mogo-core-function-biz/build.gradle +++ b/core/function-impl/mogo-core-function-biz/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { compileSdkVersion rootProject.ext.android.compileSdkVersion diff --git a/core/function-impl/mogo-core-function-chat/build.gradle b/core/function-impl/mogo-core-function-chat/build.gradle index cbba149f6d..6f5bc913da 100644 --- a/core/function-impl/mogo-core-function-chat/build.gradle +++ b/core/function-impl/mogo-core-function-chat/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { compileSdkVersion rootProject.ext.android.compileSdkVersion @@ -53,7 +52,6 @@ dependencies { implementation rootProject.ext.dependencies.androidxappcompat implementation rootProject.ext.dependencies.arouter implementation rootProject.ext.dependencies.rxandroid - compileOnly rootProject.ext.dependencies.aspectj kapt rootProject.ext.dependencies.aroutercompiler implementation rootProject.ext.dependencies.mogowebsocket implementation rootProject.ext.dependencies.circleimageview diff --git a/core/function-impl/mogo-core-function-chat/src/main/java/com/mogo/eagle/core/function/chat/facade/aop/BaseAspectj.kt b/core/function-impl/mogo-core-function-chat/src/main/java/com/mogo/eagle/core/function/chat/facade/aop/BaseAspectj.kt deleted file mode 100644 index 6dca672fa6..0000000000 --- a/core/function-impl/mogo-core-function-chat/src/main/java/com/mogo/eagle/core/function/chat/facade/aop/BaseAspectj.kt +++ /dev/null @@ -1,74 +0,0 @@ -package com.mogo.eagle.core.function.chat.facade.aop - -import android.os.Looper -import com.mogo.commons.debug.DebugConfig -import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_CHAT -import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger -import org.aspectj.lang.ProceedingJoinPoint -import org.aspectj.lang.reflect.CodeSignature -import org.aspectj.lang.reflect.MethodSignature - -open class BaseAspectj { - - companion object { - @Volatile - private var enable: Boolean = DebugConfig.isDebug() - } - - fun enterMethod(joinPoint: ProceedingJoinPoint) { - if (!enable) return - - val signature = joinPoint.signature as CodeSignature - val cls = signature.declaringType - val methodName = signature.name - val parameterNames = signature.parameterNames - val parameterValues = joinPoint.args - - val builder = StringBuilder("\u21E2 ") - builder.append(methodName).append('(') - parameterValues.forEachIndexed { index, _ -> - if (index > 0) { - builder.append(",") - } - builder.append(parameterNames[index]).append('=') - builder.append(parameterValues[index]) - } - builder.append(')') - - if (Looper.myLooper() != Looper.getMainLooper()) { - builder.append("[Thread:\"").append(Thread.currentThread().name).append("\"]") - } - CallerLogger.d(M_CHAT + asTag(cls), builder.toString()) - } - - fun exitMethod(joinPoint: ProceedingJoinPoint, result: Any?, lengthMill: Long) { - if (!enable) return - - val signature = joinPoint.signature - val cls = signature.declaringType - val methodName = signature.name - val hasReturnType = signature is MethodSignature - && signature.returnType != Void.TYPE - - val builder = StringBuilder("\u21E0 ") - .append(methodName) - .append("[") - .append(lengthMill) - .append("ms]") - - if (hasReturnType) { - builder.append(" = ") - builder.append(result.let { - result.toString() - }) - } - CallerLogger.d(M_CHAT + asTag(cls), builder.toString()) - } - - private fun asTag(cls: Class<*>): String { - if (cls.isAnonymousClass) { - return asTag(cls.enclosingClass!!) - } - return cls.simpleName - } -} \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-chat/src/main/java/com/mogo/eagle/core/function/chat/facade/aop/DebugLog.kt b/core/function-impl/mogo-core-function-chat/src/main/java/com/mogo/eagle/core/function/chat/facade/aop/DebugLog.kt deleted file mode 100644 index 85dbbbb6d7..0000000000 --- a/core/function-impl/mogo-core-function-chat/src/main/java/com/mogo/eagle/core/function/chat/facade/aop/DebugLog.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.mogo.eagle.core.function.chat.facade.aop - -@Target(AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.CONSTRUCTOR) -@kotlin.annotation.Retention(AnnotationRetention.RUNTIME) -annotation class DebugLog \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-chat/src/main/java/com/mogo/eagle/core/function/chat/facade/aop/LogAspectj.kt b/core/function-impl/mogo-core-function-chat/src/main/java/com/mogo/eagle/core/function/chat/facade/aop/LogAspectj.kt deleted file mode 100644 index 6b75cc9d7a..0000000000 --- a/core/function-impl/mogo-core-function-chat/src/main/java/com/mogo/eagle/core/function/chat/facade/aop/LogAspectj.kt +++ /dev/null @@ -1,42 +0,0 @@ -package com.mogo.eagle.core.function.chat.facade.aop - -import org.aspectj.lang.ProceedingJoinPoint -import org.aspectj.lang.annotation.Around -import org.aspectj.lang.annotation.Aspect -import org.aspectj.lang.annotation.Pointcut -import java.util.concurrent.TimeUnit - -@Aspect -class LogAspectj : BaseAspectj() { - - - @Pointcut("within(@com.mogo.eagle.core.function.chat.facade.aop.DebugLog *)") - fun withinAnnotatedClass() { - } - - @Pointcut("execution(!synthetic * *(..))&& withinAnnotatedClass()") - fun methodInsideAnnotatedType() { - } - - @Pointcut("execution(!synthetic *.new(..))&& withinAnnotatedClass()") - fun constructorInsideAnnotatedType() { - } - - @Pointcut("execution(@com.mogo.eagle.core.function.chat.facade.aop.DebugLog * *(..))|| methodInsideAnnotatedType()") - fun method() { - } - - @Pointcut("execution(@com.mogo.eagle.core.function.chat.facade.aop.DebugLog *.new(..))|| constructorInsideAnnotatedType()") - fun constructor() { - } - - @Around("method() || constructor()") - fun logExecute(joinPoint: ProceedingJoinPoint) { - enterMethod(joinPoint) - val startNanos = System.nanoTime() - val result = joinPoint.proceed() - val stopNanos = System.nanoTime() - val lengthMill = TimeUnit.NANOSECONDS.toMillis(stopNanos - startNanos) - exitMethod(joinPoint, result, lengthMill) - } -} \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-datacenter/build.gradle b/core/function-impl/mogo-core-function-datacenter/build.gradle index 058a10fc61..90edcb2e05 100644 --- a/core/function-impl/mogo-core-function-datacenter/build.gradle +++ b/core/function-impl/mogo-core-function-datacenter/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { compileSdkVersion rootProject.ext.android.compileSdkVersion diff --git a/core/function-impl/mogo-core-function-devatools/build.gradle b/core/function-impl/mogo-core-function-devatools/build.gradle index b00c326519..5acc9ec8dc 100644 --- a/core/function-impl/mogo-core-function-devatools/build.gradle +++ b/core/function-impl/mogo-core-function-devatools/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' id 'com.google.protobuf' } diff --git a/core/function-impl/mogo-core-function-hmi/build.gradle b/core/function-impl/mogo-core-function-hmi/build.gradle index e0be61dbc9..8808f5936f 100644 --- a/core/function-impl/mogo-core-function-hmi/build.gradle +++ b/core/function-impl/mogo-core-function-hmi/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { diff --git a/core/function-impl/mogo-core-function-map/build.gradle b/core/function-impl/mogo-core-function-map/build.gradle index 53bea84269..7f93e58595 100644 --- a/core/function-impl/mogo-core-function-map/build.gradle +++ b/core/function-impl/mogo-core-function-map/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { compileSdkVersion rootProject.ext.android.compileSdkVersion diff --git a/core/function-impl/mogo-core-function-patch/build.gradle b/core/function-impl/mogo-core-function-patch/build.gradle index 8baf9e1a0b..86458d14eb 100644 --- a/core/function-impl/mogo-core-function-patch/build.gradle +++ b/core/function-impl/mogo-core-function-patch/build.gradle @@ -7,7 +7,6 @@ import org.gradle.api.invocation.* plugins { id 'com.android.library' id 'org.jetbrains.kotlin.android' - id 'com.alibaba.arouter' id 'kotlin-kapt' } diff --git a/core/function-impl/mogo-core-function-startup/build.gradle b/core/function-impl/mogo-core-function-startup/build.gradle index 150dbbf83d..74b73c6fb3 100644 --- a/core/function-impl/mogo-core-function-startup/build.gradle +++ b/core/function-impl/mogo-core-function-startup/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { compileSdkVersion rootProject.ext.android.compileSdkVersion diff --git a/core/mogo-core-data/build.gradle b/core/mogo-core-data/build.gradle index 9697e80ee9..9e9da787eb 100644 --- a/core/mogo-core-data/build.gradle +++ b/core/mogo-core-data/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' id 'com.google.protobuf' } android { diff --git a/core/mogo-core-function-api/build.gradle b/core/mogo-core-function-api/build.gradle index a00eb95edb..99dc5c9e7b 100644 --- a/core/mogo-core-function-api/build.gradle +++ b/core/mogo-core-function-api/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { compileSdkVersion rootProject.ext.android.compileSdkVersion diff --git a/core/mogo-core-function-call/build.gradle b/core/mogo-core-function-call/build.gradle index 79e9f9fa8b..a0eec22415 100644 --- a/core/mogo-core-function-call/build.gradle +++ b/core/mogo-core-function-call/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { compileSdkVersion rootProject.ext.android.compileSdkVersion diff --git a/core/mogo-core-network/build.gradle b/core/mogo-core-network/build.gradle index f1ef705df7..cd1b7b0495 100644 --- a/core/mogo-core-network/build.gradle +++ b/core/mogo-core-network/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { compileSdkVersion rootProject.ext.android.compileSdkVersion diff --git a/core/mogo-core-res/build.gradle b/core/mogo-core-res/build.gradle index 678d252bc7..1fd8903ee2 100644 --- a/core/mogo-core-res/build.gradle +++ b/core/mogo-core-res/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { compileSdkVersion rootProject.ext.android.compileSdkVersion diff --git a/core/mogo-core-utils/build.gradle b/core/mogo-core-utils/build.gradle index a3c8c8fdda..328599c9bf 100644 --- a/core/mogo-core-utils/build.gradle +++ b/core/mogo-core-utils/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { compileSdkVersion rootProject.ext.android.compileSdkVersion diff --git a/foudations/mogo-aicloud-services-sdk/build.gradle b/foudations/mogo-aicloud-services-sdk/build.gradle index a6d986496f..e6989e7776 100644 --- a/foudations/mogo-aicloud-services-sdk/build.gradle +++ b/foudations/mogo-aicloud-services-sdk/build.gradle @@ -1,6 +1,5 @@ plugins { id 'com.android.library' - id 'com.alibaba.arouter' } android { diff --git a/foudations/mogo-commons/build.gradle b/foudations/mogo-commons/build.gradle index 0a7b572142..0b095d2a13 100644 --- a/foudations/mogo-commons/build.gradle +++ b/foudations/mogo-commons/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { diff --git a/gradle.properties b/gradle.properties index 438d6fe01d..1675f0b781 100644 --- a/gradle.properties +++ b/gradle.properties @@ -56,11 +56,11 @@ bytex.forbidUseLenientMutationDuringGetArtifact=true bytex.verifyProguardConfigurationChanged=false bytex.ASM_API=ASM7 -HOOK_LOG_VERSION=1.6.1 -SERVICE_CHAIN_VERSION=1.1.0 +#HOOK_LOG_VERSION=1.6.1 +#SERVICE_CHAIN_VERSION=1.1.0 -BIZCONFIG_VERSION=1.3.2 -SERVICE_BIZ_VERSION=1.2.4 +#BIZCONFIG_VERSION=1.3.2 +#SERVICE_BIZ_VERSION=1.2.4 ################ 外部依赖引用 ################ # loglib LOGLIB_VERSION=1.5.24 @@ -144,8 +144,7 @@ ADAS_DATA_LIB_GROUP=com.zhjt.mogo.adas.data ADAS_DATA_LIB_POM_ARTIFACT_ID=adas-data ADAS_DATA_LIB_CHILD_VERSION=.0 -# 线程优化版本 -THREAD_OPT_VERSION=4.0.1 +MOGO_PLUGIN_VERSION=1.0.0.31 # 是否支持patch升级 PATCH_UPGRADE_SUPPORT=true \ No newline at end of file diff --git a/gradle/bytex/bytex.gradle b/gradle/bytex/bytex.gradle new file mode 100644 index 0000000000..7a043453bc --- /dev/null +++ b/gradle/bytex/bytex.gradle @@ -0,0 +1,16 @@ +//apply ByteX宿主 +if (!rootProject.isAndroidTestBuild()) { + apply plugin: 'bytex' + ByteX { + enable true + enableInDebug true + } +} +apply from: rootProject.file('gradle/bytex/bytex_config.gradle') +apply from: rootProject.file('gradle/bytex/bytex_router.gradle') +apply from: rootProject.file('gradle/bytex/bytex_log_chain.gradle') +apply from: rootProject.file('gradle/bytex/bytex_sticky_service.gradle') +apply from: rootProject.file('gradle/bytex/bytex_thread_opt.gradle') +apply from: rootProject.file('gradle/bytex/bytex_lancetx.gradle') +apply from: rootProject.file('gradle/bytex/bytex_apm.gradle') +apply from: rootProject.file('gradle/bytex/bytex_systrace.gradle') diff --git a/gradle/bytex/bytex_apm.gradle b/gradle/bytex/bytex_apm.gradle new file mode 100644 index 0000000000..4047898911 --- /dev/null +++ b/gradle/bytex/bytex_apm.gradle @@ -0,0 +1,26 @@ +if (!rootProject.isAndroidTestBuild()) { + apply plugin: 'apm-plugin' + ApmPlugin { + // 是否进行插桩 + enable true + // 是否在Debug包插桩,默认不插桩 + enableInDebug true + // DEBUG("DEBUG"), INFO("INFO"), WARN("WARN"), ERROR("ERROR"); + // INFO 级别Log会汇总所有被插桩处理的类供查看,路径 app/build/ByteX/ApmPlugin + logLevel "DEBUG" + // 启动分析开关:监控App启动耗时,需要同时开启pageLoadSwitch + startSwitch = true + // 页面响应开关:监控Activity的生命周期耗时 + pageLoadSwitch = true + // 网络监控开关:监控okhttp3的网络请求 + okHttp3Switch = false + // 白名单下的包进行插桩,需要填写要插装类所在的包名,支持前缀配置 + whiteList = [ + "com.mogo" + ] + // 黑名单包下类不进行插桩,可以配置包名和类名,没有可以填空 + blackList = [ + + ] + } +} \ No newline at end of file diff --git a/gradle/bytex/bytex_config.gradle b/gradle/bytex/bytex_config.gradle new file mode 100644 index 0000000000..0162d36b51 --- /dev/null +++ b/gradle/bytex/bytex_config.gradle @@ -0,0 +1,4 @@ +if (!rootProject.isAndroidTestBuild()) { + apply plugin: 'biz.config.hook' +} + diff --git a/gradle/bytex/bytex_lancetx.gradle b/gradle/bytex/bytex_lancetx.gradle new file mode 100644 index 0000000000..ae85cddd3a --- /dev/null +++ b/gradle/bytex/bytex_lancetx.gradle @@ -0,0 +1,22 @@ +if (!rootProject.isAndroidTestBuild()) { + apply plugin: 'LancetX' + LancetX { + enable true + enableInDebug true + weaveGroup { + anr_fix { + enable true + } + crash_fix { + enable true + } + memory_leak { + enable true + } + textview_opt { + enable true + } + } + } +} + diff --git a/gradle/bytex/bytex_log_chain.gradle b/gradle/bytex/bytex_log_chain.gradle new file mode 100644 index 0000000000..b25181de06 --- /dev/null +++ b/gradle/bytex/bytex_log_chain.gradle @@ -0,0 +1,8 @@ +if (!rootProject.isAndroidTestBuild()) { + apply plugin: 'chain.log.hook' + hooklog { + enableTraceToServer false + enableLoggerToLocal true + } +} + diff --git a/gradle/bytex/bytex_router.gradle b/gradle/bytex/bytex_router.gradle new file mode 100644 index 0000000000..10a24d5f97 --- /dev/null +++ b/gradle/bytex/bytex_router.gradle @@ -0,0 +1,8 @@ +if (!rootProject.isAndroidTestBuild()) { + apply plugin: 'bytex.arouter' + arouter { + enable true + enableInDebug true + } +} + diff --git a/gradle/bytex/bytex_sticky_service.gradle b/gradle/bytex/bytex_sticky_service.gradle new file mode 100644 index 0000000000..cbc6b9afe0 --- /dev/null +++ b/gradle/bytex/bytex_sticky_service.gradle @@ -0,0 +1,3 @@ +if (!rootProject.isAndroidTestBuild()) { + apply plugin: 'bytex.notsticky.service' +} \ No newline at end of file diff --git a/gradle/bytex/bytex_systrace.gradle b/gradle/bytex/bytex_systrace.gradle new file mode 100644 index 0000000000..ff0c21b9be --- /dev/null +++ b/gradle/bytex/bytex_systrace.gradle @@ -0,0 +1,50 @@ +//if (!isAndroidTestBuild()) { +// /** +// * 方便使用systrace工具,在工程侧打点,便于分析工程侧性能问题 +// */ +// apply plugin: 'bytex.systrace' +// systrace { +// /** +// * 交付时要关闭,会有性能损耗 +// */ +// enable false +// enableInDebug false +// /** +// * - 是否使用[Trace.beginAsyncSection(String, int)/Trace.endAsyncSection(String, int)]进行打点 +// * - 默认使用[Trace.beginSection(String)/Trace.endSection()]进行打点 +// */ +// isTraceAsync false +// /** +// * - 是否在运行时只针对主线程打点,其它线程不打 +// */ +// isOnlyMainThread false +// +// /** +// * - 是否忽略对类的静态构造方法打点 +// * - 默认不忽略 +// */ +// isIgnoreClinitMethod false +// +// /** +// * - 是否忽略对类中的简单方法打点 +// * 简单方法定义: +// * - 空方法 +// * - get/set 方法 +// * - 单独的方法,方法体内没有调用其它方法 +// * - 默认不忽略 +// */ +// isIgnoreSampleMethod false +// +// /** +// * - 针对特定类集合,配置打点白名单,在此集合中的类中的所有方法不打点 +// * - 支持正则表达式 +// */ +// whiteListForClass = [] +// +// /** +// * - 针对特定包名集合,配置打点白名单,所有类以此包名为前缀的类不打点 +// * - 支持正则表达式 +// */ +// whiteListForPackage = [] +// } +//} diff --git a/gradle/bytex/bytex_thread_opt.gradle b/gradle/bytex/bytex_thread_opt.gradle new file mode 100644 index 0000000000..0503b8521b --- /dev/null +++ b/gradle/bytex/bytex_thread_opt.gradle @@ -0,0 +1,9 @@ +if (!rootProject.isAndroidTestBuild()) { + apply plugin: 'bytex.threadOpt' + thread_opt { + enable true + enableInDebug true + logLevel "DEBUG" + } +} + diff --git a/gradle/ext.gradle b/gradle/ext.gradle new file mode 100644 index 0000000000..e1da8e55f0 --- /dev/null +++ b/gradle/ext.gradle @@ -0,0 +1,5 @@ +ext { + gradle_version = '3.5.3' + kotlin_version = '1.5.30' + plugin_version = '10.0.0_mogo' +} \ No newline at end of file diff --git a/libraries/map-usbcamera/build.gradle b/libraries/map-usbcamera/build.gradle index 2616caa0ec..7f72a71b9e 100644 --- a/libraries/map-usbcamera/build.gradle +++ b/libraries/map-usbcamera/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { diff --git a/libraries/mogo-map-api/build.gradle b/libraries/mogo-map-api/build.gradle index 526a5fcf82..69e0bccf2e 100644 --- a/libraries/mogo-map-api/build.gradle +++ b/libraries/mogo-map-api/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { diff --git a/libraries/mogo-map/build.gradle b/libraries/mogo-map/build.gradle index fb7c7dbfa8..90164a1ee8 100644 --- a/libraries/mogo-map/build.gradle +++ b/libraries/mogo-map/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { diff --git a/test/crashreport-apmbyte/build.gradle b/test/crashreport-apmbyte/build.gradle index 65f85c0980..a914cfda0d 100644 --- a/test/crashreport-apmbyte/build.gradle +++ b/test/crashreport-apmbyte/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } diff --git a/test/crashreport-noop/build.gradle b/test/crashreport-noop/build.gradle index 1a8e3eadfe..ef9a24770f 100644 --- a/test/crashreport-noop/build.gradle +++ b/test/crashreport-noop/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { diff --git a/test/crashreport/build.gradle b/test/crashreport/build.gradle index d148f84c01..6694381701 100644 --- a/test/crashreport/build.gradle +++ b/test/crashreport/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } diff --git a/tts/tts-base/build.gradle b/tts/tts-base/build.gradle index 6984a00cbb..d59a409adb 100644 --- a/tts/tts-base/build.gradle +++ b/tts/tts-base/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { diff --git a/tts/tts-iflytek/build.gradle b/tts/tts-iflytek/build.gradle index 5b3aae988a..13499b22f0 100644 --- a/tts/tts-iflytek/build.gradle +++ b/tts/tts-iflytek/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { diff --git a/tts/tts-pad/build.gradle b/tts/tts-pad/build.gradle index 5b3aae988a..13499b22f0 100644 --- a/tts/tts-pad/build.gradle +++ b/tts/tts-pad/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android { diff --git a/tts/tts-zhi/build.gradle b/tts/tts-zhi/build.gradle index 5b3aae988a..13499b22f0 100644 --- a/tts/tts-zhi/build.gradle +++ b/tts/tts-zhi/build.gradle @@ -3,7 +3,6 @@ plugins { id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' - id 'com.alibaba.arouter' } android {