You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ef...@apache.org on 2019/04/09 09:39:55 UTC

[incubator-weex] branch master updated: Update build.gradle for disableCov property and delete closure

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 204c7b5  Update build.gradle for disableCov property and delete closure
     new 9e4c648  Merge pull request #2292 from YorkShen/android_gradle_update
204c7b5 is described below

commit 204c7b5d8caec869867c012522a787b0fbb74955
Author: YorkShen <sh...@gmail.com>
AuthorDate: Tue Apr 9 17:28:45 2019 +0800

    Update build.gradle for disableCov property and delete closure
---
 android/build.gradle     |  2 ++
 android/sdk/build.gradle | 11 ++++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/android/build.gradle b/android/build.gradle
index 52b03ac..d28291e 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -54,6 +54,8 @@ subprojects {
         armABIOnly = !project.hasProperty("armABIOnly") || armABIOnly.equals('true')
         //Default value for buildCpp is true
         buildCpp = !project.hasProperty("buildCpp") || buildCpp.equals("true")
+        //Default value for disableCov is false
+        disableCov = project.hasProperty("disableCov") && disableCov.equals("true")
     }
 }
 
diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle
index 3733278..f7cca20 100755
--- a/android/sdk/build.gradle
+++ b/android/sdk/build.gradle
@@ -26,7 +26,9 @@ buildscript {
     }
     dependencies {
         classpath 'com.android.tools.build:gradle:2.3.3'
-        classpath 'com.vanniktech:gradle-android-junit-jacoco-plugin:0.5.0'
+        if(!project.disableCov) {
+            classpath 'com.vanniktech:gradle-android-junit-jacoco-plugin:0.5.0'
+        }
     }
 }
 
@@ -39,8 +41,7 @@ apply plugin: 'checkstyle'
 apply plugin: 'com.jfrog.bintray'
 apply plugin: 'com.github.dcendents.android-maven'
 
-ext.disableCov = project.hasProperty('disableCov') ? project.getProperty('disableCov') : 'false'
-if(!disableCov.toBoolean()){
+if(!project.disableCov){
     apply plugin: 'com.vanniktech.android.junit.jacoco'
     junitJacoco {
         excludes = ['com/taobao/weex/dom/flex/**','com/taobao/weex/ui/view/refresh/circlebar/**']
@@ -405,9 +406,9 @@ def copy_so_and_backup() {
     }
 }
 
-task deleteLibs(type: Delete){
+task deleteLibs(type: Delete){ item->
     project.android.defaultConfig.ndk.abiFilters.each{
-        delete "libs/${it}/libweexcore.so", "libs/${it}/libweexjss.so"
+        item.delete "libs/${it}/libweexcore.so", "libs/${it}/libweexjss.so"
     }
 }