Skip to content

Commit

Permalink
modify:
Browse files Browse the repository at this point in the history
1、add android dokit v3.2.0 & 3.1.8.0
  • Loading branch information
jackjintai committed Aug 7, 2020
1 parent eb8ad07 commit 270106b
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 50 deletions.
4 changes: 2 additions & 2 deletions Android/java/app/doraemonkit.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if (rootProject.ext.config["runType"] == 0) {
// 引用插件
//apply plugin: 'com.didi.dokit.debug'
apply plugin: 'com.didi.dokit'
apply plugin: 'com.didi.dokit.debug'
// apply plugin: 'com.didi.dokit'
// 这里引用正常库
dependencies {
//外部平台依赖
Expand Down
4 changes: 2 additions & 2 deletions Android/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
repositories {
google()
jcenter()
maven { url 'http://artifactory.intra.xiaojukeji.com/artifactory/public' }
// maven { url 'http://artifactory.intra.xiaojukeji.com/artifactory/public' }
maven {
//本地插件地址
url uri(rootProject.ext.config["localRepoURL"])
Expand All @@ -23,7 +23,7 @@ allprojects {
repositories {
google()
jcenter()
maven { url 'http://artifactory.intra.xiaojukeji.com/artifactory/public' }
// maven { url 'http://artifactory.intra.xiaojukeji.com/artifactory/public' }
maven {
//本地插件地址
url uri(rootProject.ext.config["localRepoURL"])
Expand Down
4 changes: 2 additions & 2 deletions Android/java/config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ ext {
config = [
//0:运行模式
//1:打包模式
runOrPublish : 1,
runOrPublish : 0,
//0:依赖dokit本地module运行
//1:依赖dokit远程aar运行
runType : 0,
//0:发布到到本地localRepoURL仓库
//1:发布到滴滴内部仓库 一般不建议使用 如果需要发布到滴滴内网仓库需要将版本号改得比较大 假如版本号跟jcenter上的一致会由于缓存导致没法下载最新的jcenter的线上代码
//2:发布到jcenter远程仓库
publishArchivesType: 2,
publishArchivesType: 0,
//本地仓库地址
localRepoURL : "/Users/didi/project/dokit_repo"
]
Expand Down
2 changes: 1 addition & 1 deletion Android/java/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ':app'
include ':doraemonkit'
include ':doraemonkit-rpc'
//include ':doraemonkit-rpc'
include ':doraemonkit-no-op'
include ':doraemonkit-weex'
include ':doraemonkit-leakcanary'
Expand Down
9 changes: 9 additions & 0 deletions Doc/android-ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
DoraemonKit-Android releases
===
## 3.2.0 & 3.0.8.0
1.文件同步助手功能已推出。
详细文档参考:
http://xingyun.xiaojukeji.com/docs/dokit/#/FileList

**注意: 由于文件同步助手的http服务是在终端启动的,暂时没法正常处理https协议的请求。所以要正常使用该功能,需要手动将当前web页面的https协议手动改成http协议,否则浏览器会对当前的请求进行安全拦截,导致不能正常使用该功能。**

2.github issues fixed

## 3.1.8 & 3.0.7.2
1.适配AGP 4.0

Expand Down
83 changes: 54 additions & 29 deletions Doc/android_cn_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

|DoKit|最新版本|描述|
|-|-|-|
|支持Androidx|3.1.8|从v3.1.0版本开始支持androidx|
|支持android support|3.0.7.2|3.0.7.1版本对应3.1.8的功能,后期support将会不定期更新,主要还是看社区的反馈,请大家尽快升级和适配Androidx|
|支持Androidx|3.2.0|从v3.1.0版本开始支持androidx|
|支持android support|3.0.8.0|3.0.8.0版本对应3.2.0的功能,后期support将会不定期更新,主要还是看社区的反馈,请大家尽快升级和适配Androidx|


#### 1. Gradle 依赖

```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.1.8'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:3.1.8'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.2.0'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:3.2.0'
}
```
Expand All @@ -21,20 +21,20 @@ dependencies {

滴滴内部业务线接入请将
```
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.1.8'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.2.0'
```

替换为

```
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-rpc:3.1.8'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-rpc:3.2.0'
```

**注意:**
假如你无法通过 jcenter 下载到依赖库并报了以下的错误

```
ERROR: Failed to resolve: com.didichuxing.doraemonkit:doraemonkit:3.1.8
ERROR: Failed to resolve: com.didichuxing.doraemonkit:doraemonkit:3.2.0
```

建议你可以尝试挂载VPN或通过命令行重试(以Mac系统为例 项目根目录下)
Expand Down Expand Up @@ -63,7 +63,7 @@ DoraemonKit目前已支持Weex工具,包括
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex:3.1.8'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex:3.2.0'
}
```
Expand All @@ -73,7 +73,7 @@ dependencies {
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-leakcanary:3.1.8'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-leakcanary:3.2.0'
}
```
Expand Down Expand Up @@ -118,7 +118,7 @@ AOP包括以下几个功能:
buildscript {
dependencies {
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.1.8'
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.2.0'
}
}
Expand All @@ -135,8 +135,6 @@ apply plugin: 'com.didi.dokit'
添加到app module 的build.gradle文件下 与android {}处于同一级
```groovy
dokitExt {
//dokit 插件开关
dokitPluginSwitch true
//通用设置
comm {
//地图经纬度开关
Expand Down Expand Up @@ -173,7 +171,21 @@ dokitExt {
}
}
```

项目根目录下的gradle.properties文件进行以下配置
```
#dokit全局配置
# 插件开关
DOKIT_PLUGIN_SWITCH=true
# 插件日志
DOKIT_LOG_SWITCH=true
#dokit 慢函数开关
DOKIT_METHOD_SWITCH=true
#dokit 函数调用栈层级
DOKIT_METHOD_STACK_LEVEL=4
#0:默认模式 打印函数调用栈 需添加指定入口 默认为application onCreate 和attachBaseContext
#1:普通模式 运行时打印某个函数的耗时 全局业务代码函数插入
DOKIT_METHOD_STRATEGY=0
```

#### 4. 自定义功能组件(可选)

Expand Down Expand Up @@ -225,22 +237,26 @@ public void onCreate() {
**DoraemonKit入口api**
```
object DoraemonKit {
//不需要productId
@JvmStatic
fun install(app: Application) {
}
//需要productId
@JvmStatic
fun install(app: Application, productId: String) {
}
//用户自定义用户专区分组
@JvmStatic
fun install(app: Application, mapKits: LinkedHashMap<String, MutableList<AbstractKit>>) {
}
@JvmStatic
fun install(app: Application, mapKits: LinkedHashMap<String, MutableList<AbstractKit>>, productId: String) {
}
//默认用户专区分组
@JvmStatic
fun install(app: Application, listKits: MutableList<AbstractKit>) {
}
@JvmStatic
fun install(app: Application, listKits: MutableList<AbstractKit>, productId: String) {
}
Expand All @@ -252,25 +268,18 @@ object DoraemonKit {
* @param productId Dokit平台端申请的productId
*/
@JvmStatic
private fun install(app: Application, mapKits: LinkedHashMap<String, MutableList<AbstractKit>>? = linkedMapOf(), listKits: MutableList<AbstractKit>? = mutableListOf(), productId: String? = "") {
private fun install(app: Application, mapKits: LinkedHashMap<String, MutableList<AbstractKit>>? = linkedMapOf(), listKits: MutableList<AbstractKit>? = mutableListOf(), productId: String? = "") {
}
//h5任意门回调
@JvmStatic
fun setWebDoorCallback(callback: WebDoorManager.WebDoorCallback?) {
}
//显示mainIcon
@JvmStatic
fun show() {
}
//隐藏mainIcon
@JvmStatic
fun hide() {
}
/**
* 直接显示工具面板页面
*/
Expand All @@ -285,7 +294,9 @@ object DoraemonKit {
fun hideToolPanel() {
}
@JvmStatic
fun hide() {
}
/**
* 禁用app信息上传开关,该上传信息只为做DoKit接入量的统计,如果用户需要保护app隐私,可调用该方法进行禁用
Expand All @@ -308,6 +319,20 @@ object DoraemonKit {
@JvmStatic
fun setAwaysShowMainIcon(awaysShow: Boolean) {
}
/**
* 设置加密数据库密码
*/
@JvmStatic
fun setDatabasePass(map: Map<String, String>) {
}
/**
* 设置文件管理助手http端口号
*/
@JvmStatic
fun setFileManagerHttpPort(port: Int) {
}
}
```
Expand Down
32 changes: 23 additions & 9 deletions Doc/android_en_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

|DoKit|new Version|Desc|
|- |- |- |
|support Androidx|3.1.8|support Androidx from v3.1.0|
|supprot android support|3.0.7.2|Version 3.0.7.2 corresponds to the function of 3.1.8. Later support will be updated from time to time, mainly based on community feedback, please upgrade and adapt to Androidx as soon as possible|
|support Androidx|3.2.0|support Androidx from v3.1.0|
|supprot android support|3.0.8.0|Version 3.0.8.0 corresponds to the function of 3.2.0. Later support will be updated from time to time, mainly based on community feedback, please upgrade and adapt to Androidx as soon as possible|


#### 1. DoKit SDK Dependencie

```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.1.8'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:3.1.8'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.2.0'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:3.2.0'
}
```

Expand All @@ -21,7 +21,7 @@ dependencies {
If you cannot download the dependent library through jcenter and report the following error

```
ERROR: Failed to resolve: com.didichuxing.doraemonkit:doraemonkit:3.1.8
ERROR: Failed to resolve: com.didichuxing.doraemonkit:doraemonkit:3.2.0
```

You can try again from the command line (take Mac system as an example under the project root directory)
Expand All @@ -47,7 +47,7 @@ If you need to support Weex, you can directly add the following dependencies
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex:3.1.8'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex:3.2.0'
}
```
Expand All @@ -57,7 +57,7 @@ If you need to integrate LeakCanary, you can directly add the following dependen
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-leakcanary:3.1.8'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-leakcanary:3.2.0'
}
```
Expand Down Expand Up @@ -89,7 +89,7 @@ Plugin includes the following functions:
```groovy
buildscript {
dependencies {
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.1.8'
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.2.0'
}
}
```
Expand All @@ -105,7 +105,6 @@ Added to the app module's build.gradle file at the same level as android {}
```groovy
dokitExt {
//dokit plugin switch
dokitPluginSwitch true
comm {
gpsSwitch true
Expand Down Expand Up @@ -141,6 +140,21 @@ dokitExt {
}
}
```
The gradle.properties file in the project root directory is configured as follows
```
# dokit global configuration
# Plug-in switch
DOKIT_PLUGIN_SWITCH=true
# Plugin log
DOKIT_LOG_SWITCH=true
# dokit slow function switch
DOKIT_METHOD_SWITCH=true
# dokit function call stack level
DOKIT_METHOD_STACK_LEVEL=4
# 0:The default mode is to print the function call stack, and the specified entry needs to be added. The default is application onCreate and attachBaseContext
# 1:Normal mode prints the time consuming of a certain function when running, inserts global business code functions
DOKIT_METHOD_STRATEGY=0
```



Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div align="center">
<img src="https://javer.oss-cn-shanghai.aliyuncs.com/doraemon/github/DoraemonKit_github.png" width = "150" height = "150" alt="DoraemonKit" align=left />
<img src="https://img.shields.io/github/license/didi/DoraemonKit.svg" align=left />
<img src="https://img.shields.io/badge/Android-3.1.8-blue.svg" align=left />
<img src="https://img.shields.io/badge/Android-3.2.0-blue.svg" align=left />
<img src="https://img.shields.io/badge/iOS-3.0.2-yellow.svg" align=left />
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" align=left />
</div>
Expand Down Expand Up @@ -117,7 +117,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.1.8'
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.2.0'
}
}
Expand All @@ -130,8 +130,8 @@ apply plugin: 'com.didi.dokit'

and then implementation DoKit SDK
```
debugImplementation "com.didichuxing.doraemonkit:doraemonkit:3.1.8"
releaseImplementation "com.didichuxing.doraemonkit:doraemonkit-no-op:3.1.8"
debugImplementation "com.didichuxing.doraemonkit:doraemonkit:3.2.0"
releaseImplementation "com.didichuxing.doraemonkit:doraemonkit-no-op:3.2.0"
```

#### 2、SDK Init
Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div align="center">
<img src="https://javer.oss-cn-shanghai.aliyuncs.com/doraemon/github/DoraemonKit_github.png" width = "150" height = "150" alt="DoraemonKit" align=left />
<img src="https://img.shields.io/github/license/didi/DoraemonKit.svg" align=left />
<img src="https://img.shields.io/badge/Android-3.1.8-blue.svg" align=left />
<img src="https://img.shields.io/badge/Android-3.2.0-blue.svg" align=left />
<img src="https://img.shields.io/badge/iOS-3.0.2-yellow.svg" align=left />
<img src="https://img.shields.io/badge/miniapp-0.0.1-red.svg" align=left />
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" align=left />
Expand Down

0 comments on commit 270106b

Please sign in to comment.