add chain lig

This commit is contained in:
zhongchao
2021-10-15 18:34:34 +08:00
parent 9e00205cdf
commit c7f3f8d5a1
8 changed files with 52 additions and 7 deletions

3
.idea/gradle.xml generated
View File

@@ -4,7 +4,7 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
@@ -81,7 +81,6 @@
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>

View File

@@ -4,6 +4,19 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'android-aspectjx'
//apply ByteX宿主
apply plugin: 'bytex'
ByteX {
enable true
enableInDebug true
logLevel "DEBUG"
}
apply plugin: 'chain.log.hook'
hooklog{
enableLoggerToServer true
}
Properties properties = new Properties();
properties.load(project.rootProject.file("gradle.properties").newDataInputStream())
@@ -29,6 +42,8 @@ android {
packagingOptions {
exclude 'META-INF/proguard/coroutines.pro'
exclude 'META-INF/*'
exclude '*/proguard'
pickFirst 'migrateToAndroidx/migration.xml'
}
signingConfigs {
@@ -132,7 +147,6 @@ aspectjx {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
//Crash日志收集
implementation rootProject.ext.dependencies.crashSdk
implementation rootProject.ext.dependencies.androidxappcompat

View File

@@ -4,6 +4,7 @@ apply from: "javadoc.gradle"
buildscript {
repositories {
maven { url "https://artifact.bytedance.com/repository/byteX/" }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
@@ -18,6 +19,8 @@ buildscript {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31'
classpath "com.alibaba:arouter-register:1.0.2"
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.4'
classpath "com.bytedance.android.byteX:base-plugin:0.3.0"
classpath "com.mogo.cloud:hook:${HOOK_LOG_VERSION}"
// classpath ("com.tencent.matrix:matrix-gradle-plugin:0.6.6") { changing = true }
}
@@ -26,6 +29,7 @@ buildscript {
allprojects {
repositories {
maven { url "https://artifact.bytedance.com/repository/byteX/" }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }

View File

@@ -241,6 +241,9 @@ ext {
mogoaicloudtrafficlive : "com.mogo.cloud:trafficlive:${MOGO_TRAFFICLIVE_VERSION}",
mogoaicloudlocation : "com.mogo.cloud:location:${MOGO_LOCATION_VERSION}",
//plugin
mogochainbase : "com.mogo.cloud:service-chain:${SERVICE_CHAIN_VERSION}",
mogochainplugin : "com.mogo.cloud:hook:${HOOK_LOG_VERSION}",
]
}

View File

@@ -36,7 +36,7 @@ kapt.include.compile.classpath=false
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.enableJetifier=false
android.jetifier.blacklist=module-service-2.0.58.aar
## maven 配置
RELEASE_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-releases/
@@ -45,6 +45,22 @@ USERNAME=xintai
PASSWORD=xintai2018
# 编译模式: false - 依赖本地版本, true - 依赖 maven 版本
RELEASE=false
#plugin 插件
android.enableR8.libraries=false
android.enableR8=false
android.enableD8=true
android.enableD8.desugaring=true
android.enableDesugar=true
bytex.enableHtmlLog=true
bytex.forbidUseLenientMutationDuringGetArtifact=true
bytex.verifyProguardConfigurationChanged=false
bytex.ASM_API=ASM7
HOOK_LOG_VERSION=1.4.63
SERVICE_CHAIN_VERSION=1.0.22
# 模块版本
## 工程内模块
MOGO_COMMONS_VERSION=2.0.58

View File

@@ -73,6 +73,9 @@ dependencies {
implementation project(':core:mogo-core-function-call')
}
implementation rootProject.ext.dependencies.mogochainbase
implementation rootProject.ext.dependencies.mogochainplugin
annotationProcessor 'com.elegant.spi:compiler:1.0.3'
}

View File

@@ -29,6 +29,8 @@ import com.mogo.utils.ViewUtils;
import com.mogo.utils.logger.Logger;
import com.zhidao.carchattingprovider.ICarsChattingProvider;
import com.zhidao.carchattingprovider.MogoDriverInfo;
import com.zhjt.service.chain.ChainLog;
import com.zhjt.service.chain.TracingConstants;
import java.util.ArrayList;
import java.util.Iterator;
@@ -138,12 +140,15 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
*
* @param data 自车周边数据
*/
@ChainLog(endpoint = TracingConstants.Endpoint.PAD,
nodeAliasCode = "PAD_YINGYAN_SHOW",
paramIndexes = 0,
clientPkFileName = "sn")
public void renderSnapshotData(SocketDownData.LauncherSnapshotProto data) {
final long start = System.nanoTime();
if (clear(data)) {
return;
}
if (!MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
return;
}
@@ -222,7 +227,7 @@ public class SnapshotSetDataDrawer extends BaseDrawer implements IMogoMarkerClic
while (iterator.hasNext()) {
IMogoMarker result = iterator.next();
SocketDownData.CloudRoadDataProto proto = ((SocketDownData.CloudRoadDataProto) result.getObject());
if(proto == null){ // 后续有业务数据在操作,更新数据,不做处理
if (proto == null) { // 后续有业务数据在操作,更新数据,不做处理
continue;
}
long internal = Long.parseLong(adasControllerApi.getSatelliteTime()) - proto.getSatelliteTime();

View File

@@ -20,6 +20,7 @@ import com.mogo.module.common.drawer.AdasRecognizedResultDrawer;
import com.mogo.module.common.drawer.MarkerDrawer;
import com.mogo.module.common.drawer.OnlineCarDrawer;
import com.mogo.module.common.drawer.RoadConditionDrawer;
import com.mogo.module.common.drawer.SnapshotSetDataDrawer;
import com.mogo.module.common.drawer.marker.IMarkerView;
import com.mogo.module.common.drawer.marker.MapMarkerAdapter;
import com.mogo.module.common.drawer.marker.OnlineCarMarkerView;
@@ -147,7 +148,7 @@ public class MapMarkerManager implements IMogoMarkerClickListener,
@Override
public void onMsgReceived(SocketDownData.LauncherSnapshotProto mogoSnapshotSetData) {
DebugConfig.setStatus(DebugConfig.sDownloadSnapshot, true);
// SnapshotSetDataDrawer.getInstance().renderSnapshotData(mogoSnapshotSetData);
// SnapshotSetDataDrawer.getInstance().renderSnapshotData(mogoSnapshotSetData);
// Message msg = mSnapshotHandler.obtainMessage();
// msg.obj = mogoSnapshotSetData;
// msg.what = MSG_SNAPSHOT;