Skip to content

Commit 2f8caed

Browse files
miominYorkShen
authored andcommitted
* [android] Merge WeexCore-master to master.
1 parent 62439ca commit 2f8caed

File tree

507 files changed

+47535
-16893
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

507 files changed

+47535
-16893
lines changed

android/commons/build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
apply plugin: 'com.android.library'
33

44
android {
5+
6+
publishNonDefault true
57
compileSdkVersion project.compileSdkVersion
68
buildToolsVersion project.buildToolsVersion
79
resourcePrefix "weexcomm"
@@ -27,14 +29,22 @@ android {
2729
minifyEnabled false
2830
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2931
}
32+
33+
debug {
34+
jniDebuggable true
35+
debuggable true
36+
37+
}
3038
}
3139
}
3240

3341
dependencies {
3442
compile fileTree(dir: 'libs', include: ['*.jar'])
3543
compile "com.android.support:support-v4:${project.supportLibVersion}"
3644
compile "com.android.support:appcompat-v7:${project.supportLibVersion}"
37-
compile project(':weex_sdk')
45+
// compile project(':weex_sdk')
46+
debugCompile project(path: ':weex_sdk', configuration: 'debug')
47+
releaseCompile project(path: ':weex_sdk', configuration: 'release')
3848
compile 'com.squareup.picasso:picasso:2.5.2'
3949
compile 'com.facebook.fresco:fresco:0.10.0'
4050
compile 'com.taobao.android.weex_inspection:protocol:1.1.4.1'

android/commons/src/main/java/com/alibaba/weex/commons/AbstractWeexActivity.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ protected void renderPage(String template,String source,String jsonInitData){
124124
template,
125125
options,
126126
jsonInitData,
127-
ScreenUtil.getDisplayWidth(this),
128-
ScreenUtil.getDisplayHeight(this),
129127
WXRenderStrategy.APPEND_ASYNC);
130128
}
131129

@@ -143,8 +141,6 @@ protected void renderPageByURL(String url,String jsonInitData){
143141
url,
144142
options,
145143
jsonInitData,
146-
ScreenUtil.getDisplayWidth(this),
147-
ScreenUtil.getDisplayHeight(this),
148144
WXRenderStrategy.APPEND_ASYNC);
149145
}
150146

android/commons/src/main/java/com/alibaba/weex/commons/adapter/FrescoImageComponent.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import android.support.annotation.NonNull;
2323
import android.widget.ImageView;
2424
import com.taobao.weex.WXSDKInstance;
25-
import com.taobao.weex.dom.WXDomObject;
25+
import com.taobao.weex.ui.action.BasicComponentData;
2626
import com.taobao.weex.ui.component.WXImage;
2727
import com.taobao.weex.ui.component.WXVContainer;
2828

@@ -31,8 +31,8 @@
3131
*/
3232
public class FrescoImageComponent extends WXImage {
3333

34-
public FrescoImageComponent(WXSDKInstance instance, WXDomObject node, WXVContainer parent) {
35-
super(instance, node, parent);
34+
public FrescoImageComponent(WXSDKInstance instance, WXVContainer parent, BasicComponentData basicComponentData) {
35+
super(instance, parent, basicComponentData);
3636
}
3737

3838
@Override

android/commons/src/main/java/com/alibaba/weex/commons/adapter/ImageAdapter.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ public void run() {
5454
if (url.startsWith("//")) {
5555
temp = "http:" + url;
5656
}
57-
if (view.getLayoutParams().width <= 0 || view.getLayoutParams().height <= 0) {
58-
return;
59-
}
60-
6157

6258
if(!TextUtils.isEmpty(strategy.placeHolder)){
6359
Picasso.Builder builder=new Picasso.Builder(WXEnvironment.getApplication());

android/playground/app/build.gradle

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ android {
1111
versionCode 17
1212
versionName "0.18.0-beta-3"
1313
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
14+
multiDexEnabled true
1415
ndk{
15-
abiFilters "x86"
16-
abiFilters "armeabi"
16+
abiFilters "armeabi","x86"
1717
}
1818
}
1919
applicationVariants.all { variant ->
@@ -35,7 +35,8 @@ android {
3535
}
3636
buildTypes {
3737
debug {
38-
testCoverageEnabled false
38+
jniDebuggable true
39+
debuggable true
3940
}
4041
}
4142
sourceSets {
@@ -59,13 +60,16 @@ android {
5960
dexOptions {
6061
preDexLibraries false
6162
}
63+
6264
}
6365

6466

6567
dependencies {
6668
compile fileTree(include: ['*.jar'], dir: 'libs')
6769
androidTestCompile "com.android.support:support-annotations:${project.supportLibVersion}"
6870
androidTestCompile 'junit:junit:4.12'
71+
androidTestCompile 'org.awaitility:awaitility:3.0.0'
72+
androidTestCompile 'org.awaitility:awaitility-proxy:3.0.0'
6973
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
7074
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.2', {
7175
exclude group: 'com.android.support', module: 'support-annotations'
@@ -79,15 +83,20 @@ dependencies {
7983
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
8084
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
8185
/*source dependency*/
82-
compile project(':weex_sdk')
86+
87+
debugCompile project(path: ':commons', configuration: 'debug')
88+
releaseCompile project(path: ':commons', configuration: 'release')
89+
90+
debugCompile project(path: ':weex_sdk', configuration: 'debug')
91+
releaseCompile project(path: ':weex_sdk', configuration: 'release')
8392

8493
//https://github.com/weexteam/weex-analyzer-android
8594
//Weex-Analyzer provides several convenient tools such as Memory Monitor
8695
// to optimize your application. It's not available by default,you can
8796
// set WXAnalyzerDelegate#DEBUG==true to enable it
8897
debugCompile 'com.taobao.android:weex_analyzer:0.1.0.5'
8998

90-
compile project(':commons')
99+
91100
compile 'com.taobao.android:dexposed:0.1.8'
92101
compile 'com.loopj.android:android-async-http:1.4.9@aar'
93102
compile 'com.facebook.fresco:fresco:0.12.0+'
@@ -104,5 +113,6 @@ dependencies {
104113
compile 'com.jakewharton.scalpel:scalpel:1.1.2'
105114
compile 'com.taobao.android.weex_inspection:urlconnection_interceptor:1.0.0'
106115
compile 'com.android.support.test.espresso:espresso-idling-resource:2.2.2'
107-
compile 'com.taobao.android:weex_inspector:0.13.5-multicontext'
108-
}
116+
compile 'com.taobao.android:weex_inspector:0.11.0'
117+
//compile project(":weex_inspector")
118+
}

android/playground/app/src/androidTest/java/com/alibaba/weex/benchmark/BenchmarkActivityTestRule.java

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)