Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
* [Android] Update build.gradle (#2287)
Browse files Browse the repository at this point in the history
  • Loading branch information
YorkShen authored and Darin726 committed Apr 8, 2019
1 parent 36f023e commit 5c398f7
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions android/sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -375,7 +366,7 @@ bintray {
licenses = ["Apache-2.0"]
publish = true
version {
//这里填写需要发布的版本号
//The version to be published
name = project.version
}
}
Expand Down Expand Up @@ -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
}
}

0 comments on commit 5c398f7

Please sign in to comment.