提交 1f17a61e 编写于 作者: H haojianglong

Weex线上版本支持

上级 2ba2a1e7
apply plugin: 'com.android.library'
apply from: './upload.gradle'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.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
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.didichuxing.doraemonkit.weex" />
package com.didichuxing.doraemonkit.weex;
import android.app.Application;
/**
* @author haojianglong
* @date 2019-06-11
*/
public class DKWeexInstance {
private DKWeexInstance() {
}
public static DKWeexInstance getInstance() {
return SingleHolder.sInstance;
}
private static class SingleHolder {
private static final DKWeexInstance sInstance = new DKWeexInstance();
}
public void init(Application app) {
}
}
<resources>
<string name="app_name">doraemonkit_weex_no_op</string>
</resources>
apply plugin: 'com.novoda.bintray-release'
// 配置发布
publish {
def groupProjectID = 'com.didichuxing.doraemonkit'
def artifactProjectID = 'doraemonkit-weex-no-op'
def publishVersionID = '0.0.1'
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
include ':app', ':doraemonkit', ':doraemonkit-no-op', ':doraemonkit-aop', ':doraemonkit_weex'
\ No newline at end of file
include ':app', ':doraemonkit', ':doraemonkit-no-op', ':doraemonkit-aop', ':doraemonkit_weex', ':doraemonkit_weex_no_op'
\ No newline at end of file
......@@ -13,6 +13,23 @@ dependencies {
最新版本参见[这里](android-ReleaseNotes.md)
DoraemonKit目前已支持Weex工具,包括
* Console日志查看
* Storage缓存查看
* 容器信息
* DevTool
如果有需要支持Weex的需求可以直接添加下面依赖
```
dependencies {
...
debugImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex:0.0.1'
releaseImplementation 'com.didichuxing.doraemonkit:doraemonkit-weex-no-op:0.0.1'
...
}
```
#### 2. 初始化
......@@ -35,6 +52,23 @@ public void onCreate() {
}
```
如果已接入了Weex工具(暂不支持自定义功能组件),使用下面方式初始化
```
@Override
public void onCreate() {
...
DKWeexInstance.install(application)
// H5任意门功能需要,非必须
DoraemonKit.setWebDoorCallback(new WebDoorManager.WebDoorCallback() {
@Override
public void overrideUrlLoading(Context context, String s) {
// 使用自己的H5容器打开这个链接
}
...
}
```
#### 3. 流量监控功能(可选)
......
......@@ -67,7 +67,7 @@ DoraemonKit 是一个功能集合面板,能够让每一个 App 快速接入一
3. **【对齐标尺】** 参考 Android 系统自带测试工具,能够实时捕获屏幕坐标,并且可以查看组件是否对齐;
4. **【元素边框线】** 绘制出每一个 UI 组件的边框,对于组件布局有一定的参考意义。
### 四、Weex专项工具(iOS)
### 四、Weex专项工具
1. **【console日志查看】** 方便在端上查看每一个Weex文件中的console日志,提供分级和搜索功能;
2. **【storage缓存查看】** 将Weex中的storage模块的本地缓存数据可视化展示;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册