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

Commit

Permalink
[Android] Fix task order problem. (#2964)
Browse files Browse the repository at this point in the history
* [Android] Fix task order problem.

* Change shouldRunAfter to mustRunAfter

* Change runAfter to dependsOn.

* Update build.gradle
  • Loading branch information
YorkShen authored and lucky-chen committed Oct 14, 2019
1 parent ce518bc commit 0688a24
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions android/sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ apply plugin: 'checkstyle'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'

apply from: 'buildSrc/asan.gradle'
apply from: 'buildSrc/jcenter.gradle'
apply from: 'buildSrc/unstripped.gradle'
apply from: 'buildSrc/checkStyle.gradle'
apply from: 'buildSrc/download_jsc.gradle'
apply from: 'buildSrc/packageName.gradle'
apply from: 'buildSrc/asan.gradle'

version = project.hasProperty('weexVersion') ? project.getProperty('weexVersion') : '0.26.0.1'

Expand Down Expand Up @@ -228,7 +228,6 @@ android {
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleDependency
compileOnly "com.android.support:recyclerview-v7:${project.supportLibVersion}"
//noinspection GradleDependency
Expand Down Expand Up @@ -284,4 +283,4 @@ task weex_core_license(type: com.hierynomus.gradle.license.tasks.LicenseFormat)
'Source/include/JavaScriptCore/**/*.cpp'])
}

preBuild.dependsOn copyASanLib, checkNdkVersion, licenseFormat
preBuild.dependsOn licenseFormat
7 changes: 5 additions & 2 deletions android/sdk/buildSrc/asan.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ task copyWrapScript(type: Copy,dependsOn: clearASanLibs) {
}
}
}
task copyASanLib(type: Copy,dependsOn: copyWrapScript){
task copyASanLib(type: Copy){
dependsOn copyWrapScript, copyJscToJniDir
if(project.hasProperty('enableASan') && "true" == project.getProperty('enableASan')) {
def ndkPath = ndkDir == '' ? System.getenv("ANDROID_NDK_HOME"):ndkDir
def dir = ndkPath + '/toolchains/llvm/prebuilt/'
Expand All @@ -67,4 +68,6 @@ task copyASanLib(type: Copy,dependsOn: copyWrapScript){
includeEmptyDirs = false
}
}
}
}

preBuild.dependsOn copyASanLib, checkNdkVersion
3 changes: 0 additions & 3 deletions android/sdk/buildSrc/download_jsc.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ task unzipJSC(type: Copy, dependsOn: download) {

task copyJscToJniDir(type: Copy, dependsOn: unzipJSC) {
def libsDir = project.android.sourceSets.main.jniLibs.srcDirs[-1]
doFirst{
delete libsDir
}
from zipTree(aar_file)
into libsDir
include 'jni/**/*.so'
Expand Down

0 comments on commit 0688a24

Please sign in to comment.