Skip to content

Commit 0f73ef0

Browse files
jwxbondandycall
authored andcommitted
fix: update android build
1 parent c0a27d9 commit 0f73ef0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

scripts/tasks.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,7 @@ task('build-android-webf-lib', (done) => {
11051105
};
11061106
const buildType = (buildMode === 'Release' || buildMode == 'RelWithDebInfo') ? 'RelWithDebInfo' : 'Debug';
11071107
let externCmakeArgs = [];
1108+
const enableTest = buildMode !== 'Release';
11081109

11091110
if (process.env.ENABLE_ASAN === 'true') {
11101111
externCmakeArgs.push('-DENABLE_ASAN=true');
@@ -1162,6 +1163,7 @@ task('build-android-webf-lib', (done) => {
11621163
-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON \
11631164
-DIS_ANDROID=TRUE \
11641165
-DANDROID_ABI="${arch}" \
1166+
${enableTest ? '-DENABLE_TEST=true \\' : '\\'}
11651167
${isProfile ? '-DENABLE_PROFILE=TRUE \\' : '\\'}
11661168
${externCmakeArgs.join(' ')} \
11671169
-DANDROID_PLATFORM="android-18" \

webf/android/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ allprojects {
2222

2323
apply plugin: 'com.android.library'
2424

25+
def enableTestBridge =
26+
System.getenv('WEBF_ENABLE_TEST') == 'true' ||
27+
System.getenv('KRAKEN_ENABLE_TEST') == 'true'
28+
2529

2630
android {
2731
if (project.android.hasProperty("namespace")) {
@@ -41,6 +45,9 @@ android {
4145
externalNativeBuild {
4246
cmake {
4347
arguments "-DANDROID_STL=c++_shared", "-DIS_ANDROID=TRUE", "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
48+
if (enableTestBridge) {
49+
arguments "-DENABLE_TEST=true"
50+
}
4451
}
4552
}
4653
}

0 commit comments

Comments
 (0)