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

Commit 998d745

Browse files
committed
* [Android] Add buildCPP
1 parent ab11296 commit 998d745

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

android/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ subprojects {
5050
targetSdkVersion=26
5151
supportLibVersion="26.0.2"
5252
fastjsonLibVersion="1.1.46.android"
53+
//Default value for armABIOnly is true
5354
armABIOnly = !project.hasProperty("armABIOnly") || armABIOnly.equals('true')
55+
//Default value for buildCpp is true
56+
buildCpp = !project.hasProperty("buildCpp") || buildCpp.equals("true")
5457
}
5558
}
5659

android/sdk/build.gradle

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,15 @@ android {
158158
abiFilters "armeabi-v7a", "armeabi", "x86"
159159
}
160160
}
161-
162-
externalNativeBuild {
163-
cmake {
164-
arguments '-DANDROID_PLATFORM='+"${api_level}",
165-
'-DANDROID_TOOLCHAIN='+"${compile_tool}",
166-
'-DANDROID_STL='+"${cxx_stl}",
167-
'-DCMAKE_BUILD_TYPE=Release',
168-
'-DENABLE_ASAN=false'
161+
if(project.buildCpp) {
162+
externalNativeBuild {
163+
cmake {
164+
arguments '-DANDROID_PLATFORM=' + "${api_level}",
165+
'-DANDROID_TOOLCHAIN=' + "${compile_tool}",
166+
'-DANDROID_STL=' + "${cxx_stl}",
167+
'-DCMAKE_BUILD_TYPE=Release',
168+
'-DENABLE_ASAN=false'
169+
}
169170
}
170171
}
171172
}
@@ -186,9 +187,11 @@ android {
186187
}
187188
}
188189

189-
externalNativeBuild {
190-
cmake {
191-
path '../../weex_core/CMakeLists.txt'
190+
if(project.buildCpp) {
191+
externalNativeBuild {
192+
cmake {
193+
path '../../weex_core/CMakeLists.txt'
194+
}
192195
}
193196
}
194197

0 commit comments

Comments
 (0)