提交 7a731056 编写于 作者: J jackjintai

modify

1、add Android sdk v3.0_beta1
上级 556980f0
......@@ -61,13 +61,13 @@ android {
}
//dokit 扩展
dokitExt {
dokitPluginSwitch = true
slowMethodSwitch = true
//单位为us 1000us =1ms
thresholdTime = 200
packageNames = ["com.didichuxing.doraemondemo"]
}
//dokitExt {
// dokitPluginSwitch = true
// slowMethodSwitch = true
// //单位为us 1000us =1ms
// thresholdTime = 200
// packageNames = ["com.didichuxing.doraemondemo"]
//}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
......
......@@ -4,17 +4,17 @@ if (rootProject.ext.config["applyPlugin"]) {
// 这里引用正常库
dependencies {
//外部平台依赖
debugImplementation project(":doraemonkit")
debugImplementation project(":doraemonkit-leakcanary")
debugImplementation project(":doraemonkit-weex")
releaseImplementation project(":doraemonkit-no-op")
releaseImplementation project(":doraemonkit-weex-no-op")
// debugImplementation project(":doraemonkit")
// debugImplementation project(":doraemonkit-leakcanary")
// debugImplementation project(":doraemonkit-weex")
// releaseImplementation project(":doraemonkit-no-op")
// releaseImplementation project(":doraemonkit-weex-no-op")
//新版线上包
// debugImplementation "com.didichuxing.doraemonkit:doraemonkit:${rootProject.ext.android["didiArchivesVersionName"]}"
// debugImplementation "com.didichuxing.doraemonkit:doraemonkit-leakcanary:${rootProject.ext.android["didiArchivesVersionName"]}"
// releaseImplementation "com.didichuxing.doraemonkit:doraemonkit-no-op:${rootProject.ext.android["didiArchivesVersionName"]}"
// debugImplementation "com.didichuxing.doraemonkit:doraemonkit-weex:${rootProject.ext.android["didiArchivesVersionName"]}"
// releaseImplementation "com.didichuxing.doraemonkit:doraemonkit-weex-no-op:${rootProject.ext.android["didiArchivesVersionName"]}"
debugImplementation "com.didichuxing.doraemonkit:doraemonkit:${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"]}"
releaseImplementation "com.didichuxing.doraemonkit:doraemonkit-weex-no-op:${rootProject.ext.android["jcenterArchivesVersionName"]}"
}
} else {
......
......@@ -4,10 +4,10 @@ buildscript {
repositories {
google()
jcenter()
maven {
//本地插件地址
url uri(rootProject.ext.config["localRepoURL"])
}
// maven {
// //本地插件地址
// url uri(rootProject.ext.config["localRepoURL"])
// }
//北京maven库
maven { url 'http://artifactory.intra.xiaojukeji.com/artifactory/public/' }
maven { url 'https://www.jitpack.io' }
......@@ -16,7 +16,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.novoda:bintray-release:0.9.2'
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:1000.0.2'
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.0_beta1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
......@@ -26,10 +26,10 @@ allprojects {
repositories {
google()
jcenter()
maven {
//本地插件地址
url uri(rootProject.ext.config["localRepoURL"])
}
// maven {
// //本地插件地址
// url uri(rootProject.ext.config["localRepoURL"])
// }
//北京maven库
maven { url 'http://artifactory.intra.xiaojukeji.com/artifactory/public/' }
maven { url 'https://www.jitpack.io' }
......
......@@ -17,9 +17,9 @@ ext {
//app版本号
versionCode : 224,
//dokit 插件版本号
pluginVersionName : "1000.0.2",
pluginVersionName : "3.0_beta1",
//jcenter dokit版本号
jcenterArchivesVersionName: "2.2.4",
jcenterArchivesVersionName: "3.0_beta1",
//didi内部仓库版本号
didiArchivesVersionName : "1000.0.21",
//打包上传时 dokit的版本名字
......
# 解决 http://tools.android.com/tech-docs/new-build-system/gradle-experimental 问题
android.useDeprecatedNdk=true
GROUP_ID=com.didichuxing.doraemonkit
ARTIFACT_ID=doraemonkit-leakcanary
VERSION=1000.0.0
RELEASE_REPOSITORY_URL=http://artifactory.intra.xiaojukeji.com/artifactory/libs-release/
SNAPSHOT_REPOSITORY_URL=http://artifactory.intra.xiaojukeji.com/artifactory/libs-snapshot/
USERNAME=deployment
PASSWORD=deployment123
\ No newline at end of file
def isRemote = rootProject.ext.config["publishPluginToRemote"]
apply plugin: 'maven'
if (isRemote) {
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["didiArchivesVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each { dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: project.RELEASE_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
snapshotRepository(url: project.SNAPSHOT_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
}
}
}
} else {
def localRepoURL = uri(rootProject.ext.config["localRepoURL"])
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["didiArchivesVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each { dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: localRepoURL)
}
}
}
}
apply plugin: 'com.novoda.bintray-release'
// 配置发布
publish {
def groupProjectID = 'com.didichuxing.doraemonkit'
def artifactProjectID = 'doraemonkit-leakcanary'
def publishVersionID = "${rootProject.ext.android["jcenterArchivesVersionName"]}"
userOrg = 'doraemonkit'
repoName = 'DoraemonKit'
groupId = groupProjectID
artifactId = artifactProjectID
publishVersion = publishVersionID
desc = '{library description}'
website = '{github_url}'
}
\ 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
# 解决 http://tools.android.com/tech-docs/new-build-system/gradle-experimental 问题
android.useDeprecatedNdk=true
GROUP_ID=com.didichuxing.doraemonkit
ARTIFACT_ID=doraemonkit-no-op
VERSION=1000.0.0
RELEASE_REPOSITORY_URL=http://artifactory.intra.xiaojukeji.com/artifactory/libs-release/
SNAPSHOT_REPOSITORY_URL=http://artifactory.intra.xiaojukeji.com/artifactory/libs-snapshot/
USERNAME=deployment
PASSWORD=deployment123
\ No newline at end of file
def isRemote = rootProject.ext.config["publishPluginToRemote"]
apply plugin: 'maven'
if(isRemote){
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["didiArchivesVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each {dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: project.RELEASE_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
snapshotRepository(url: project.SNAPSHOT_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
}
}
}
}else{
def localRepoURL = uri(rootProject.ext.config["localRepoURL"])
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["didiArchivesVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each { dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: localRepoURL)
}
}
}
}
apply plugin: 'com.novoda.bintray-release'
// 配置发布
publish {
def groupProjectID = 'com.didichuxing.doraemonkit'
def artifactProjectID = 'doraemonkit-no-op'
def publishVersionID = "${rootProject.ext.android["jcenterArchivesVersionName"]}"
userOrg = 'doraemonkit'
repoName = 'DoraemonKit'
groupId = groupProjectID
artifactId = artifactProjectID
publishVersion = publishVersionID
desc = '{library description}'
website = '{github_url}'
}
\ 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
# 解决 http://tools.android.com/tech-docs/new-build-system/gradle-experimental 问题
android.useDeprecatedNdk=true
GROUP_ID=com.didichuxing.doraemonkit
ARTIFACT_ID=doraemonkit-plugin
VERSION=1000.0.0
RELEASE_REPOSITORY_URL=http://artifactory.intra.xiaojukeji.com/artifactory/libs-release/
SNAPSHOT_REPOSITORY_URL=http://artifactory.intra.xiaojukeji.com/artifactory/libs-snapshot/
USERNAME=deployment
PASSWORD=deployment123
\ No newline at end of file
......@@ -33,7 +33,10 @@ public final class DokitCommClassAdapter extends ClassVisitor {
private DokitExtension dokitExtension;
/**
* @param cv 传进来的是 ClassWriter
*
* @param cv cv
* @param appExtension appExtension
* @param dokitExtension dokitExtension
*/
public DokitCommClassAdapter(final ClassVisitor cv, AppExtension appExtension, DokitExtension dokitExtension) {
super(Opcodes.ASM7, cv);
......
......@@ -38,8 +38,12 @@ public final class DokitSlowMethodClassAdapter extends ClassVisitor {
*/
private int thresholdTime = 500;
/**
* @param cv 传进来的是 ClassWriter
*
* @param cv cv 传进来的是 ClassWriter
* @param appExtension appExtension
* @param dokitExtension dokitExtension
*/
public DokitSlowMethodClassAdapter(final ClassVisitor cv, AppExtension appExtension, DokitExtension dokitExtension) {
super(Opcodes.ASM7, cv);
......@@ -108,7 +112,6 @@ public final class DokitSlowMethodClassAdapter extends ClassVisitor {
/**
* access值得计算方式为Opcodes.ACC_PUBLIC & Opcodes.ACC_STATIC
* <p>
* Visits a method of the class. This method <i>must</i> return a new {@link MethodVisitor}
* instance (or {@literal null}) each time it is called, i.e., it should not return a previously
......
......@@ -26,8 +26,12 @@ public final class DokitUrlConnectionClassAdapter extends ClassVisitor {
private DokitExtension dokitExtension;
/**
* @param cv 传进来的是 ClassWriter
*
* @param cv cv 传进来的是 ClassWriter
* @param appExtension appExtension
* @param dokitExtension dokitExtension
*/
public DokitUrlConnectionClassAdapter(final ClassVisitor cv, AppExtension appExtension, DokitExtension dokitExtension) {
super(Opcodes.ASM7, cv);
......
......@@ -41,6 +41,7 @@ public final class SlowMethodAdapter extends AdviceAdapter {
super(Opcodes.ASM7, methodVisitor, access, methodName, descriptor);
this.className = className;
this.thresholdTime = thresholdTime;
//access值得计算方式为 Opcodes.ACC_PUBLIC & Opcodes.ACC_STATIC
this.isStaticMethod = (access & Opcodes.ACC_STATIC) != 0;
}
......
......@@ -21,7 +21,7 @@ public final class UrlConnectionMethodAdapter extends LocalVariablesSorter imple
* @param owner 调用对象
* @param name 函数名
* @param desc 函数签名
* @param isInterface
* @param isInterface 是否是接口
*/
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean isInterface) {
......
def isRemote = rootProject.ext.config["publishPluginToRemote"]
apply plugin: 'maven'
if (isRemote) {
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["pluginVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each { dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: project.RELEASE_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
snapshotRepository(url: project.SNAPSHOT_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
}
}
}
} else {
def localRepoURL = uri(rootProject.ext.config["localRepoURL"])
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["pluginVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each { dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: localRepoURL)
}
}
}
}
apply plugin: 'com.novoda.bintray-release'
// 配置发布
publish {
def groupProjectID = 'com.didichuxing.doraemonkit'
def artifactProjectID = 'doraemonkit-plugin'
def publishVersionID = "${rootProject.ext.android["jcenterArchivesVersionName"]}"
userOrg = 'doraemonkit'
repoName = 'DoraemonKit'
groupId = groupProjectID
artifactId = artifactProjectID
publishVersion = publishVersionID
desc = '{library description}'
website = '{github_url}'
}
\ 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
......@@ -54,7 +54,7 @@ dependencies {
compileOnly rootProject.ext.dependencies["didi_rpc"]
//此处需要使用api的形式 向上暴露内部api
if (rootProject.ext.config["uploadArchives"]) {
api "com.didichuxing.doraemonkit:doraemonkit:${rootProject.ext.android["didiArchivesVersionName"]}"
api "com.didichuxing.doraemonkit:doraemonkit:${rootProject.ext.android["jcenterArchivesVersionName"]}"
} else {
api project(':doraemonkit')
}
......
# 解决 http://tools.android.com/tech-docs/new-build-system/gradle-experimental 问题
android.useDeprecatedNdk=true
GROUP_ID=com.didichuxing.doraemonkit
ARTIFACT_ID=doraemonkit-rpc
VERSION=1000.0.0
RELEASE_REPOSITORY_URL=http://artifactory.intra.xiaojukeji.com/artifactory/libs-release/
SNAPSHOT_REPOSITORY_URL=http://artifactory.intra.xiaojukeji.com/artifactory/libs-snapshot/
USERNAME=deployment
PASSWORD=deployment123
\ No newline at end of file
def isRemote = rootProject.ext.config["publishPluginToRemote"]
apply plugin: 'maven'
if (isRemote) {
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["didiArchivesVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each { dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: project.RELEASE_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
snapshotRepository(url: project.SNAPSHOT_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
}
}
}
} else {
def localRepoURL = uri(rootProject.ext.config["localRepoURL"])
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["didiArchivesVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each { dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: localRepoURL)
}
}
}
}
apply plugin: 'com.novoda.bintray-release'
// 配置发布
publish {
def groupProjectID = 'com.didichuxing.doraemonkit'
def artifactProjectID = 'doraemonkit-rpc'
def publishVersionID = "${rootProject.ext.android["jcenterArchivesVersionName"]}"
userOrg = 'doraemonkit'
repoName = 'DoraemonKit'
groupId = groupProjectID
artifactId = artifactProjectID
publishVersion = publishVersionID
desc = '{library description}'
website = '{github_url}'
}
\ 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
def isRemote = rootProject.ext.config["publishPluginToRemote"]
apply plugin: 'maven'
if (isRemote) {
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["didiArchivesVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each { dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: project.RELEASE_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
snapshotRepository(url: project.SNAPSHOT_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
}
}
}
} else {
def localRepoURL = uri(rootProject.ext.config["localRepoURL"])
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["didiArchivesVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each { dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: localRepoURL)
}
}
}
}
apply plugin: 'com.novoda.bintray-release'
// 配置发布
publish {
def groupProjectID = 'com.didichuxing.doraemonkit'
def artifactProjectID = 'doraemonkit-weex-no-op'
def publishVersionID = "${rootProject.ext.android["jcenterArchivesVersionName"]}"
userOrg = 'doraemonkit'
repoName = 'DoraemonKit'
groupId = groupProjectID
artifactId = artifactProjectID
publishVersion = publishVersionID
desc = '{library description}'
website = '{github_url}'
}
\ 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
......@@ -39,7 +39,7 @@ dependencies {
implementation rootProject.ext.dependencies["design"]
implementation rootProject.ext.dependencies["utilcode"]
if (rootProject.ext.config["uploadArchives"]) {
implementation "com.didichuxing.doraemonkit:doraemonkit:${rootProject.ext.android["didiArchivesVersionName"]}"
implementation "com.didichuxing.doraemonkit:doraemonkit:${rootProject.ext.android["jcenterArchivesVersionName"]}"
} else {
implementation project(':doraemonkit')
}
......
# 解决 http://tools.android.com/tech-docs/new-build-system/gradle-experimental 问题
android.useDeprecatedNdk=true
GROUP_ID=com.didichuxing.doraemonkit
ARTIFACT_ID=doraemonkit-weex
VERSION=1000.0.0
RELEASE_REPOSITORY_URL=http://artifactory.intra.xiaojukeji.com/artifactory/libs-release/
SNAPSHOT_REPOSITORY_URL=http://artifactory.intra.xiaojukeji.com/artifactory/libs-snapshot/
USERNAME=deployment
PASSWORD=deployment123
\ No newline at end of file
def isRemote = rootProject.ext.config["publishPluginToRemote"]
apply plugin: 'maven'
if(isRemote){
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["didiArchivesVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each {dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: project.RELEASE_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
snapshotRepository(url: project.SNAPSHOT_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
}
}
}
}else{
def localRepoURL = uri(rootProject.ext.config["localRepoURL"])
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["didiArchivesVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each { dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: localRepoURL)
}
}
}
}
apply plugin: 'com.novoda.bintray-release'
// 配置发布
publish {
def groupProjectID = 'com.didichuxing.doraemonkit'
def artifactProjectID = 'doraemonkit-weex'
def publishVersionID = "${rootProject.ext.android["jcenterArchivesVersionName"]}"
userOrg = 'doraemonkit'
repoName = 'DoraemonKit'
groupId = groupProjectID
artifactId = artifactProjectID
publishVersion = publishVersionID
desc = '{library description}'
website = '{github_url}'
}
\ 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
......@@ -22,12 +22,12 @@ android {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField("String", "DOKIT_VERSION", "\"" + rootProject.ext.android["didiArchivesVersionName"] + "\"")
buildConfigField("String", "DOKIT_VERSION", "\"" + rootProject.ext.android["jcenterArchivesVersionName"] + "\"")
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField("String", "DOKIT_VERSION", "\"" + rootProject.ext.android["didiArchivesVersionName"] + "\"")
buildConfigField("String", "DOKIT_VERSION", "\"" + rootProject.ext.android["jcenterArchivesVersionName"] + "\"")
}
}
// compileOptions {
......
# 解决 http://tools.android.com/tech-docs/new-build-system/gradle-experimental 问题
android.useDeprecatedNdk=true
GROUP_ID=com.didichuxing.doraemonkit
ARTIFACT_ID=doraemonkit
VERSION=1000.0.0
RELEASE_REPOSITORY_URL=http://artifactory.intra.xiaojukeji.com/artifactory/libs-release/
SNAPSHOT_REPOSITORY_URL=http://artifactory.intra.xiaojukeji.com/artifactory/libs-snapshot/
USERNAME=deployment
PASSWORD=deployment123
\ No newline at end of file
......@@ -2,9 +2,7 @@ package com.didichuxing.doraemonkit.kit.network.bean;
import android.text.TextUtils;
import com.google.gson.Gson;
import java.io.Serializable;
import org.json.JSONObject;
/**
* @desc: 一条网络请求记录
......@@ -17,7 +15,6 @@ public class NetworkRecord implements Serializable {
public Request mRequest;
public Response mResponse;
public String mResponseBody;
public String prettyResponse;
public long requestLength;
public long responseLength;
......@@ -41,17 +38,4 @@ public class NetworkRecord implements Serializable {
public boolean isPostRecord() {
return mRequest != null && mRequest.method != null && TextUtils.equals(METHOD_POST, mRequest.method.toLowerCase());
}
public String responseBody() {
if (TextUtils.isEmpty(prettyResponse)){
try {
JSONObject json = new JSONObject(mResponseBody);
prettyResponse = json.toString(2);
}catch (Exception e){
prettyResponse = mResponseBody;
}
}
return prettyResponse;
}
}
def isRemote = rootProject.ext.config["publishPluginToRemote"]
apply plugin: 'maven'
if (isRemote) {
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["didiArchivesVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each { dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: project.RELEASE_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
snapshotRepository(url: project.SNAPSHOT_REPOSITORY_URL) {
authentication(userName: project.USERNAME, password: project.PASSWORD)
}
}
}
}
} else {
def localRepoURL = uri(rootProject.ext.config["localRepoURL"])
uploadArchives {
repositories {
mavenDeployer {
pom.project {
groupId project.GROUP_ID
artifactId project.ARTIFACT_ID
version rootProject.ext.android["didiArchivesVersionName"]
}
pom.withXml {
def node = it.asElement()
def nodeList = node.getElementsByTagName('dependency')
nodeList.each { dependency ->
dependency?.each { config ->
if (config?.textContent == 'the-one-sdk') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
if (config?.textContent == 'onecar') {
config.parentNode.parentNode.removeChild(config.parentNode)
}
}
}
}
repository(url: localRepoURL)
}
}
}
}
apply plugin: 'com.novoda.bintray-release'
// 配置发布
publish {
def groupProjectID = 'com.didichuxing.doraemonkit'
def artifactProjectID = 'doraemonkit'
def publishVersionID = "${rootProject.ext.android["jcenterArchivesVersionName"]}"
userOrg = 'doraemonkit'
repoName = 'DoraemonKit'
groupId = groupProjectID
artifactId = artifactProjectID
publishVersion = publishVersionID
desc = '{library description}'
website = '{github_url}'
}
\ 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
......@@ -5,8 +5,8 @@
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:2.2.2'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:2.2.2'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit:3.0_beta1'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-no-op:3.0_beta1'
}
```
......@@ -14,7 +14,7 @@ dependencies {
假如你无法通过 jcenter 下载到依赖库并报了以下的错误
```
ERROR: Failed to resolve: com.didichuxing.doraemonkit:doraemonkit:2.2.2
ERROR: Failed to resolve: com.didichuxing.doraemonkit:doraemonkit:3.0_beta1
```
建议你可以尝试挂载VPN或通过命令行重试(以Mac系统为例 项目根目录下)
......@@ -38,8 +38,8 @@ DoraemonKit目前已支持Weex工具,包括
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex:2.2.2'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex-no-op:2.2.2'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex:3.0_beta1'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex-no-op:3.0_beta1'
}
```
......@@ -49,7 +49,7 @@ dependencies {
```groovy
dependencies {
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-leakcanary:2.2.2'
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-leakcanary:3.0_beta1'
}
```
......@@ -91,7 +91,7 @@ AOP包括以下几个功能:
buildscript {
dependencies {
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:1.0.0'
classpath 'com.didichuxing.doraemonkit:doraemonkit-plugin:3.0_beta1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
......
<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-2.2.2-blue.svg" align=left />
<img src="https://img.shields.io/badge/Android-3.0_beta1-blue.svg" align=left />
<img src="https://img.shields.io/badge/iOS-2.0.0-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 />
......@@ -40,6 +40,11 @@ DoraemonKit 是一个功能集合面板,能够让每一个 App 快速接入一
## 功能模块
### 一、平台工具(www.dokit.cn)
1. **【数据Mock】** App接口Mock解决方案,提供一套基于App网络拦截的接口Mock方案,无需修改代码即可完成对于接口数据的Mock。
2. **【健康体检】** 一键式操作,整合DoKit多项工具,数据可视化,快速准确定位问题,让你对app的性能了如指掌。
### 一、常用工具
1. **【App 信息查看】** 快速查看手机信息,App 信息,权限信息的渠道,避免去手机设置查找或者查看项目源代码的麻烦;
......@@ -93,6 +98,8 @@ tips : 如果使用我们滴滴优秀的开源跨端方案 [chameleon](https:/
详见 [Doraemon mini program debugger](https://github.com/didi/DoraemonKit/tree/master/miniapp)
## 帮助文档
- [DoKit SDK&平台 文档](http://xingyun.xiaojukeji.com/docs/dokit/#/intro)
## 接入文档
......
<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-2.2.2-blue.svg" align=left />
<img src="https://img.shields.io/badge/Android-3.0——beta1-blue.svg" align=left />
<img src="https://img.shields.io/badge/iOS-2.0.0-yellow.svg" align=left />
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" align=left />
</div>
......@@ -65,11 +65,11 @@ A full-featured App (iOS & Android) development assistant. You deserve it.
<tr>
<td id='yixiangboy'>
<a href='https://github.com/yixiangboy'>
<img src='https://github.com/yixiangboy.png?v=3&s=330' width="165" height="165">
</a>
<img src='https://github.com/yixiangboy.png?v=3&s=330' width="165" height="165">
</a>
<h4 align='center'>
<a href='https://github.com/yixiangboy'>yixiangboy</a>
</h4>
<a href='https://github.com/yixiangboy'>yixiangboy</a>
</h4>
</td>
</tr>
</table>
......@@ -80,61 +80,61 @@ A full-featured App (iOS & Android) development assistant. You deserve it.
<tr>
<td id='wenquanlebao'>
<a href='https://github.com/wenquanlebao'>
<img src='https://github.com/wenquanlebao.png?v=3&s=330' width="165" height="165">
</a>
<img src='https://github.com/wenquanlebao.png?v=3&s=330' width="165" height="165">
</a>
<h4 align='center'>
<a href='https://github.com/wenquanlebao'>wenquanlebao</a>
</h4>
<a href='https://github.com/wenquanlebao'>wenquanlebao</a>
</h4>
</td>
<td id='hiXgb'>
<a href='https://github.com/hiXgb'>
<img src='https://github.com/hiXgb.png?v=3&s=330' width="165" height="165">
</a>
<img src='https://github.com/hiXgb.png?v=3&s=330' width="165" height="165">
</a>
<h4 align='center'>
<a href='https://github.com/hiXgb'>hiXgb</a>
</h4>
<a href='https://github.com/hiXgb'>hiXgb</a>
</h4>
</td>
<td id='teethandnail'>
<a href='https://github.com/teethandnail'>
<img src='https://github.com/teethandnail.png?v=3&s=330' width="165" height="165">
</a>
<img src='https://github.com/teethandnail.png?v=3&s=330' width="165" height="165">
</a>
<h4 align='center'>
<a href='https://github.com/teethandnail'>teethandnail</a>
</h4>
<a href='https://github.com/teethandnail'>teethandnail</a>
</h4>
</td>
<td id='wanglikun7342'>
<a href='https://github.com/wanglikun7342'>
<img src='https://github.com/wanglikun7342.png?v=3&s=330' width="165" height="165">
</a>
<img src='https://github.com/wanglikun7342.png?v=3&s=330' width="165" height="165">
</a>
<h4 align='center'>
<a href='https://github.com/wanglikun7342'>wanglikun7342</a>
</h4>
<a href='https://github.com/wanglikun7342'>wanglikun7342</a>
</h4>
</td>
<td id='Chinnko'>
<a href='https://github.com/Chinnko'>
<img src='https://github.com/Chinnko.png?v=3&s=330' width="165" height="165">
</a>
<img src='https://github.com/Chinnko.png?v=3&s=330' width="165" height="165">
</a>
<h4 align='center'>
<a href='https://github.com/Chinnko'>Chinnko</a>
</h4>
<a href='https://github.com/Chinnko'>Chinnko</a>
</h4>
</td>
</tr>
<tr>
<td id='LinJZong'>
<a href='https://github.com/LinJZong'>
<img src='https://github.com/LinJZong.png?v=3&s=330' width="165" height="165">
</a>
<img src='https://github.com/LinJZong.png?v=3&s=330' width="165" height="165">
</a>
<h4 align='center'>
<a href='https://github.com/LinJZong'>LinJZong</a>
</h4>
<a href='https://github.com/LinJZong'>LinJZong</a>
</h4>
</td>
<td id='y644938647'>
<a href='https://github.com/y644938647'>
<img src='https://github.com/y644938647.png?v=3&s=330' width="165" height="165">
</a>
<img src='https://github.com/y644938647.png?v=3&s=330' width="165" height="165">
</a>
<h4 align='center'>
<a href='https://github.com/y644938647'>y644938647</a>
</h4>
<a href='https://github.com/y644938647'>y644938647</a>
</h4>
</td>
</tr>
</table>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册