You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by do...@apache.org on 2019/04/08 12:59:37 UTC

[incubator-weex] branch master updated: * [Android] Update build.gradle (#2287)

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

dongyayun 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 5c398f7  * [Android] Update build.gradle (#2287)
5c398f7 is described below

commit 5c398f7deb97492e8b0e797144c7771234f19cba
Author: YorkShen <sh...@gmail.com>
AuthorDate: Mon Apr 8 20:59:31 2019 +0800

    * [Android] Update build.gradle (#2287)
---
 android/sdk/build.gradle | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle
index 7bfedd2..3733278 100755
--- a/android/sdk/build.gradle
+++ b/android/sdk/build.gradle
@@ -65,15 +65,6 @@ checkstyle {
 version = project.hasProperty('weexVersion')? project.getProperty('weexVersion') : "0.20.0.1"
 
 android {
-    if(project.buildCpp) {
-        delete 'libs/armeabi/libweexcore.so'
-        delete 'libs/armeabi-v7a/libweexcore.so'
-        delete 'libs/x86/libweexcore.so'
-        delete 'libs/armeabi/libweexjss.so'
-        delete 'libs/armeabi-v7a/libweexjss.so'
-        delete 'libs/x86/libweexjss.so'
-    }
-
     compileSdkVersion project.compileSdkVersion
     buildToolsVersion project.buildToolsVersion
     resourcePrefix "weex"
@@ -375,7 +366,7 @@ bintray {
         licenses = ["Apache-2.0"]
         publish = true
         version {
-            //这里填写需要发布的版本号
+            //The version to be published
             name = project.version
         }
     }
@@ -414,9 +405,19 @@ def copy_so_and_backup() {
     }
 }
 
+task deleteLibs(type: Delete){
+    project.android.defaultConfig.ndk.abiFilters.each{
+        delete "libs/${it}/libweexcore.so", "libs/${it}/libweexjss.so"
+    }
+}
+
 afterEvaluate { project ->
     project.tasks.find { (it.name.contains("assembleRelease")) }?.doLast {
         println("begin_copy_so")
         copy_so_and_backup()
     }
-}
+
+    if(project.buildCpp){
+        transformNativeLibsWithStripDebugSymbolForRelease.dependsOn deleteLibs
+    }
+}
\ No newline at end of file