[Android]add flag to configure weex_sdk source
diff --git a/android/build.gradle b/android/build.gradle
index b69e18e..d6e5dad 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -13,8 +13,6 @@
         classpath 'com.android.tools.build:gradle:3.3.2'
     }
 }
-
-
 subprojects {
     repositories {
         google()
@@ -39,27 +37,15 @@
             }
         }
     }
-    ext {
-        compileSdkVersion=26
-        buildToolsVersion="26.0.3"
-        minSdkVersion=14
-        targetSdkVersion=26
-        supportLibVersion="26.0.2"
-        fastjsonLibVersion="1.1.46.android"
-        weexSdkVersion="0.26.1.3-SNAPSHOT"
-    }
-    if(project.name == 'playground'){
-        apply plugin: 'com.android.application'
-        dependencies {
-            implementation "com.taobao.android:weex_sdk:${project.weexSdkVersion}@aar"
-        }
-    }
-    if(project.name == 'commons'){
-        apply plugin: 'com.android.library'
-        dependencies {
-            implementation "com.taobao.android:weex_sdk:${project.weexSdkVersion}@aar"
-        }
-    }
-
+}
+ext {
+    compileSdkVersion=26
+    buildToolsVersion="26.0.3"
+    minSdkVersion=14
+    targetSdkVersion=26
+    supportLibVersion="26.0.2"
+    fastjsonLibVersion="1.1.46.android"
+    weexSdkVersion="0.26.1.3-SNAPSHOT"
+    implementFromWeex = false
 
 }
diff --git a/android/commons/build.gradle b/android/commons/build.gradle
index 29dd4b2..9b99473 100644
--- a/android/commons/build.gradle
+++ b/android/commons/build.gradle
@@ -66,6 +66,13 @@
     testImplementation 'org.powermock:powermock-module-junit4-legacy:1.6.4'
     testImplementation 'org.powermock:powermock-module-testng:1.6.4'
     testImplementation 'org.robolectric:robolectric:3.0-rc3'
+
+    if(project.implementFromWeex){
+        implementation project(':weex_sdk')
+    }
+    else {
+        implementation "com.taobao.android:weex_sdk:${project.weexSdkVersion}@aar"
+    }
 }
 
 if(file('../license/LICENSE').exists()){
diff --git a/android/playground/build.gradle b/android/playground/build.gradle
index 1c99f95..11224c6 100755
--- a/android/playground/build.gradle
+++ b/android/playground/build.gradle
@@ -124,6 +124,13 @@
     // Bind actions to effects. See https://alibaba.github.io/bindingx/
     implementation 'com.alibaba.android:bindingx-core:1.1.1.2@aar'
     implementation 'com.alibaba.android:bindingx_weex_plugin:1.1.1@aar'
+
+    if(project.implementFromWeex){
+        implementation project(':weex_sdk')
+    }
+    else {
+        implementation "com.taobao.android:weex_sdk:${project.weexSdkVersion}@aar"
+    }
 }
 
 if(file('../../license/LICENSE').exists()){