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

Commit

Permalink
* [Android] Add buildCPP
Browse files Browse the repository at this point in the history
  • Loading branch information
YorkShen committed Apr 8, 2019
1 parent ab11296 commit 998d745
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
3 changes: 3 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ subprojects {
targetSdkVersion=26
supportLibVersion="26.0.2"
fastjsonLibVersion="1.1.46.android"
//Default value for armABIOnly is true
armABIOnly = !project.hasProperty("armABIOnly") || armABIOnly.equals('true')
//Default value for buildCpp is true
buildCpp = !project.hasProperty("buildCpp") || buildCpp.equals("true")
}
}

Expand Down
25 changes: 14 additions & 11 deletions android/sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,15 @@ android {
abiFilters "armeabi-v7a", "armeabi", "x86"
}
}

externalNativeBuild {
cmake {
arguments '-DANDROID_PLATFORM='+"${api_level}",
'-DANDROID_TOOLCHAIN='+"${compile_tool}",
'-DANDROID_STL='+"${cxx_stl}",
'-DCMAKE_BUILD_TYPE=Release',
'-DENABLE_ASAN=false'
if(project.buildCpp) {
externalNativeBuild {
cmake {
arguments '-DANDROID_PLATFORM=' + "${api_level}",
'-DANDROID_TOOLCHAIN=' + "${compile_tool}",
'-DANDROID_STL=' + "${cxx_stl}",
'-DCMAKE_BUILD_TYPE=Release',
'-DENABLE_ASAN=false'
}
}
}
}
Expand All @@ -186,9 +187,11 @@ android {
}
}

externalNativeBuild {
cmake {
path '../../weex_core/CMakeLists.txt'
if(project.buildCpp) {
externalNativeBuild {
cmake {
path '../../weex_core/CMakeLists.txt'
}
}
}

Expand Down

0 comments on commit 998d745

Please sign in to comment.