提交 36acadf6 编写于 作者: J jackjintai

android:add dokit v3.1.6

上级 e84a71d3
......@@ -78,7 +78,7 @@ android {
dokitExt {
//dokit 插件开关
dokitPluginSwitch true
//dokitLogSwitch false
dokitLogSwitch true
//通用设置
comm {
//地图经纬度开关
......@@ -145,7 +145,7 @@ dependencies {
implementation rootProject.ext.dependencies["amap_location"]
//腾讯地图定位
implementation rootProject.ext.dependencies["tencent_location"]
debugImplementation rootProject.ext.dependencies["leakcanary-android"]
//debugImplementation rootProject.ext.dependencies["leakcanary-android"]
//百度地图定位
implementation files('libs/BaiduLBS_Android.jar')
// implementation 'com.aliyun.ams:alicloud-android-hotfix:3.2.12'
......
if (rootProject.ext.config["applyPlugin"]) {
// 引用插件
apply plugin: 'com.didi.dokit.debug'
//apply plugin: 'com.didi.dokit'
//apply plugin: 'com.didi.dokit.debug'
apply plugin: 'com.didi.dokit'
// 这里引用正常库
dependencies {
//外部平台依赖
debugImplementation project(":doraemonkit")
debugImplementation project(":doraemonkit-weex")
// debugImplementation project(":doraemonkit-weex")
releaseImplementation project(":doraemonkit-no-op")
// debugImplementation project(":doraemonkit-leakcanary")
//新版线上包
// debugImplementation "com.didichuxing.doraemonkit:doraemonkit:${rootProject.ext.android["jcenterArchivesVersionName"]}"
// //debugImplementation "com.didichuxing.doraemonkit:doraemonkit-leakcanary:${rootProject.ext.android["jcenterArchivesVersionName"]}"
// debugImplementation "com.didichuxing.doraemonkit:doraemonkit-leakcanary:${rootProject.ext.android["jcenterArchivesVersionName"]}"
// releaseImplementation "com.didichuxing.doraemonkit:doraemonkit-no-op:${rootProject.ext.android["jcenterArchivesVersionName"]}"
// debugImplementation "com.didichuxing.doraemonkit:doraemonkit-weex:${rootProject.ext.android["jcenterArchivesVersionName"]}"
......
......@@ -12,7 +12,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.novoda:bintray-release:0.9.2'
//classpath "com.didichuxing.doraemonkit:doraemonkit-plugin:${rootProject.ext.android["pluginVersionName"]}"
classpath "com.didichuxing.doraemonkit:doraemonkit-plugin:${rootProject.ext.android["pluginVersionName"]}"
//classpath "com.didichuxing.doraemonkit:doraemonkit-plugin:3.1.5"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.ext.android["kotlin_version"]}"
}
......
......@@ -4,9 +4,9 @@ ext {
// 线上包不会接入DoraemonKit,测试包会自动接入
applyPlugin : true,
//上传到仓库时需要打开
uploadArchives : false,
uploadArchives : true,
//是否发布插件到远程仓库
publishPluginToRemote: false,
publishPluginToRemote: true,
localRepoURL : "/Users/didi/project/dokit_repo"
]
android = [compileSdkVersion : 29,
......
......@@ -163,11 +163,4 @@ object DoKitExtUtil {
"android.",
"androidx."
)
fun log(tag: String, className: String, methodName: String, access: Int, desc: String, signature: String, thresholdTime: Int) {
if (mDokitLogSwitch) {
println("$tag===matched====> className===$className methodName===$methodName access===$access desc===$desc signature===$signature thresholdTime===$thresholdTime")
}
}
}
\ No newline at end of file
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
// 引用插件
//apply plugin: 'com.didi.dokit'
android {
compileSdkVersion rootProject.ext.android["compileSdkVersion"]
defaultConfig {
minSdkVersion rootProject.ext.android["minSdkVersion"]
targetSdkVersion rootProject.ext.android["targetSdkVersion"]
versionCode rootProject.ext.android["versionCode"]
versionName rootProject.ext.android["versionName"]
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
}
buildTypes {
debug {
minifyEnabled false
}
release {
minifyEnabled false
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${rootProject.ext.android['kotlin_version']}"
implementation 'androidx.appcompat:appcompat:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
package com.didichuxing.doraemonkit
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.didichuxing.doraemonkit.test", appContext.packageName)
}
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.didichuxing.doraemonkit" />
package com.didichuxing.doraemonkit
import android.util.Log
/**
* ================================================
* 作 者:jint(金台)
* 版 本:1.0
* 创建日期:2020/5/15-17:49
* 描 述:
* 修订历史:
* ================================================
*/
class TestClass {
fun test() {
Log.i("TestClass", "======test======")
}
}
\ No newline at end of file
package com.didichuxing.doraemonkit
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
#!/usr/bin/env bash
echo -n "please enter bintray userid ->"
read userid_bintray
echo -n "please enter bintray apikey ->"
read apikey_bintray
../gradlew clean build bintrayUpload -PbintrayUser=${userid_bintray} -PbintrayKey=${apikey_bintray} -PdryRun=false
\ No newline at end of file
#!/usr/bin/env bash
echo -n "please enter bintray userid ->"
read userid_bintray
echo -n "please enter bintray apikey ->"
read apikey_bintray
../gradlew clean build bintrayUpload -PbintrayUser=${userid_bintray} -PbintrayKey=${apikey_bintray} -PdryRun=false
\ No newline at end of file
......@@ -2,7 +2,6 @@ include ':app'
include ':doraemonkit'
//include ':doraemonkit-rpc'
include ':doraemonkit-no-op'
include ':doraemonkit-weex'
//include ':doraemonkit-weex'
//include ':doraemonkit-leakcanary'
//include ':doraemonkit-plugin'
//include ':doraemonkit-test'
DoraemonKit-Android releases
===
## 3.1.6
1.更换dokit的底层插件框架为[booster](https://github.com/didi/booster),兼容性和编译速度得到显著提升
2.github issues fixed
## 3.0.6
1.对齐androidx dokit v3.1.5 版本功能
......
......@@ -2,7 +2,7 @@
|DoKit|最新版本|描述|
|-|-|-|
|支持Androidx|3.1.5|从v3.1.0版本开始支持androidx|
|支持Androidx|3.1.6|从v3.1.0版本开始支持androidx|
|支持android support|3.0.6|3.0.6版本对应3.1.5的功能,后期support将会不定期更新,主要还是看社区的反馈,请大家尽快升级和适配Androidx|
......@@ -11,8 +11,8 @@
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.1.5'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:3.1.5'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.1.6'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:3.1.6'
}
```
......@@ -21,20 +21,20 @@ dependencies {
滴滴内部业务线接入请将
```
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.1.5'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.1.6'
```
替换为
```
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-rpc:3.1.5'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-rpc:3.1.6'
```
**注意:**
假如你无法通过 jcenter 下载到依赖库并报了以下的错误
```
ERROR: Failed to resolve: com.didichuxing.doraemonkit:doraemonkit:3.1.5
ERROR: Failed to resolve: com.didichuxing.doraemonkit:doraemonkit:3.1.6
```
建议你可以尝试挂载VPN或通过命令行重试(以Mac系统为例 项目根目录下)
......@@ -63,7 +63,7 @@ DoraemonKit目前已支持Weex工具,包括
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex:3.1.5'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex:3.1.6'
}
```
......@@ -73,7 +73,7 @@ dependencies {
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-leakcanary:3.1.5'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-leakcanary:3.1.6'
}
```
......@@ -118,7 +118,7 @@ AOP包括以下几个功能:
buildscript {
dependencies {
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.1.5'
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.1.6'
}
}
......
......@@ -2,7 +2,7 @@
|DoKit|new Version|Desc|
|- |- |- |
|support Androidx|3.1.5|support Androidx from v3.1.0|
|support Androidx|3.1.6|support Androidx from v3.1.0|
|supprot android support|3.0.6|Version 3.0.6 corresponds to the function of 3.1.5. Later support will be updated from time to time, mainly based on community feedback, please upgrade and adapt to Androidx as soon as possible|
......@@ -10,8 +10,8 @@
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.1.5'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:3.1.5'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.1.6'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:3.1.6'
}
```
......@@ -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.5
ERROR: Failed to resolve: com.didichuxing.doraemonkit:doraemonkit:3.1.6
```
You can try again from the command line (take Mac system as an example under the project root directory)
......@@ -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.5'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex:3.1.6'
}
```
......@@ -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.5'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-leakcanary:3.1.6'
}
```
......@@ -89,7 +89,7 @@ Plugin includes the following functions:
```groovy
buildscript {
dependencies {
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.1.5'
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.1.6'
}
}
```
......
<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.5-blue.svg" align=left />
<img src="https://img.shields.io/badge/Android-3.1.6-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>
......@@ -117,7 +117,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.1.5'
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.1.6'
}
}
......@@ -130,8 +130,8 @@ apply plugin: 'com.didi.dokit'
and then implementation DoKit SDK
```
debugImplementation "com.didichuxing.doraemonkit:doraemonkit:3.1.5"
releaseImplementation "com.didichuxing.doraemonkit:doraemonkit-no-op:3.1.5"
debugImplementation "com.didichuxing.doraemonkit:doraemonkit:3.1.6"
releaseImplementation "com.didichuxing.doraemonkit:doraemonkit-no-op:3.1.6"
```
#### 2、SDK Init
......
<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.5-blue.svg" align=left />
<img src="https://img.shields.io/badge/Android-3.1.6-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 />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册