You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2019/07/11 11:43:46 UTC

[incubator-weex-playground] branch master updated: [Android]add flag to configure weex_sdk source

This is an automated email from the ASF dual-hosted git repository.

kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex-playground.git


The following commit(s) were added to refs/heads/master by this push:
     new 866cd99  [Android]add flag to configure weex_sdk source
     new 4f431df  Merge pull request #2 from katherine95s/master
866cd99 is described below

commit 866cd99908ac0b69349c74679807d4794b86c5d2
Author: Katherine Jiang <li...@163.com>
AuthorDate: Thu Jul 11 19:11:59 2019 +0800

    [Android]add flag to configure weex_sdk source
---
 android/build.gradle            | 34 ++++++++++------------------------
 android/commons/build.gradle    |  7 +++++++
 android/playground/build.gradle |  7 +++++++
 3 files changed, 24 insertions(+), 24 deletions(-)

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 @@ buildscript {
         classpath 'com.android.tools.build:gradle:3.3.2'
     }
 }
-
-
 subprojects {
     repositories {
         google()
@@ -39,27 +37,15 @@ subprojects {
             }
         }
     }
-    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 @@ dependencies {
     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 @@ dependencies {
     // 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()){