Skip to content

Commit

Permalink
Release 3.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
weiqiangliu committed Feb 15, 2023
1 parent 5a50374 commit 8f44686
Show file tree
Hide file tree
Showing 20 changed files with 58 additions and 47 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Apache License
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2015-2022 Sensors Data Inc.
Copyright 2015-2023 Sensors Data Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ __Gradle 编译环境(Android Studio)__
```android
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
//添加 android-gradle-plugin 依赖
       classpath 'com.sensorsdata.analytics.android:android-gradle-plugin2:3.4.6'
       classpath 'com.sensorsdata.analytics.android:android-gradle-plugin2:3.5.4'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
```
Expand All @@ -45,7 +45,7 @@ apply plugin: 'com.sensorsdata.analytics.android'
dependencies {
//添加 Sensors Analytics SDK 依赖
  compile 'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:6.2.0'
  implementation 'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:6.6.3'
}
```

Expand Down Expand Up @@ -84,7 +84,7 @@ See our [full manual](http://www.sensorsdata.cn/manual/android_sdk.html)

## License

Copyright 2015-2022 Sensors Data Inc.
Copyright 2015-2023 Sensors Data Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion plugin/ext.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project.ext {
pluginVersion = '3.5.3'
pluginVersion = '3.5.4'
Properties properties = new Properties()
if (project.file('local.properties').exists()) {
properties.load(project.file('local.properties').newDataInputStream())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by renqingyou on 2018/12/01.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by wangzhuohou on 2015/08/01.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by wangzhuozhou on 2015/08/12.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by wangzhuozhou on 2015/08/12.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by renqingyou on 2018/12/01.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by wangzhuozhou on 2015/08/12.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by wangzhuozhou on 2015/08/12.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -51,7 +51,7 @@ import java.util.jar.JarOutputStream

class SensorsAnalyticsTransform extends Transform {
private SensorsAnalyticsTransformHelper transformHelper
public static final String VERSION = "3.5.3"
public static final String VERSION = "3.5.4"
public static final String MIN_SDK_VERSION = "6.5.3"
private WaitableExecutor waitableExecutor
private URLClassLoader urlClassLoader
Expand Down Expand Up @@ -139,19 +139,17 @@ class SensorsAnalyticsTransform extends Transform {
if (waitableExecutor) {
waitableExecutor.waitForTasksWithQuickFail(true)
}
println("[SensorsAnalytics]: 此次编译共耗时:${System.currentTimeMillis() - startTime}毫秒")
Logger.info("[SensorsAnalytics]: 此次编译共耗时:${System.currentTimeMillis() - startTime}毫秒")
}

private void beforeTransform(TransformInvocation transformInvocation) {
//打印提示信息
Logger.printCopyright()
Logger.setDebug(transformHelper.extension.debug)
Logger.printCopyright()
transformHelper.onTransform()
println("[SensorsAnalytics]: 是否开启多线程编译:${!transformHelper.disableSensorsAnalyticsMultiThread}")
println("[SensorsAnalytics]: 是否开启增量编译:${!transformHelper.disableSensorsAnalyticsIncremental}")
println("[SensorsAnalytics]: 此次是否增量编译:$transformInvocation.incremental")
println("[SensorsAnalytics]: 是否在方法进入时插入代码:${transformHelper.isHookOnMethodEnter}")

Logger.printPluginConfig(transformHelper.disableSensorsAnalyticsMultiThread,
transformHelper.disableSensorsAnalyticsIncremental,
transformInvocation.incremental, transformHelper.isHookOnMethodEnter)
traverseForClassLoader(transformInvocation)
}

Expand Down Expand Up @@ -184,7 +182,7 @@ class SensorsAnalyticsTransform extends Transform {
transformHelper.urlClassLoader = urlClassLoader
checkRNState()
VersionUtils.loadAndroidSDKVersion(urlClassLoader)
if(!isProjectLibrary) {
if (!isProjectLibrary) {
checkSensorsSDK()
}
ModuleUtils.checkModuleStatus(urlClassLoader)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by renqingyou on 2018/12/01.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,7 @@ package com.sensorsdata.analytics.android.plugin

import com.android.build.gradle.BaseExtension
import com.sensorsdata.analytics.android.plugin.configs.SAConfigHookHelper
import com.sensorsdata.analytics.android.plugin.utils.Logger

class SensorsAnalyticsTransformHelper {
SensorsAnalyticsExtension extension
Expand Down Expand Up @@ -87,7 +88,7 @@ class SensorsAnalyticsTransformHelper {
}

void onTransform() {
println("sensorsAnalytics {\n" + extension + "\n}")
Logger.info("sensorsAnalytics {\n" + extension + "\n}")
ArrayList<String> excludePackages = extension.exclude
if (excludePackages != null) {
exclude.addAll(excludePackages)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by wangzhuozhou on 2015/08/12.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by renqingyou on 2018/12/01.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by renqingyou on 2018/12/01.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by zhangwei on 2020/05/21.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by zhangwei on 2021/08/09.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by zhangwei on 2020/05/21.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by wangzhuozhou on 2015/08/12.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,19 +33,31 @@ class Logger {
* 打印提示信息
*/
static void printCopyright() {
println()
println("${LogUI.C_BLACK_GREEN.value}" + "####################################################################" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### 欢迎使用 SensorsAnalytics® (v" + SensorsAnalyticsTransform.VERSION + ")编译插件 ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### 使用过程中碰到任何问题请联系我们 ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### QQ 群号:785122381 ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### GitHub 地址: ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### https://github.com/sensorsdata/sa-sdk-android-plugin2 ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "####################################################################" + "${LogUI.E_NORMAL.value}")
println()
if (debug) {
println()
println("${LogUI.C_BLACK_GREEN.value}" + "####################################################################" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### 欢迎使用 SensorsAnalytics® (v" + SensorsAnalyticsTransform.VERSION + ")编译插件 ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### 使用过程中碰到任何问题请联系我们 ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### QQ 群号:785122381 ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### GitHub 地址: ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### https://github.com/sensorsdata/sa-sdk-android-plugin2 ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "### ###" + "${LogUI.E_NORMAL.value}")
println("${LogUI.C_BLACK_GREEN.value}" + "####################################################################" + "${LogUI.E_NORMAL.value}")
println()
}
}

static void printPluginConfig(boolean disableSensorsAnalyticsMultiThread, boolean disableSensorsAnalyticsIncremental,
boolean isIncremental, boolean isHookOnMethodEnter) {
if (debug) {
println("[SensorsAnalytics]: 是否开启多线程编译:${!disableSensorsAnalyticsMultiThread}")
println("[SensorsAnalytics]: 是否开启增量编译:${!disableSensorsAnalyticsIncremental}")
println("[SensorsAnalytics]: 此次是否增量编译:$isIncremental")
println("[SensorsAnalytics]: 是否在方法进入时插入代码:$isHookOnMethodEnter")
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by wangzhuozhou on 2015/08/12.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Created by wangzhuozhou on 2015/08/12.
* Copyright 2015-2022 Sensors Data Inc.
* Copyright 2015-2023 Sensors Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 8f44686

Please sign in to comment.